f5 bug :(
This commit is contained in:
parent
c9a8a19c91
commit
d90ba77b57
|
@ -15,6 +15,7 @@ void game_cursor(int on);
|
|||
static void mouse_reset(void);
|
||||
static void menu_toggle(void);
|
||||
|
||||
|
||||
void game_err_msg(const char *s)
|
||||
{
|
||||
if (err_msg)
|
||||
|
@ -153,6 +154,11 @@ static img_t menu = NULL;
|
|||
|
||||
static int menu_shown = 0;
|
||||
|
||||
int game_paused(void)
|
||||
{
|
||||
return menu_shown;
|
||||
}
|
||||
|
||||
int game_cmd(char *cmd);
|
||||
void game_clear(int x, int y, int w, int h)
|
||||
{
|
||||
|
@ -1192,6 +1198,8 @@ int game_cmd(char *cmd)
|
|||
char *pict = NULL;
|
||||
img_t oldscreen = NULL;
|
||||
|
||||
if (menu_shown)
|
||||
return -1;
|
||||
cmdstr = instead_cmd(cmd); instead_clear();
|
||||
// goto err;
|
||||
|
||||
|
@ -2100,7 +2108,7 @@ int game_loop(void)
|
|||
game_select(curgame_dir);
|
||||
game_load(9);
|
||||
}
|
||||
} if (!is_key(&ev, "f5") && curgame_dir) {
|
||||
} if (!is_key(&ev, "f5") && curgame_dir && !menu_shown) {
|
||||
mouse_reset();
|
||||
game_cmd("look");
|
||||
} if (!is_key(&ev, "f10")) {
|
||||
|
|
|
@ -56,6 +56,8 @@ extern char *game_save_path(int rc, int nr);
|
|||
|
||||
extern char *game_locale(void);
|
||||
|
||||
extern int game_paused(void);
|
||||
|
||||
#define CURSOR_CLEAR -1
|
||||
#define CURSOR_OFF 0
|
||||
#define CURSOR_ON 1
|
||||
|
|
Reference in a new issue