Skip to content

Commit

Permalink
Fixed duplicate cursor after game
Browse files Browse the repository at this point in the history
  • Loading branch information
Rampastring committed Jan 4, 2017
1 parent d4b8040 commit c622f88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion DXMainClient/DXGUI/Generic/GameInProgressWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public GameInProgressWindow(WindowManager windowManager) : base(windowManager)

private bool initialized = false;
private bool deletingLogFilesFailed = false;
private bool nativeCursorUsed = false;

public override void Initialize()
{
Expand Down Expand Up @@ -86,6 +87,8 @@ private void SharedUILogic_GameProcessStarted()
Visible = true;
Enabled = true;
WindowManager.Cursor.Visible = false;
nativeCursorUsed = Game.IsMouseVisible;
Game.IsMouseVisible = false;
ProgramConstants.IsInGame = true;
Game.TargetElapsedTime = TimeSpan.FromMilliseconds(1000.0 / POWER_SAVING_FPS);
if (UserINISettings.Instance.MinimizeWindowsOnGameStart)
Expand All @@ -101,7 +104,10 @@ private void HandleGameProcessExited()
{
Visible = false;
Enabled = false;
WindowManager.Cursor.Visible = true;
if (nativeCursorUsed)
Game.IsMouseVisible = true;
else
WindowManager.Cursor.Visible = true;
ProgramConstants.IsInGame = false;
Game.TargetElapsedTime = TimeSpan.FromMilliseconds(1000.0 / FPS);
if (UserINISettings.Instance.MinimizeWindowsOnGameStart)
Expand Down
4 changes: 2 additions & 2 deletions DXMainClient/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.3.5")]
[assembly: AssemblyFileVersion("2.0.3.5")]
[assembly: AssemblyVersion("2.0.3.6")]
[assembly: AssemblyFileVersion("2.0.3.6")]

0 comments on commit c622f88

Please sign in to comment.