X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=c69b78fb4fcd4e22bd1f2e12a742ba23b4756479;hb=fd7a17027bb5c580b5d007fa33109f8a914d605b;hp=1743be63f92aee4c0f88e9d00a55d25790149364;hpb=ecc1df8f5863b1cba6ba4d71bd5053e9a376e702;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 1743be63..c69b78fb 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); @@ -5595,8 +5592,6 @@ static Key getSetupKey() DoAnimation(); BackToFront(); - - WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value); } return key; @@ -6311,8 +6306,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 +6459,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 +6480,7 @@ static boolean CalibrateJoystickMain(int player_nr) NextEvent(&event); HandleOtherEvents(&event); - WaitUntilDelayReached(&sync_frame_delay, sync_frame_delay_value); + BackToFront(); } }