menu: remember path of FC option.

This commit is contained in:
sorgelig
2021-05-05 01:25:19 +08:00
parent 9a37720cad
commit f208ccf3e7
3 changed files with 9 additions and 1 deletions

View File

@@ -293,6 +293,11 @@ static char Selected_F[16][1024] = {};
static char Selected_S[8][1024] = {};
static char Selected_tmp[1024] = {};
void StoreIdx_F(int idx, char *path)
{
strcpy(Selected_F[idx], path);
}
static char selPath[1024] = {};
static int changeDir(char *dir)

1
menu.h
View File

@@ -23,5 +23,6 @@ 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);
#endif

View File

@@ -624,7 +624,9 @@ static void parse_config()
sprintf(str, "%s.f%c", user_io_get_core_name(), p[2]);
if (FileLoadConfig(str, str, sizeof(str)) && str[0])
{
user_io_file_tx(str, p[2] - '0');
int idx = p[2] - '0';
StoreIdx_F(idx, str);
user_io_file_tx(str, idx);
}
}
}