/// <summary> /// Frame /// </summary> internal void UpdateInput() { if (Game.GraphicsDevice.Display.Window != null) { if (Game.IsActive) { System.Drawing.Rectangle rect = Game.GraphicsDevice.Display.Window.ClientRectangle; if (IsMouseCentered) { Forms.Cursor.Position = Game.GraphicsDevice.Display.Window.PointToScreen(new Drawing.Point(rect.Width / 2, rect.Height / 2)); } if (IsMouseClipped) { Forms.Cursor.Clip = Game.GraphicsDevice.Display.Window.RectangleToScreen(rect); } else { Forms.Cursor.Clip = new Drawing.Rectangle(int.MinValue, int.MinValue, int.MaxValue, int.MaxValue); } SetCursorVisibility(!IsMouseHidden); } else { Forms.Cursor.Clip = new Drawing.Rectangle(int.MinValue, int.MinValue, int.MaxValue, int.MaxValue); RelativeMouseOffset = Vector2.Zero; SetCursorVisibility(true); RemoveAllPressedKeys(); } } Gamepad.Update(); }