This fixes a problem that was introduced with the last commit: When
skipping fading effects (like when changing screens by pressing the
"Escape" key), the special bitmaps used for fading screens are not
updated to the current source or target screens, which can result in
displaying old screens (displayed before pressing "Escape") for one
video frame.
(For example, this happened when pressing "Escape" on a sub-screen
of the setup menu, then pressing "Escape" again on the setup main
screen, which then resulted in displaying the setup sub-screen in the
main menu for a single video frame, causing "garbage flickering".)
(This change effectively reverts commit
5eabbc4d. Negative effects
on cross-fading were not observed during tests, but may still exist.)
global.anim_status = global.anim_status_next;
// store backbuffer with all animations that will be started after fading in
- if (fade_type_skip != FADE_MODE_SKIP_FADE_IN)
- PrepareFadeBitmap(DRAW_TO_FADE_TARGET);
+ PrepareFadeBitmap(DRAW_TO_FADE_TARGET);
// set screen mode for animations back to fading
global.anim_status = GAME_MODE_PSEUDO_FADING;
global.anim_status = GAME_MODE_PSEUDO_FADING;
// store backbuffer with all animations that will be stopped for fading out
- if (fade_type_skip != FADE_MODE_SKIP_FADE_OUT)
- PrepareFadeBitmap(DRAW_TO_FADE_SOURCE);
+ PrepareFadeBitmap(DRAW_TO_FADE_SOURCE);
}
static void SetScreenStates_AfterFadingOut(void)