From: notaz Date: Wed, 4 Oct 2023 21:54:29 +0000 (+0300) Subject: standalone: load per-game config from cmd line too X-Git-Tag: r24~131 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49e9602dceff7aa9f771c93a0bc3c21cbb9ee79a;p=pcsx_rearmed.git standalone: load per-game config from cmd line too notaz/pcsx_rearmed#163 --- diff --git a/frontend/main.c b/frontend/main.c index 34f68d40..05e4d55e 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -710,6 +710,8 @@ int main(int argc, char *argv[]) } if (ready_to_go) { + if (menu_load_config(1) != 0) + menu_load_config(0); menu_prepare_emu(); // If a state has been specified, then load that diff --git a/frontend/menu.c b/frontend/menu.c index f33ac33f..6bc20c50 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -589,7 +589,7 @@ static void parse_str_val(char *cval, const char *src) static void keys_load_all(const char *cfg); -static int menu_load_config(int is_game) +int menu_load_config(int is_game) { char cfgfile[MAXPATHLEN]; int i, ret = -1; diff --git a/frontend/menu.h b/frontend/menu.h index 8f5acda7..9d60e882 100644 --- a/frontend/menu.h +++ b/frontend/menu.h @@ -7,6 +7,7 @@ void menu_loop(void); void menu_finish(void); void menu_notify_mode_change(int w, int h, int bpp); +int menu_load_config(int is_game); enum g_opts_opts { OPT_SHOWFPS = 1 << 0,