PSX: highlight current save file in browser.

This commit is contained in:
Sorgelig
2022-02-09 21:14:47 +08:00
parent 5f951d42c5
commit f45b2b5bab
3 changed files with 10 additions and 5 deletions

View File

@@ -299,12 +299,12 @@ static char Selected_F[16][1024] = {};
static char Selected_S[16][1024] = {};
static char Selected_tmp[1024] = {};
void StoreIdx_F(int idx, char *path)
void StoreIdx_F(int idx, const char *path)
{
strcpy(Selected_F[idx], path);
}
void StoreIdx_S(int idx, char *path)
void StoreIdx_S(int idx, const char *path)
{
strcpy(Selected_S[idx], path);
}

4
menu.h
View File

@@ -26,7 +26,7 @@ void open_joystick_setup();
int menu_lightgun_cb(int idx, uint16_t type, uint16_t code, int value);
int menu_allow_cfg_switch();
void StoreIdx_F(int idx, char *path);
void StoreIdx_S(int idx, char *path);
void StoreIdx_F(int idx, const char *path);
void StoreIdx_S(int idx, const char *path);
#endif

View File

@@ -188,11 +188,16 @@ static void psx_mount_save(const char *filename)
if (FileExists(buf))
{
user_io_file_mount(buf, 2);
StoreIdx_S(2, buf);
mounted = 1;
}
}
if(!mounted) user_io_file_mount("", 2);
if (!mounted)
{
user_io_file_mount("", 2);
StoreIdx_S(2, "");
}
user_io_set_download(0);
}