X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=ec7d7b66cc928ace7caf6f292c6e3b4ffb4ebb7d;hb=bce9cdc080e4c2bffb73372a434b984d5f4ca893;hp=1743be63f92aee4c0f88e9d00a55d25790149364;hpb=ecc1df8f5863b1cba6ba4d71bd5053e9a376e702;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 1743be63..ec7d7b66 100644 --- a/src/screens.c +++ b/src/screens.c @@ -235,9 +235,6 @@ static TreeInfo *drop_distance_current = NULL; static TreeInfo *level_number = NULL; static TreeInfo *level_number_current = NULL; -static unsigned int sync_frame_delay = 0; -static unsigned int sync_frame_delay_value = GAME_FRAME_DELAY; - static struct { int value; @@ -1666,9 +1663,9 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) sound = getTitleSound(tci); music = getTitleMusic(tci); - if (sound == SND_UNDEFINED || sound != last_sound) - FadeSounds(); - if (music == MUS_UNDEFINED || music != last_music) + if (last_sound != SND_UNDEFINED && sound != last_sound) + FadeSound(last_sound); + if (last_music != MUS_UNDEFINED && music != last_music) FadeMusic(); fading = getTitleFading(tci); @@ -4710,16 +4707,14 @@ static void execSetupGraphics_setRenderingModes() static void execSetupGraphics() { + // update "setup.window_scaling_percent" from list selection + // (in this case, window scaling was changed on setup screen) if (setup_mode == SETUP_MODE_CHOOSE_WINDOW_SIZE) - { - // update "setup.window_scaling_percent" from list selection execSetupGraphics_setWindowSizes(FALSE); - } - else - { - // update list selection from "setup.window_scaling_percent" - execSetupGraphics_setWindowSizes(TRUE); - } + + // update list selection from "setup.window_scaling_percent" + // (window scaling may have changed by resizing the window) + execSetupGraphics_setWindowSizes(TRUE); execSetupGraphics_setScalingTypes(); execSetupGraphics_setRenderingModes(); @@ -5595,8 +5590,6 @@ static Key getSetupKey() DoAnimation(); BackToFront(); - - WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value); } return key; @@ -6311,8 +6304,6 @@ void CustomizeKeyboard(int player_nr) DoAnimation(); BackToFront(); - - WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value); } /* write new key bindings back to player setup */ @@ -6466,8 +6457,6 @@ static boolean CalibrateJoystickMain(int player_nr) DoAnimation(); BackToFront(); - - WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value); } /* calibrated center position (joystick should now be centered) */ @@ -6489,7 +6478,7 @@ static boolean CalibrateJoystickMain(int player_nr) NextEvent(&event); HandleOtherEvents(&event); - WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value); + BackToFront(); } }