~fixed messagebox crash when mounting DVD

~improved messagebox when loading ROM files with SRAM/Savestate "autoload"
~modified messageboxes titles & some error messages
~improved ROM file selection with the wiimote
~fixed VDP horizontal mode when loading savestate
~modified horizonatl scaling in Original mode.
~compiled with SVN libfat (read-ahead cache is now automatically used)
This commit is contained in:
ekeeke31 2009-05-20 15:11:06 +00:00
parent 7b7fa4123d
commit 2a26480498
15 changed files with 113 additions and 127 deletions

View File

@ -88,7 +88,7 @@ u32 dvd_read (void *dst, u32 len, u64 offset)
****************************************************************************/
void dvd_motor_off( )
{
GUI_MsgBoxOpen("INFO", "Stopping DVD drive ...");
GUI_MsgBoxOpen("Information", "Stopping DVD drive ...");
#ifndef HW_RVL
dvd[0] = 0x2e;
@ -108,6 +108,7 @@ void dvd_motor_off( )
#else
DI_StopMotor();
#endif
GUI_MsgBoxClose();
}

View File

@ -302,7 +302,7 @@ int DVD_LoadFile(u8 *buffer)
{
char msg[50];
sprintf(msg,"Loading %d bytes...", length);
GUI_MsgBoxOpen("INFO",msg);
GUI_MsgBoxOpen("Information",msg);
/* How many 2k blocks to read */
int blocks = length / 2048;
int readoffset = 0;
@ -325,7 +325,6 @@ int DVD_LoadFile(u8 *buffer)
memcpy (buffer + readoffset, readbuffer, i);
}
GUI_MsgBoxClose();
return length;
}
else
@ -352,7 +351,7 @@ int DVD_Open(void)
if (!getpvd())
{
/* mount DVD */
GUI_MsgBoxOpen("INFO", "Mounting DVD ... Wait");
GUI_MsgBoxOpen("Information", "Mounting DVD ... Wait");
#ifdef HW_RVL
u32 val;
@ -360,7 +359,7 @@ int DVD_Open(void)
if(val & 0x1)
{
GUI_WaitPrompt("ERROR","No Disc inserted !");
GUI_WaitPrompt("Error","No Disc inserted !");
return 0;
}
@ -370,7 +369,7 @@ int DVD_Open(void)
{
char msg[50];
sprintf(msg, "DI Status Error: 0x%08X !\n",DI_GetStatus());
GUI_WaitPrompt("ERROR",msg);
GUI_WaitPrompt("Error",msg);
return 0;
}
#else
@ -380,7 +379,7 @@ int DVD_Open(void)
haveDVDdir = 0;
if (!getpvd())
{
GUI_WaitPrompt("ERROR","Disc can not be read !");
GUI_WaitPrompt("Error","Disc can not be read !");
return 0;
}
@ -411,7 +410,7 @@ int DVD_Open(void)
else
{
/* no entries found */
GUI_WaitPrompt("ERROR","No files found !");
GUI_WaitPrompt("Error","No files found !");
return 0;
}
}

View File

@ -109,7 +109,7 @@ int FAT_ParseDirectory(void)
DIR_ITER *dir = diropen (fatdir);
if (dir == NULL)
{
GUI_WaitPrompt("ERROR","Unable to open directory !");
GUI_WaitPrompt("Error","Unable to open directory !");
return -1;
}
@ -177,7 +177,7 @@ int FAT_LoadFile(u8 *buffer)
FILE *sdfile = fopen(fname, "rb");
if (sdfile == NULL)
{
GUI_WaitPrompt("ERROR","Unable to open file !");
GUI_WaitPrompt("Error","Unable to open file !");
haveFATdir = 0;
return 0;
}
@ -196,10 +196,9 @@ int FAT_LoadFile(u8 *buffer)
{
char msg[50];
sprintf(msg,"Loading %d bytes ...", length);
GUI_MsgBoxOpen("INFO",msg);
GUI_MsgBoxOpen("Information",msg);
fread(buffer, 1, length, sdfile);
fclose(sdfile);
GUI_MsgBoxClose();
return length;
}
}
@ -235,9 +234,9 @@ int FAT_Open(int type)
/* if FAT device type changed, reload filelist */
if (fat_type != type)
{
fat_type = type;
haveFATdir = 0;
}
fat_type = type;
/* update filelist */
if (haveFATdir == 0)
@ -298,7 +297,7 @@ int FAT_Open(int type)
else
{
/* no entries found */
if (max == 0) GUI_WaitPrompt("ERROR","No files found !");
if (max == 0) GUI_WaitPrompt("Error","No files found !");
return 0;
}
}

View File

@ -69,7 +69,7 @@ static int FAT_ManageFile(char *filename, u8 direction, u8 filetype)
FILE *fp = fopen(fname, direction ? "rb" : "wb");
if (fp == NULL)
{
GUI_WaitPrompt("ERROR","Unable to open file !");
GUI_WaitPrompt("Error","Unable to open file !");
return 0;
}
@ -89,13 +89,13 @@ static int FAT_ManageFile(char *filename, u8 direction, u8 filetype)
done = fwrite(savebuffer, 1, filesize, fp);
if (done < filesize)
{
GUI_WaitPrompt("ERROR","Unable to write file !");
GUI_WaitPrompt("Error","Unable to write file !");
return 0;
}
fclose(fp);
sprintf (fname, "Saved %d bytes successfully", done);
GUI_WaitPrompt("INFO",fname);
GUI_WaitPrompt("Information",fname);
return 1;
case 1: /* LOADING */
@ -109,7 +109,7 @@ static int FAT_ManageFile(char *filename, u8 direction, u8 filetype)
done = fread(savebuffer, 1, filesize, fp);
if (done < filesize)
{
GUI_WaitPrompt("ERROR","Unable to read file !");
GUI_WaitPrompt("Error","Unable to read file !");
return 0;
}
fclose(fp);
@ -123,7 +123,7 @@ static int FAT_ManageFile(char *filename, u8 direction, u8 filetype)
else state_load(savebuffer); /* STATE */
sprintf (fname, "Loaded %d bytes successfully", done);
GUI_WaitPrompt("INFO",fname);
GUI_WaitPrompt("Information",fname);
return 1;
}
@ -232,11 +232,11 @@ int ManageSRAM (u8 direction, u8 device)
char filename[MAXJOLIET];
/* clean buffer */
memset(savebuffer, 0, 0x24000);
if (direction) GUI_MsgBoxOpen("Information","Loading SRAM ...");
else GUI_MsgBoxOpen("Information","Saving SRAM ...");
if (direction) GUI_MsgBoxOpen("INFO","Loading SRAM ...");
else GUI_MsgBoxOpen("INFO","Saving SRAM ...");
/* clean buffer */
memset(savebuffer, 0, STATE_SIZE);
if (device == 0)
{
@ -302,8 +302,8 @@ int ManageSRAM (u8 direction, u8 device)
CardError = CARD_Open (CARDSLOT, filename, &CardFile);
if (CardError)
{
sprintf (action, "Error Open : %d", CardError);
GUI_WaitPrompt("ERROR",action);
sprintf (action, "Unable to open file (%d)", CardError);
GUI_WaitPrompt("Error",action);
CARD_Unmount (CARDSLOT);
return 0;
}
@ -317,8 +317,8 @@ int ManageSRAM (u8 direction, u8 device)
CardError = CARD_Create (CARDSLOT, "TEMP", blocks-size, &CardFile);
if (CardError)
{
sprintf (action, "Error Update : %d", CardError);
GUI_WaitPrompt("ERROR",action);
sprintf (action, "Unable to create temporary file (%d)", CardError);
GUI_WaitPrompt("Error",action);
CARD_Unmount (CARDSLOT);
return 0;
}
@ -334,8 +334,8 @@ int ManageSRAM (u8 direction, u8 device)
CardError = CARD_Create (CARDSLOT, filename, blocks, &CardFile);
if (CardError)
{
sprintf (action, "Error create : %d %d", CardError, CARDSLOT);
GUI_WaitPrompt("ERROR",action);
sprintf (action, "Unable to create new file (%d)", CardError);
GUI_WaitPrompt("Error",action);
CARD_Unmount (CARDSLOT);
return 0;
}
@ -361,13 +361,13 @@ int ManageSRAM (u8 direction, u8 device)
CARD_Unmount (CARDSLOT);
sram.crc = crc32 (0, &sram.sram[0], 0x10000);
sprintf (action, "Saved %d bytes successfully", blocks);
GUI_WaitPrompt("INFO",action);
GUI_WaitPrompt("Information",action);
return 1;
default: /*** Loading ***/
if (!CardFileExists (filename,CARDSLOT))
{
GUI_WaitPrompt("ERROR","No SRAM file found !");
GUI_WaitPrompt("Error","File does not exist !");
CARD_Unmount (CARDSLOT);
return 0;
}
@ -376,8 +376,8 @@ int ManageSRAM (u8 direction, u8 device)
CardError = CARD_Open (CARDSLOT, filename, &CardFile);
if (CardError)
{
sprintf (action, "Error Open : %d", CardError);
GUI_WaitPrompt("ERROR",action);
sprintf (action, "Unable to open file (%d)", CardError);
GUI_WaitPrompt("Error",action);
CARD_Unmount (CARDSLOT);
return 0;
}
@ -398,21 +398,24 @@ int ManageSRAM (u8 direction, u8 device)
CARD_Close (&CardFile);
CARD_Unmount (CARDSLOT);
/* Copy to SRAM */
/*** update SRAM ***/
memcpy(&inzipped,&savebuffer[2112],sizeof(inzipped));
outzipped = 0x10000;
uncompress ((Bytef *) &sram.sram, &outzipped, (Bytef *) &savebuffer[2112+sizeof(inzipped)], inzipped);
sram.crc = crc32 (0, &sram.sram[0], 0x10000);
/*** reset system ***/
system_reset ();
/*** Inform user ***/
sprintf (action, "Loaded %d bytes successfully", size);
GUI_WaitPrompt("INFO",action);
GUI_WaitPrompt("Information",action);
return 1;
}
}
else GUI_WaitPrompt("ERROR","Unable to mount meory card");
return 0; /*** Signal failure ***/
GUI_WaitPrompt("Error","Unable to mount memory card");
return 0;
}
/****************************************************************************
@ -429,11 +432,11 @@ int ManageState (u8 direction, u8 device)
char filename[MAXJOLIET];
/* clean buffer */
memset(savebuffer, 0, 0x24000);
if (direction) GUI_MsgBoxOpen("Information","Loading State ...");
else GUI_MsgBoxOpen("Information","Saving State ...");
if (direction) GUI_MsgBoxOpen("INFO","Loading State ...");
else GUI_MsgBoxOpen("INFO","Saving State ...");
/* clean buffer */
memset(savebuffer, 0, STATE_SIZE);
if (device == 0)
{
@ -495,8 +498,8 @@ int ManageState (u8 direction, u8 device)
CardError = CARD_Open (CARDSLOT, filename, &CardFile);
if (CardError)
{
sprintf (action, "Error Open : %d", CardError);
GUI_WaitPrompt("ERROR",action);
sprintf (action, "Unable to open file (%d)", CardError);
GUI_WaitPrompt("Error",action);
CARD_Unmount (CARDSLOT);
return 0;
}
@ -510,8 +513,8 @@ int ManageState (u8 direction, u8 device)
CardError = CARD_Create (CARDSLOT, "TEMP", blocks-size, &CardFile);
if (CardError)
{
sprintf (action, "Error Update : %d", CardError);
GUI_WaitPrompt("ERROR",action);
sprintf (action, "Unable to create temporary file (%d)", CardError);
GUI_WaitPrompt("Error",action);
CARD_Unmount (CARDSLOT);
return 0;
}
@ -527,8 +530,8 @@ int ManageState (u8 direction, u8 device)
CardError = CARD_Create (CARDSLOT, filename, blocks, &CardFile);
if (CardError)
{
sprintf (action, "Error create : %d %d", CardError, CARDSLOT);
GUI_WaitPrompt("ERROR",action);
sprintf (action, "Unable to create new file (%d)", CardError);
GUI_WaitPrompt("Error",action);
CARD_Unmount (CARDSLOT);
return 0;
}
@ -553,13 +556,13 @@ int ManageState (u8 direction, u8 device)
CARD_Close (&CardFile);
CARD_Unmount (CARDSLOT);
sprintf (action, "Saved %d bytes successfully", blocks);
GUI_WaitPrompt("ERROR",action);
GUI_WaitPrompt("Information",action);
return 1;
default: /*** Loading ***/
if (!CardFileExists (filename, CARDSLOT))
{
GUI_WaitPrompt("ERROR","No Savestate file found !");
GUI_WaitPrompt("Error","File does not exist !");
CARD_Unmount (CARDSLOT);
return 0;
}
@ -568,8 +571,8 @@ int ManageState (u8 direction, u8 device)
CardError = CARD_Open (CARDSLOT, filename, &CardFile);
if (CardError)
{
sprintf (action, "Error Open : %d", CardError);
GUI_WaitPrompt("ERROR",action);
sprintf (action, "Unable to open file (%d)", CardError);
GUI_WaitPrompt("Error",action);
CARD_Unmount (CARDSLOT);
return 0;
}
@ -595,11 +598,11 @@ int ManageState (u8 direction, u8 device)
/*** Inform user ***/
sprintf (action, "Loaded %d bytes successfully", size);
GUI_WaitPrompt("ERROR",action);
GUI_WaitPrompt("Information",action);
return 1;
}
}
else GUI_WaitPrompt("ERROR","Unable to mount memory card !");
return 0; /*** Signal failure ***/
GUI_WaitPrompt("Error","Unable to mount memory card !");
return 0;
}

View File

@ -131,7 +131,7 @@ int UnZipBuffer (unsigned char *outbuffer, u64 discoffset, char *filename)
memcpy (&pkzip, &readbuffer, sizeof (PKZIPHEADER));
sprintf (msg, "Unzipping %d bytes ...", FLIP32 (pkzip.uncompressedSize));
GUI_MsgBoxOpen("INFO",msg);
GUI_MsgBoxOpen("Information",msg);
/*** Prepare the zip stream ***/
memset (&zs, 0, sizeof (z_stream));
@ -144,7 +144,7 @@ int UnZipBuffer (unsigned char *outbuffer, u64 discoffset, char *filename)
if (res != Z_OK)
{
GUI_WaitPrompt("ERROR","Unable to unzip file !");
GUI_WaitPrompt("Error","Unable to unzip file !");
return 0;
}
@ -168,7 +168,7 @@ int UnZipBuffer (unsigned char *outbuffer, u64 discoffset, char *filename)
if (res == Z_MEM_ERROR)
{
inflateEnd (&zs);
GUI_WaitPrompt("ERROR","Unable to unzip file !");
GUI_WaitPrompt("Error","Unable to unzip file !");
return 0;
}
@ -203,8 +203,6 @@ int UnZipBuffer (unsigned char *outbuffer, u64 discoffset, char *filename)
/* close file */
if (fatfile) fclose(fatfile);
GUI_MsgBoxClose();
if (res == Z_STREAM_END)
{
if (FLIP32 (pkzip.uncompressedSize) == (u32) bufferoffset) return bufferoffset;

View File

@ -164,7 +164,6 @@ int FileSelector(unsigned char *buffer)
#ifdef HW_RVL
int x,y;
gui_butn *button;
struct orient_t orient;
#endif
/* Initialize Menu */
@ -236,6 +235,12 @@ int FileSelector(unsigned char *buffer)
}
}
#ifdef HW_RVL
/* pointer is out of focus */
if (m->selected != -1)
strcpy(action_select.comment,"");
#endif
/* Draw menu*/
GUI_DrawMenu(m);
@ -311,23 +316,22 @@ int FileSelector(unsigned char *buffer)
y = m_input.ir.y;
/* draw wiimote pointer */
WPAD_Orientation(0,&orient);
gxResetAngle(orient.roll);
gxDrawTexture(w_pointer, x, y, w_pointer->width, w_pointer->height,255);
gxResetAngle(m_input.ir.angle);
gxDrawTexture(w_pointer, x-w_pointer->width/2, y-w_pointer->height/2, w_pointer->width, w_pointer->height,255);
gxResetAngle(0.0);
/* find selected item */
yoffset = PAGEOFFSET;
yoffset = PAGEOFFSET - 2;
m->selected = m->max_buttons + 2;
for (i = offset; i < (offset + PAGESIZE) && (i < maxfiles); i++)
{
if ((x<=380)&&(y>=yoffset)&&(y<(yoffset+22)))
if ((x<=380)&&(y>=yoffset)&&(y<(yoffset+24)))
{
selection = i;
m->selected = -1;
break;
}
yoffset += 22;
yoffset += 24;
}
/* find selected button */
@ -493,6 +497,13 @@ int FileSelector(unsigned char *buffer)
{
if (useFAT) size = FAT_LoadFile(buffer);
else size = DVD_LoadFile(buffer);
if (size)
{
memfile_autosave(-1,config.state_auto);
reloadrom(size,filelist[selection].filename);
memfile_autoload(config.sram_auto,config.state_auto);
}
GUI_MsgBoxClose();
GUI_DeleteMenu(m);
gxTextureClose(&bar_over.texture);
gxTextureClose(&dir_icon.texture);

View File

@ -470,8 +470,6 @@ int GUI_UpdateMenu(gui_menu *menu)
gui_butn *button;
#ifdef HW_RVL
int i,x,y;
struct orient_t orient;
if (Shutdown)
{
GUI_DeleteMenu(menu);
@ -482,17 +480,17 @@ int GUI_UpdateMenu(gui_menu *menu)
else if (m_input.ir.valid)
{
/* get cursor position */
x = m_input.ir.x;
y = m_input.ir.y;
int x = m_input.ir.x;
int y = m_input.ir.y;
/* draw wiimote pointer */
WPAD_Orientation(0,&orient);
gxResetAngle(orient.roll);
gxDrawTexture(w_pointer,x,y,w_pointer->width,w_pointer->height,255);
gxResetAngle(m_input.ir.angle);
gxDrawTexture(w_pointer, x-w_pointer->width/2, y-w_pointer->height/2, w_pointer->width, w_pointer->height,255);
gxResetAngle(0.0);
/* check for valid buttons */
selected = max_buttons + 2;
int i;
for (i=0; i<max_buttons; i++)
{
button = &menu->buttons[i];
@ -707,7 +705,6 @@ int GUI_WindowPrompt(gui_menu *parent, char *title, char *items[], u8 nb_items)
#ifdef HW_RVL
int x,y;
struct orient_t orient;
#endif
/* initialize buttons data */
@ -807,9 +804,8 @@ int GUI_WindowPrompt(gui_menu *parent, char *title, char *items[], u8 nb_items)
y = m_input.ir.y;
/* draw wiimote pointer */
WPAD_Orientation(0,&orient);
gxResetAngle(orient.roll);
gxDrawTexture(w_pointer,x,y,w_pointer->width,w_pointer->height,255);
gxResetAngle(m_input.ir.angle);
gxDrawTexture(w_pointer, x-w_pointer->width/2, y-w_pointer->height/2, w_pointer->width, w_pointer->height,255);
gxResetAngle(0.0);
/* check for valid buttons */
@ -917,7 +913,6 @@ void GUI_SlideMenuTitle(gui_menu *m, int title_offset)
#ifdef HW_RVL
gui_butn *button;
int i,x,y;
struct orient_t orient;
#endif
char title[64];
@ -925,9 +920,13 @@ void GUI_SlideMenuTitle(gui_menu *m, int title_offset)
while (title_offset > 0)
{
/* update title */
strcpy(m->title,title+title_offset);
m->title[strlen(title)-title_offset-1] = 0;
/* draw menu */
GUI_DrawMenu(m);
#ifdef HW_RVL
if (m_input.ir.valid)
{
@ -936,9 +935,8 @@ void GUI_SlideMenuTitle(gui_menu *m, int title_offset)
y = m_input.ir.y;
/* draw wiimote pointer */
WPAD_Orientation(0,&orient);
gxResetAngle(orient.roll);
gxDrawTexture(w_pointer,x,y,w_pointer->width,w_pointer->height,255);
gxResetAngle(m_input.ir.angle);
gxDrawTexture(w_pointer, x-w_pointer->width/2, y-w_pointer->height/2, w_pointer->width, w_pointer->height,255);
gxResetAngle(0.0);
/* check for valid buttons */

View File

@ -1810,13 +1810,7 @@ static int loadmenu ()
{
GUI_DeleteMenu(m);
size = FileSelector(cart_rom);
if (size)
{
memfile_autosave(-1,config.state_auto);
reloadrom(size,filelist[selection].filename);
memfile_autoload(config.sram_auto,config.state_auto);
return 1;
}
if (size) return 1;
GUI_InitMenu(m);
}
break;
@ -1827,13 +1821,7 @@ static int loadmenu ()
{
GUI_DeleteMenu(m);
size = FileSelector(cart_rom);
if (size)
{
memfile_autosave(-1,config.state_auto);
reloadrom(size,filelist[selection].filename);
memfile_autoload(config.sram_auto,config.state_auto);
return 1;
}
if (size) return 1;
GUI_InitMenu(m);
}
break;
@ -1988,6 +1976,14 @@ void MainMenu (void)
memfile_autosave(config.sram_auto,-1);
#ifdef HW_RVL
/* sutdown Wii */
if (Shutdown)
{
GUI_FadeOut();
shutdown();
SYS_ResetSystem(SYS_POWEROFF, 0, 0);
}
/* wiimote pointer */
w_pointer = gxTextureOpenPNG(generic_point_png,0);
#endif

View File

@ -189,7 +189,7 @@ void gx_audio_Stop(void)
/* restart menu audio */
ASND_Init();
ASND_Pause(0);
if (Bg_music_ogg)
if (Bg_music_ogg && !Shutdown)
{
PauseOgg(0);
PlayOgg(mem_open((char *)Bg_music_ogg, Bg_music_ogg_size), 0, OGG_INFINITE_TIME);

View File

@ -100,7 +100,7 @@ static void pad_config(int chan, int max_keys)
VIDEO_SetPostRetraceCallback(gx_input_UpdateMenu);
VIDEO_Flush();
sprintf(msg, "PAD #%d is not connected !", chan+1);
GUI_WaitPrompt("ERROR",msg);
GUI_WaitPrompt("Error",msg);
return;
}
@ -329,7 +329,7 @@ static void wpad_config(u8 chan, u8 exp, u8 max_keys)
if (exp == WPAD_EXP_NONE) sprintf(msg, "WIIMOTE #%d is not connected !", chan+1);
if (exp == WPAD_EXP_NUNCHUK) sprintf(msg, "NUNCHUK #%d is not connected !", chan+1);
if (exp == WPAD_EXP_CLASSIC) sprintf(msg, "CLASSIC #%d is not connected !", chan+1);
GUI_WaitPrompt("ERROR",msg);
GUI_WaitPrompt("Error",msg);
return;
}

View File

@ -454,13 +454,13 @@ static void gxResetScale(u32 width, u32 height)
if (config.overscan)
{
/* borders are emulated */
xscale = 360 - gc_pal;
xscale = 358 - gc_pal;
yscale = vdp_pal + ((gc_pal && !config.render) ? 143 : 120);
}
else
{
/* borders are simulated (black) */
xscale = 330 - gc_pal;
xscale = 328 - gc_pal;
yscale = bitmap.viewport.h / 2;
if (vdp_pal && (!gc_pal || config.render)) yscale = yscale * 240 / 288;
else if (!vdp_pal && gc_pal && !config.render) yscale = yscale * 288 / 240;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -35,10 +35,11 @@
#include <wiiuse/wpad.h>
#endif
u8 Shutdown = 0;
#ifdef HW_RVL
/* Power Button callback */
u8 Shutdown = 0;
static void Power_Off(void)
{
Shutdown = 1;
@ -137,7 +138,7 @@ void reloadrom (int size, char *name)
void shutdown(void)
{
/* system shutdown */
memfile_autosave(config.sram_auto,config.state_auto);
memfile_autosave(-1,config.state_auto);
system_shutdown();
audio_shutdown();
free(cart_rom);
@ -175,14 +176,6 @@ int main (int argc, char *argv[])
/* initialize FAT devices */
if (fatInitDefault())
{
#ifdef HW_RVL
fatEnableReadAhead ("sd", 6, 64);
fatEnableReadAhead ("usb", 6, 64);
#else
fatEnableReadAhead ("carda", 6, 64);
fatEnableReadAhead ("cardb", 6, 64);
#endif
/* check for default directories */
DIR_ITER *dir = NULL;
@ -250,26 +243,16 @@ int main (int argc, char *argv[])
/* Main Menu request */
if (ConfigRequested)
{
/* stop video */
/* stop video & audio */
gx_video_Stop();
#ifdef HW_RVL
if (Shutdown)
{
GUI_FadeOut();
shutdown();
SYS_ResetSystem(SYS_POWEROFF, 0, 0);
}
#endif
/* stop audio */
gx_audio_Stop();
/* show menu */
MainMenu ();
ConfigRequested = 0;
/* start audio & video */
/* start video & audio */
/* always restart video first because it setup gc_pal */
gx_video_Start();
gx_audio_Start();

View File

@ -41,8 +41,6 @@ extern void legal();
extern void reloadrom (int size, char *name);
extern void shutdown();
extern u32 frameticker;
#ifdef HW_RVL
extern u8 Shutdown;
#endif
#endif /* _OSD_H_ */

View File

@ -242,7 +242,7 @@ void vdp_restore(uint8 *vdp_regs)
/* reinitialize overscan area */
bitmap.viewport.x = config.overscan ? 14 : 0;
bitmap.viewport.y = config.overscan ? (((reg[1] & 8) ? 0 : 8) + (vdp_pal ? 24 : 0)) : 0;
bitmap.viewport.changed = 1;
bitmap.viewport.changed = 2;
/* restore VDP timings */
fifo_latency = (reg[12] & 1) ? 27 : 30;