diff --git a/src/cs/MonoGame.Extended.Input/KeyboardExtended.cs b/src/cs/MonoGame.Extended.Input/KeyboardExtended.cs index 0262e456..9635cc9c 100644 --- a/src/cs/MonoGame.Extended.Input/KeyboardExtended.cs +++ b/src/cs/MonoGame.Extended.Input/KeyboardExtended.cs @@ -9,10 +9,14 @@ namespace MonoGame.Extended.Input private static KeyboardState _previousKeyboardState; public static KeyboardStateExtended GetState() + { + return new KeyboardStateExtended(_currentKeyboardState, _previousKeyboardState); + } + + public static Refresh() { _previousKeyboardState = _currentKeyboardState; _currentKeyboardState = Keyboard.GetState(); - return new KeyboardStateExtended(_currentKeyboardState, _previousKeyboardState); } } } \ No newline at end of file diff --git a/src/cs/MonoGame.Extended.Input/MouseExtended.cs b/src/cs/MonoGame.Extended.Input/MouseExtended.cs index f4a0b644..45c23763 100644 --- a/src/cs/MonoGame.Extended.Input/MouseExtended.cs +++ b/src/cs/MonoGame.Extended.Input/MouseExtended.cs @@ -11,10 +11,14 @@ namespace MonoGame.Extended.Input private static MouseState _previousMouseState; public static MouseStateExtended GetState() + { + return new MouseStateExtended(_currentMouseState, _previousMouseState); + } + + public static Refresh() { _previousMouseState = _currentMouseState; _currentMouseState = Mouse.GetState(); - return new MouseStateExtended(_currentMouseState, _previousMouseState); } public static void SetPosition(int x, int y) => Mouse.SetPosition(x, y);