diff --git a/MLEM/Input/InputHandler.cs b/MLEM/Input/InputHandler.cs index ded3f3b..ce2417d 100644 --- a/MLEM/Input/InputHandler.cs +++ b/MLEM/Input/InputHandler.cs @@ -181,7 +181,12 @@ namespace MLEM.Input { if (this.HandleMouse) { this.LastMouseState = this.MouseState; - this.MouseState = active ? Mouse.GetState() : default; + this.MouseState = default; + if (active) { + var state = Mouse.GetState(); + if (this.Game.GraphicsDevice.Viewport.Bounds.Contains(state.Position)) + this.MouseState = state; + } } if (this.HandleGamepads) {