diff --git a/menu.cpp b/menu.cpp index 07aadcb..a738c6c 100644 --- a/menu.cpp +++ b/menu.cpp @@ -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) diff --git a/menu.h b/menu.h index 1b23baf..1936511 100644 --- a/menu.h +++ b/menu.h @@ -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 diff --git a/user_io.cpp b/user_io.cpp index 3fb7de1..44b7745 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -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); } } }