Skip to content

Commit

Permalink
Restore cursor clipping when application window gets focus.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Jan 25, 2016
1 parent 14ef214 commit 0e56552
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xrGame/GamePersistent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "UI/UIGameTutorial.h"
#include "xrEngine/GameFont.h"
#include "xrEngine/PerformanceAlert.hpp"
#include "xrEngine/xr_input.h"

#ifndef MASTER_GOLD
# include "custommonster.h"
Expand Down Expand Up @@ -771,6 +772,7 @@ void CGamePersistent::OnAppActivate ()
}

bEntryFlag = TRUE;
pInput->ClipCursor(!GetUICursor().IsVisible());
}

void CGamePersistent::OnAppDeactivate ()
Expand All @@ -780,7 +782,7 @@ void CGamePersistent::OnAppDeactivate ()
bool bIsMP = (g_pGameLevel && Level().game && GameID() != eGameIDSingle);

bRestorePause = FALSE;

if ( !bIsMP )
{
bRestorePause = Device.Paused();
Expand Down

0 comments on commit 0e56552

Please sign in to comment.