Skip to content

Commit 0e56552

Browse files
author
nitrocaster
committed
Restore cursor clipping when application window gets focus.
1 parent 14ef214 commit 0e56552

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/xrGame/GamePersistent.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "UI/UIGameTutorial.h"
3232
#include "xrEngine/GameFont.h"
3333
#include "xrEngine/PerformanceAlert.hpp"
34+
#include "xrEngine/xr_input.h"
3435

3536
#ifndef MASTER_GOLD
3637
# include "custommonster.h"
@@ -771,6 +772,7 @@ void CGamePersistent::OnAppActivate ()
771772
}
772773

773774
bEntryFlag = TRUE;
775+
pInput->ClipCursor(!GetUICursor().IsVisible());
774776
}
775777

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

782784
bRestorePause = FALSE;
783-
785+
784786
if ( !bIsMP )
785787
{
786788
bRestorePause = Device.Paused();

0 commit comments

Comments
 (0)