From 5b9febd943b67b8dcb4c1cc14d23a23f27c65a88 Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Mon, 7 Jun 2010 14:10:28 +0000
Subject: [PATCH] pause while browse dialog
---
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 081e35d..ba3a227 100644
--- a/src/sdl-instead/game.c
+++ b/src/sdl-instead/game.c
@@ -228,7 +228,7 @@ static img_t menubg = NULL;
static img_t menu = NULL;
static int menu_shown = 0;
-
+static int browse_dialog = 0;
int game_cmd(char *cmd);
void game_clear(int x, int y, int w, int h)
@@ -1639,7 +1639,7 @@ static struct el *old_el = NULL;
int game_paused(void)
{
- return menu_shown || use_xref || old_xref || gfx_fading() || minimized();
+ return browse_dialog || menu_shown || use_xref || old_xref || gfx_fading() || minimized();
}
void menu_update(struct el *elem)
@@ -2396,7 +2396,9 @@ int game_from_disk(void)
game_menu(old_menu);
}
mouse_cursor(1);
+ browse_dialog = 1;
g = p = open_file_dialog();
+ browse_dialog = 0;
mouse_cursor(0);
if (!p)
return -1;