mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-29 04:31:49 +01:00
fixed ROM file selector
This commit is contained in:
parent
61e4873c07
commit
0a83f8ccdd
@ -58,7 +58,6 @@ void ggenie_init(void)
|
||||
|
||||
#ifdef LSB_FIRST
|
||||
/* Byteswap ROM */
|
||||
int i;
|
||||
uint8 temp;
|
||||
for(i = 0; i < 0x8000; i += 2)
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ void DVD_ClearDirectory(void)
|
||||
int DVD_UpdateDirectory(bool go_up, u64 offset, u32 length)
|
||||
{
|
||||
/* root has no parent directory */
|
||||
if (go_up && (basedir == rootdir))
|
||||
if ((basedir == rootdir) && (go_up || (offset == basedir)))
|
||||
return 0;
|
||||
|
||||
/* simply update current root directory */
|
||||
|
@ -48,7 +48,8 @@ void FAT_ClearDirectory(void)
|
||||
/***************************************************************************
|
||||
* FAT_UpdateDirectory
|
||||
*
|
||||
* Update FAT current root directory
|
||||
* Update FAT current directory
|
||||
* return zero if exiting root
|
||||
***************************************************************************/
|
||||
int FAT_UpdateDirectory(bool go_up, char *dirname)
|
||||
{
|
||||
|
@ -484,12 +484,8 @@ int FileSelector(unsigned char *buffer, bool useFAT)
|
||||
/* ensure we are in focus area */
|
||||
if (go_up || (m->selected < m->max_buttons))
|
||||
{
|
||||
/*** This is directory ***/
|
||||
if (filelist[selection].flags)
|
||||
if (go_up || filelist[selection].flags)
|
||||
{
|
||||
/* force going up */
|
||||
go_up = (selection == 0);
|
||||
|
||||
/* get new directory */
|
||||
if (useFAT)
|
||||
ret = FAT_UpdateDirectory(go_up,filelist[selection].filename);
|
||||
@ -528,16 +524,6 @@ int FileSelector(unsigned char *buffer, bool useFAT)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*** This is a file ***/
|
||||
else
|
||||
{
|
||||
/* root directory ? */
|
||||
if (go_up)
|
||||
{
|
||||
GUI_DeleteMenu(m);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Load ROM file from device */
|
||||
@ -566,7 +552,6 @@ int FileSelector(unsigned char *buffer, bool useFAT)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ClearSelector(u32 max)
|
||||
|
Loading…
Reference in New Issue
Block a user