{
setup.fullscreen = !setup.fullscreen;
- ToggleFullscreenOrChangeWindowScalingIfNeeded();
+ ToggleFullscreenIfNeeded();
if (game_status == GAME_MODE_SETUP)
RedrawSetupScreenAfterFullscreenToggle();
else if (setup.window_scaling_percent > MAX_WINDOW_SCALING_PERCENT)
setup.window_scaling_percent = MAX_WINDOW_SCALING_PERCENT;
- ToggleFullscreenOrChangeWindowScalingIfNeeded();
+ ChangeWindowScalingIfNeeded();
if (game_status == GAME_MODE_SETUP)
RedrawSetupScreenAfterFullscreenToggle();
return;
}
- // needed if last screen was the setup screen and fullscreen state changed
- // (moved to "execSetupGraphics()" to change fullscreen state directly)
- // ToggleFullscreenOrChangeWindowScalingIfNeeded();
-
// leveldir_current may be invalid (level group, parent link)
if (!validLevelSeries(leveldir_current))
leveldir_current = getFirstValidTreeInfoEntry(leveldir_last_valid);
ModifyGameSpeedIfNeeded();
// window scaling may have changed at this point
- ToggleFullscreenOrChangeWindowScalingIfNeeded();
+ ChangeWindowScalingIfNeeded();
// window scaling quality may have changed at this point
if (!strEqual(setup.window_scaling_quality, video.window_scaling_quality))
// fullscreen state may have changed at this point
if (si->value == &setup.fullscreen)
- ToggleFullscreenOrChangeWindowScalingIfNeeded();
+ ToggleFullscreenIfNeeded();
// network mode may have changed at this point
if (si->value == &setup.network_mode)
#endif
}
-void ToggleFullscreenOrChangeWindowScalingIfNeeded(void)
+void ToggleFullscreenIfNeeded(void)
{
if (setup.fullscreen != video.fullscreen_enabled &&
video.fullscreen_available)
// set setup value according to successfully changed fullscreen mode
setup.fullscreen = video.fullscreen_enabled;
}
- else if (setup.window_scaling_percent != video.window_scaling_percent &&
- !video.fullscreen_enabled)
+}
+
+void ChangeWindowScalingIfNeeded(void)
+{
+ if (setup.window_scaling_percent != video.window_scaling_percent &&
+ !video.fullscreen_enabled)
{
SDLSetWindowScaling(setup.window_scaling_percent);
void SetLevelSetInfo(char *, int);
-void ToggleFullscreenOrChangeWindowScalingIfNeeded(void);
+void ToggleFullscreenIfNeeded(void);
+void ChangeWindowScalingIfNeeded(void);
void ChangeVsyncModeIfNeeded(void);
void ChangeViewportPropertiesIfNeeded(void);