mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-29 03:15:29 +01:00
fixed stupid bug introduced in previous revision [crash when loading from history]
This commit is contained in:
parent
81054b0420
commit
11e600e933
@ -139,9 +139,6 @@ int FAT_LoadFile(u8 *buffer, u32 selection)
|
|||||||
/* Loading from history */
|
/* Loading from history */
|
||||||
if(fatType == TYPE_RECENT)
|
if(fatType == TYPE_RECENT)
|
||||||
{
|
{
|
||||||
/* file browser should be reinitialized */
|
|
||||||
fatType = -1;
|
|
||||||
|
|
||||||
/* full filename */
|
/* full filename */
|
||||||
sprintf(fname,"%s%s",history.entries[selection].filepath,filelist[selection].filename);
|
sprintf(fname,"%s%s",history.entries[selection].filepath,filelist[selection].filename);
|
||||||
|
|
||||||
@ -175,6 +172,10 @@ int FAT_LoadFile(u8 *buffer, u32 selection)
|
|||||||
else
|
else
|
||||||
history_add_file(fatdir, filelist[selection].filename);
|
history_add_file(fatdir, filelist[selection].filename);
|
||||||
|
|
||||||
|
/* file browser should be reinitialized */
|
||||||
|
if(fatType == TYPE_RECENT)
|
||||||
|
fatType = -1;
|
||||||
|
|
||||||
/* Read first data chunk */
|
/* Read first data chunk */
|
||||||
unsigned char temp[FATCHUNK];
|
unsigned char temp[FATCHUNK];
|
||||||
fread(temp, FATCHUNK, 1, sdfile);
|
fread(temp, FATCHUNK, 1, sdfile);
|
||||||
|
@ -2310,10 +2310,14 @@ static int savemenu(void)
|
|||||||
|
|
||||||
/* SRAM disabled */
|
/* SRAM disabled */
|
||||||
if (sram.on)
|
if (sram.on)
|
||||||
|
{
|
||||||
m->buttons[0].state |= BUTTON_ACTIVE;
|
m->buttons[0].state |= BUTTON_ACTIVE;
|
||||||
|
m->buttons[1].shift[0] = 1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m->buttons[0].state &= ~BUTTON_ACTIVE;
|
m->buttons[0].state &= ~BUTTON_ACTIVE;
|
||||||
|
m->buttons[1].shift[0] = 0;
|
||||||
if (m->selected == 0)
|
if (m->selected == 0)
|
||||||
m->selected = 1;
|
m->selected = 1;
|
||||||
}
|
}
|
||||||
@ -2468,7 +2472,7 @@ static int savemenu(void)
|
|||||||
m->buttons[7].state &= ~BUTTON_ACTIVE;
|
m->buttons[7].state &= ~BUTTON_ACTIVE;
|
||||||
m->buttons[6].shift[0] = 0;
|
m->buttons[6].shift[0] = 0;
|
||||||
m->buttons[6].shift[1] = 2;
|
m->buttons[6].shift[1] = 2;
|
||||||
m->buttons[8].shift[0] = 2;
|
m->buttons[8].shift[0] = (slot > 0) ? 2 : 0;
|
||||||
m->selected = 8;
|
m->selected = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user