From 8f112c09fa02a53236048c1fd0032e11237458f7 Mon Sep 17 00:00:00 2001 From: "p.kosyh" Date: Wed, 13 Apr 2011 05:25:54 +0000 Subject: [PATCH] more clever direct --- src/sdl-instead/game.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sdl-instead/game.c b/src/sdl-instead/game.c index 407b913..43754d6 100644 --- a/src/sdl-instead/game.c +++ b/src/sdl-instead/game.c @@ -1524,7 +1524,7 @@ int game_pict_modify(img_t p) { static int modify = 0; int last = modify; - if (p && (el_img(el_spic) == p)) + if (p && ((el_img(el_spic) == p) || p == gfx_screen(NULL))) modify = 1; else modify = 0; @@ -1609,7 +1609,9 @@ int game_cmd(char *cmd) if (game_theme.gfx_mode == GFX_MODE_DIRECT) { if (cmdstr) free(cmdstr); - goto out; + if (game_pict_modify(NULL)) + goto out; + return 0; } else if (dd) { /* disable direct mode on the fly */ game_theme_changed = 2; /* force redraw */ game_cursor(CURSOR_DRAW);