diff --git a/frontend/frontend_console.c b/frontend/frontend_console.c index 1e1074b57f..e43b9d0099 100644 --- a/frontend/frontend_console.c +++ b/frontend/frontend_console.c @@ -22,6 +22,8 @@ #include "../config.def.h" #include "menu/rmenu.h" +char input_path[1024]; + static inline void inl_logger_init(void) { #if defined(HAVE_LOGGER) @@ -140,7 +142,14 @@ int rarch_main(int argc, char *argv[]) /* FIXME - when dummy loading becomes possible perhaps change this param */ init_libretro_sym(false); - system_post_init(); +#ifdef GEKKO + /* Per-core input config loading */ + char core_name[64]; + + libretro_get_current_core_pathname(core_name, sizeof(core_name)); + snprintf(input_path, sizeof(input_path), "%s/%s.cfg", default_paths.input_presets_dir, core_name); + config_read_keybinds(input_path); +#endif menu_init(); @@ -214,7 +223,10 @@ int rarch_main(int argc, char *argv[]) config_save_file(g_extern.config_path); - system_deinit_save(); +#ifdef GEKKO + /* Per-core input config saving */ + config_save_keybinds(input_path); +#endif if (g_extern.main_is_init) rarch_main_deinit(); diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index d665c3e4d7..d788e5e555 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -3180,6 +3180,11 @@ rgui_handle_t *rgui_init(void) driver.video_poke->set_texture_frame(driver.video_data, menu_texture->pixels, true, menu_texture->width, menu_texture->height, 1.0f); +#ifdef HAVE_OSKUTIL + oskutil_params *osk = &g_extern.console.misc.oskutil_handle; + oskutil_init(osk, 0); +#endif + return rgui; } diff --git a/frontend/platform/platform_gx.c b/frontend/platform/platform_gx.c index a8de578f74..fbc86f146b 100644 --- a/frontend/platform/platform_gx.c +++ b/frontend/platform/platform_gx.c @@ -151,9 +151,6 @@ enum GX_DEVICE_END }; -rgui_handle_t *rgui; -char input_path[1024]; - #if defined(HAVE_LOGGER) || defined(HAVE_FILE_LOGGER) static devoptab_t dotab_stdout = { "stdout", // device name @@ -347,21 +344,6 @@ static void system_deinit(void) } #ifndef IS_SALAMANDER - -static void system_post_init(void) -{ - char core_name[64]; - - libretro_get_current_core_pathname(core_name, sizeof(core_name)); - snprintf(input_path, sizeof(input_path), "%s/%s.cfg", default_paths.input_presets_dir, core_name); - config_read_keybinds(input_path); -} - -static void system_deinit_save(void) -{ - config_save_keybinds(input_path); -} - static void system_process_args(int argc, char *argv[]) { if (argc > 2 && argv[1] != NULL && argv[2] != NULL) diff --git a/frontend/platform/platform_ps3.c b/frontend/platform/platform_ps3.c index 4d19f0a447..1f6be0826b 100644 --- a/frontend/platform/platform_ps3.c +++ b/frontend/platform/platform_ps3.c @@ -329,10 +329,8 @@ static void system_init(void) #ifndef __PSL1GHT__ sceNpInit(NP_POOL_SIZE, np_pool); #endif -} -static void system_post_init(void) -{ +#ifndef IS_SALAMANDER #if (CELL_SDK_VERSION > 0x340000) && !defined(__PSL1GHT__) #ifdef HAVE_SYSMODULES cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_SCREENSHOT); @@ -346,14 +344,10 @@ static void system_post_init(void) cellScreenShotEnable(); #endif #ifdef HAVE_SYSUTILS - if (g_extern.lifecycle_mode_state & (1ULL << MODE_AUDIO_CUSTOM_BGM_ENABLE)) - cellSysutilEnableBgmPlayback(); + //if (g_extern.lifecycle_mode_state & (1ULL << MODE_AUDIO_CUSTOM_BGM_ENABLE)) + cellSysutilEnableBgmPlayback(); #endif #endif - -#ifdef HAVE_OSKUTIL - oskutil_params *osk = &g_extern.console.misc.oskutil_handle; - oskutil_init(osk, 0); #endif } @@ -406,10 +400,6 @@ static void system_deinit(void) #endif } -static void system_deinit_save(void) -{ -} - static void system_exitspawn(void) { #ifdef HAVE_RARCH_EXEC diff --git a/frontend/platform/platform_psp.c b/frontend/platform/platform_psp.c index 6fe86af6c5..df5d6c76e3 100644 --- a/frontend/platform/platform_psp.c +++ b/frontend/platform/platform_psp.c @@ -97,20 +97,12 @@ static void system_init(void) setup_callback(); } -static void system_post_init(void) -{ -} - static void system_process_args(int argc, char *argv[]) { (void)argc; (void)argv; } -static void system_deinit_save(void) -{ -} - static void system_deinit(void) { #ifdef HAVE_FILE_LOGGER diff --git a/frontend/platform/platform_xdk.c b/frontend/platform/platform_xdk.c index 37a642435e..75086f7f18 100644 --- a/frontend/platform/platform_xdk.c +++ b/frontend/platform/platform_xdk.c @@ -256,10 +256,6 @@ static void get_environment_settings(int argc, char *argv[]) #endif } -static void system_post_init(void) -{ -} - static void system_init(void) { #if defined (HAVE_LOGGER) || defined(HAVE_FILE_LOGGER) @@ -290,10 +286,6 @@ static void system_deinit(void) #endif } -static void system_deinit_save(void) -{ -} - static void system_exitspawn(void) { #ifdef IS_SALAMANDER