mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Another attempt to lock the mouse
This commit is contained in:
parent
c98024aaf0
commit
f1c4f3c772
1 changed files with 9 additions and 4 deletions
|
|
@ -1319,10 +1319,6 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen)
|
|||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
SDL_RaiseWindow(window);
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
SDL_SetWindowGrab(window, SDL_TRUE);
|
||||
|
||||
// Renderer-specific stuff
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
|
|
@ -1560,6 +1556,15 @@ void I_StartupGraphics(void)
|
|||
if (!disable_mouse) SDL_ShowCursor(SDL_DISABLE);
|
||||
SDLdoUngrabMouse();
|
||||
|
||||
SDL_RaiseWindow(window);
|
||||
|
||||
if (mousegrabok && !M_CheckParm("-nomouse"))
|
||||
{
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
}
|
||||
|
||||
SDL_SetWindowGrab(window, SDL_TRUE);
|
||||
|
||||
graphics_started = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue