mirror of
https://github.com/Oibaf66/uae-wii.git
synced 2024-11-11 05:15:06 +01:00
Do menu_init in sdlgfx
This commit is contained in:
parent
ca56facf7b
commit
4ba2064844
@ -56,7 +56,9 @@
|
||||
#endif
|
||||
|
||||
static SDL_Surface *display;
|
||||
SDL_Surface *screen;
|
||||
static SDL_Surface *screen;
|
||||
extern void menu_init(SDL_Surface *screen);
|
||||
|
||||
|
||||
/* Standard P96 screen modes */
|
||||
#define MAX_SCREEN_MODES 12
|
||||
@ -939,6 +941,7 @@ static int graphics_subinit (void)
|
||||
gui_message ("Unable to set video mode: %s\n", SDL_GetError ());
|
||||
return 0;
|
||||
} else {
|
||||
menu_init(screen);
|
||||
/* Just in case we didn't get exactly what we asked for . . . */
|
||||
fullscreen = ((screen->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN);
|
||||
is_hwsurface = ((screen->flags & SDL_HWSURFACE) == SDL_HWSURFACE);
|
||||
|
@ -14,8 +14,6 @@
|
||||
#include "uae.h"
|
||||
#include "menu.h"
|
||||
|
||||
extern SDL_Surface *screen;
|
||||
|
||||
static const char *main_menu_messages[] = {
|
||||
/*00*/ "Floppy",
|
||||
/*01*/ "^|df0|df1|df2|df3",
|
||||
@ -120,19 +118,12 @@ static void insert_floppy(int which)
|
||||
|
||||
void gui_display(int shortcut)
|
||||
{
|
||||
static int is_inited = 0;
|
||||
int submenus[3];
|
||||
int opt;
|
||||
|
||||
memset(submenus, 0, sizeof(submenus));
|
||||
printf("Initing gui with %d\n", shortcut);
|
||||
printf("Al-mibb: Gui is display!\n");
|
||||
printf("gui_display: %d\n", shortcut);
|
||||
|
||||
if (!is_inited)
|
||||
{
|
||||
menu_init(screen);
|
||||
is_inited = 1;
|
||||
}
|
||||
opt = menu_select_title("Main menu", main_menu_messages, submenus);
|
||||
switch(opt)
|
||||
{
|
||||
@ -156,7 +147,7 @@ void gui_message (const char *format,...)
|
||||
char msg[2048];
|
||||
va_list parms;
|
||||
|
||||
printf("Al-mibb: Gui is al-message!\n");
|
||||
printf("Al-mibb: Gui message!\n");
|
||||
|
||||
va_start (parms,format);
|
||||
vsprintf ( msg, format, parms);
|
||||
|
Loading…
Reference in New Issue
Block a user