Skip to content
Snippets Groups Projects
Commit 46d1a866 authored by SteelT's avatar SteelT
Browse files

Another attempt to lock the mouse

parent 40a037f6
Branches
Tags
2 merge requests!488Merge in next and don't billboard papersprites in GL,!416SDL:Auto grab input
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment