time_current = SDL_GetTicks();
+ if (fade_delay <= 0)
+ {
+ // immediately draw final target frame without delay
+ fade_mode &= (FADE_MODE_FADE | FADE_MODE_TRANSFORM);
+ fade_delay = 1;
+ time_current -= 1;
+
+ // when fading without delay, also skip post delay
+ post_delay = 0;
+ }
+
if (fade_mode == FADE_MODE_MELT)
{
boolean done = FALSE;
height = WIN_YSIZE;
}
- if (!setup.fade_screens ||
- fade_delay == 0 ||
- fading.fade_mode == FADE_MODE_NONE)
- {
- if (fade_mode == FADE_MODE_FADE_OUT)
- return;
-
- BlitBitmap(backbuffer, window, x, y, width, height, x, y);
-
- redraw_mask &= ~fade_mask;
+ // when switching screens without fading, set fade delay to zero
+ if (!setup.fade_screens || fading.fade_mode == FADE_MODE_NONE)
+ fade_delay = 0;
+ // do not display black frame when fading out without fade delay
+ if (fade_mode == FADE_MODE_FADE_OUT && fade_delay == 0)
return;
- }
FadeRectangle(x, y, width, height, fade_mode, fade_delay, post_delay,
draw_border_function);