mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Merge pull request #2038 from HaasJona/restart_required
Require a restart after changing hardware rendering
This commit is contained in:
@@ -493,7 +493,16 @@ static void window_options_mouseup(rct_window *w, int widgetIndex)
|
||||
break;
|
||||
case WIDX_HARDWARE_DISPLAY_CHECKBOX:
|
||||
gConfigGeneral.hardware_display ^= 1;
|
||||
#ifdef _WIN32
|
||||
// Windows is apparently able to switch to hardware rendering on the fly although
|
||||
// using the same window in an unaccelerated and accelerated context is unsupported by SDL2
|
||||
gHardwareDisplay = gConfigGeneral.hardware_display;
|
||||
platform_refresh_video();
|
||||
#else
|
||||
// Linux requires a restart. This could be improved in the future by recreating the window,
|
||||
// https://github.com/OpenRCT2/OpenRCT2/issues/2015
|
||||
window_error_open(STR_RESTART_REQUIRED, STR_NONE);
|
||||
#endif
|
||||
config_save_default();
|
||||
window_invalidate(w);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user