Fix mouse centering in menu

This commit is contained in:
nukeykt 2019-09-14 23:33:22 +09:00 committed by Christoph Oelckers
parent 3fbb171990
commit 90b005a44a
3 changed files with 7 additions and 9 deletions

View file

@ -1109,7 +1109,10 @@ void mouseLockToWindow(char a)
void mouseMoveToCenter(void)
{
if (sdl_window)
SDL_WarpMouseInWindow(sdl_window, xdim / 2, ydim / 2);
{
g_mouseAbs = { xdim >> 1, ydim >> 1 };
SDL_WarpMouseInWindow(sdl_window, g_mouseAbs.x, g_mouseAbs.y);
}
}
//