diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h index 209f127c44..8affd86349 100644 --- a/frontend/menu/menu_common.h +++ b/frontend/menu/menu_common.h @@ -244,6 +244,7 @@ typedef struct #ifdef HAVE_OSKUTIL unsigned osk_param; + oskutil_params oskutil_handle; bool (*osk_init)(void *data); bool (*osk_callback)(void *data); #endif diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index 11474fc17b..15df2e330e 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -741,7 +741,7 @@ static bool osk_callback_enter_rsound(void *data) { RARCH_LOG("OSK - Applying input data.\n"); char tmp_str[256]; - int num = wcstombs(tmp_str, g_extern.console.misc.oskutil_handle.text_buf, sizeof(tmp_str)); + int num = wcstombs(tmp_str, rgui->oskutil_handle.text_buf, sizeof(tmp_str)); tmp_str[num] = 0; strlcpy(g_settings.audio.device, tmp_str, sizeof(g_settings.audio.device)); goto do_exit; @@ -759,9 +759,9 @@ do_exit: static bool osk_callback_enter_rsound_init(void *data) { - oskutil_write_initial_message(&g_extern.console.misc.oskutil_handle, L"192.168.1.1"); - oskutil_write_message(&g_extern.console.misc.oskutil_handle, L"Enter IP address for the RSound Server."); - oskutil_start(&g_extern.console.misc.oskutil_handle); + oskutil_write_initial_message(&rgui->oskutil_handle, L"192.168.1.1"); + oskutil_write_message(&rgui->oskutil_handle, L"Enter IP address for the RSound Server."); + oskutil_start(&rgui->oskutil_handle); return true; } @@ -773,7 +773,7 @@ static bool osk_callback_enter_filename(void *data) RARCH_LOG("OSK - Applying input data.\n"); char tmp_str[256]; char filepath[PATH_MAX]; - int num = wcstombs(tmp_str, g_extern.console.misc.oskutil_handle.text_buf, sizeof(tmp_str)); + int num = wcstombs(tmp_str, rgui->oskutil_handle.text_buf, sizeof(tmp_str)); tmp_str[num] = 0; switch(rgui->osk_param) @@ -806,9 +806,9 @@ do_exit: static bool osk_callback_enter_filename_init(void *data) { - oskutil_write_initial_message(&g_extern.console.misc.oskutil_handle, L"example"); - oskutil_write_message(&g_extern.console.misc.oskutil_handle, L"Enter filename for preset"); - oskutil_start(&g_extern.console.misc.oskutil_handle); + oskutil_write_initial_message(&rgui->oskutil_handle, L"example"); + oskutil_write_message(&rgui->oskutil_handle, L"Enter filename for preset"); + oskutil_start(&rgui->oskutil_handle); return true; } @@ -3029,7 +3029,7 @@ rgui_handle_t *rgui_init(void) #ifdef HAVE_OSKUTIL - oskutil_params *osk = &g_extern.console.misc.oskutil_handle; + oskutil_params *osk = &rgui->oskutil_handle; oskutil_init(osk, 0); #endif diff --git a/frontend/platform/platform_ps3.c b/frontend/platform/platform_ps3.c index ec2dadd0ce..93a855ec84 100644 --- a/frontend/platform/platform_ps3.c +++ b/frontend/platform/platform_ps3.c @@ -143,7 +143,7 @@ static void callback_sysutil_exit(uint64_t status, uint64_t param, void *userdat #ifndef IS_SALAMANDER #ifdef HAVE_OSKUTIL - oskutil_params *osk = &g_extern.console.misc.oskutil_handle; + oskutil_params *osk = &rgui->oskutil_handle; #endif gl_t *gl = driver.video_data; @@ -181,7 +181,7 @@ static void callback_sysutil_exit(uint64_t status, uint64_t param, void *userdat break; case CELL_SYSUTIL_OSKDIALOG_UNLOADED: RARCH_LOG("CELL_SYSUTIL_OSKDIALOG_UNLOADED.\n"); - sys_memory_container_destroy(g_extern.console.misc.oskutil_handle.containerid); + sys_memory_container_destroy(osk->containerid); break; #endif } diff --git a/general.h b/general.h index 30f3be9ddc..d64d522283 100644 --- a/general.h +++ b/general.h @@ -100,7 +100,6 @@ enum menu_enums { MODE_GAME = 0, MODE_LOAD_GAME, - MODE_LOAD_FIRST_SHADER, MODE_INIT, MODE_MENU, MODE_MENU_WIDESCREEN, @@ -572,13 +571,6 @@ struct global unsigned volume_level; #endif } sound; - -#ifdef HAVE_OSKUTIL - struct - { - oskutil_params oskutil_handle; - } misc; -#endif } console; uint64_t lifecycle_state;