mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
trap-mouse: cleanup
This commit is contained in:
@@ -745,11 +745,7 @@ static void platform_create_window()
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gConfigGeneral.trap_cursor)
|
SDL_SetWindowGrab(gWindow, gConfigGeneral.trap_cursor ? SDL_TRUE : SDL_FALSE);
|
||||||
SDL_SetWindowGrab(gWindow, SDL_TRUE);
|
|
||||||
else
|
|
||||||
SDL_SetWindowGrab(gWindow, SDL_FALSE);
|
|
||||||
|
|
||||||
|
|
||||||
// Set the update palette function pointer
|
// Set the update palette function pointer
|
||||||
RCT2_GLOBAL(0x009E2BE4, update_palette_func) = platform_update_palette;
|
RCT2_GLOBAL(0x009E2BE4, update_palette_func) = platform_update_palette;
|
||||||
|
|||||||
@@ -596,12 +596,7 @@ static void window_options_mouseup(rct_window *w, int widgetIndex)
|
|||||||
case WIDX_TRAP_CURSOR:
|
case WIDX_TRAP_CURSOR:
|
||||||
gConfigGeneral.trap_cursor ^= 1;
|
gConfigGeneral.trap_cursor ^= 1;
|
||||||
config_save_default();
|
config_save_default();
|
||||||
|
SDL_SetWindowGrab(gWindow, gConfigGeneral.trap_cursor ? SDL_TRUE : SDL_FALSE);
|
||||||
if (gConfigGeneral.trap_cursor)
|
|
||||||
SDL_SetWindowGrab(gWindow, SDL_TRUE);
|
|
||||||
else
|
|
||||||
SDL_SetWindowGrab(gWindow, SDL_FALSE);
|
|
||||||
|
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
break;
|
break;
|
||||||
case WIDX_TOOLBAR_SHOW_FINANCES:
|
case WIDX_TOOLBAR_SHOW_FINANCES:
|
||||||
|
|||||||
Reference in New Issue
Block a user