From 49e9602dceff7aa9f771c93a0bc3c21cbb9ee79a Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 5 Oct 2023 00:54:29 +0300 Subject: [PATCH] standalone: load per-game config from cmd line too notaz/pcsx_rearmed#163 --- frontend/main.c | 2 ++ frontend/menu.c | 2 +- frontend/menu.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) 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, -- 2.39.5