mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Another attempt to lock the mouse
This commit is contained in:
parent
40a037f603
commit
46d1a866d8
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…
Reference in a new issue