gfx_change_screen with 1 fix

This commit is contained in:
p.kosyh 2011-07-31 11:53:53 +00:00
parent e6b5d9bbfe
commit 9c7f23eafa
2 changed files with 8 additions and 2 deletions

View File

@ -1807,7 +1807,7 @@ int game_cmd(char *cmd)
unix_path(pict);
new_pict = check_new_pict(pict);
if (game_theme_changed == 2 && opt_owntheme && !fading)
fading = 1; /* one frame at least */

View File

@ -4100,9 +4100,15 @@ extern void nsleep(int delay);
void gfx_change_screen(img_t src, int steps)
{
struct inp_event ev;
SDL_TimerID han;
if (steps <= 1) {
gfx_draw(src, 0, 0);
game_cursor(CURSOR_DRAW);
gfx_flip();
return;
}
memset(&ev, 0, sizeof(ev));
ALPHA_STEPS = steps;
SDL_TimerID han;
fade_step_nr = 0;
fade_bg = gfx_grab_screen(0, 0, gfx_width, gfx_height);
if (!fade_bg) /* ok, i like kernel logic. No memory, but we must work! */