Skip to content

Commit 1862c42

Browse files
authored
Merge pull request #1263 from aufau/in_nograb
Fix in_nograb not releasing the mouse cursor
2 parents 037740d + 06777c5 commit 1862c42

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

shared/sdl/sdl_input.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,13 @@ static void IN_ActivateMouse( void )
452452
{
453453
if( in_nograb->modified || !mouseActive )
454454
{
455-
if( in_nograb->integer )
455+
if( in_nograb->integer ) {
456+
SDL_SetRelativeMouseMode( SDL_FALSE );
456457
SDL_SetWindowGrab( SDL_window, SDL_FALSE );
457-
else
458+
} else {
459+
SDL_SetRelativeMouseMode( SDL_TRUE );
458460
SDL_SetWindowGrab( SDL_window, SDL_TRUE );
461+
}
459462

460463
in_nograb->modified = qfalse;
461464
}

0 commit comments

Comments
 (0)