mirror of
https://github.com/Oibaf66/uae-wii.git
synced 2024-11-22 02:29:17 +01:00
Show a dialogue on panics
This commit is contained in:
parent
3a8daf91cd
commit
938bd5f58b
@ -491,7 +491,16 @@ void gui_message (const char *format,...)
|
||||
va_start (parms,format);
|
||||
vsprintf ( msg, format, parms);
|
||||
va_end (parms);
|
||||
// msgYesNo(msg, 0, 24, 24);
|
||||
|
||||
if (!menu_is_inited())
|
||||
{
|
||||
/* Some error message at startup - just quit */
|
||||
SDL_Surface *screen = SDL_SetVideoMode(640, 480, 16, 0);
|
||||
if (!screen)
|
||||
return; /* Deep trouble! */
|
||||
menu_init(screen);
|
||||
}
|
||||
msgYesNo(msg, 0, 24, 24);
|
||||
|
||||
write_log (msg);
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ static SDL_Surface *real_screen;
|
||||
#define IS_TEXT(p_msg) ( (p_msg)[0] == '#' || (p_msg)[0] == ' ' )
|
||||
#define IS_MARKER(p_msg) ( (p_msg)[0] == '@' )
|
||||
|
||||
static int is_inited = 0;
|
||||
static TTF_Font *menu_font;
|
||||
static TTF_Font *menu_font64;
|
||||
#if defined(GEKKO)
|
||||
@ -992,4 +993,10 @@ void menu_init(SDL_Surface *screen)
|
||||
menu_font64 = read_font(FONT_ALT_PATH);
|
||||
|
||||
real_screen = screen;
|
||||
is_inited = 1;
|
||||
}
|
||||
|
||||
int menu_is_inited(void)
|
||||
{
|
||||
return is_inited;
|
||||
}
|
||||
|
@ -44,4 +44,6 @@ extern int msgYesNo(char *text, int def,int x, int y);
|
||||
|
||||
void menu_init(SDL_Surface *screen);
|
||||
|
||||
int menu_is_inited(void);
|
||||
|
||||
#endif /* !__MENU_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user