mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
(OSK) Move runtime state (OSK callbacks) to g_extern
This commit is contained in:
parent
683c6432cd
commit
6828183b64
@ -994,17 +994,17 @@ static int menu_iterate_func(void *data, unsigned action)
|
||||
|
||||
#ifdef HAVE_OSK
|
||||
// process pending osk init callback
|
||||
if (g_settings.osk.cb_init != NULL)
|
||||
if (g_extern.osk.cb_init != NULL)
|
||||
{
|
||||
if (g_settings.osk.cb_init(driver.osk_data))
|
||||
g_settings.osk.cb_init = NULL;
|
||||
if (g_extern.osk.cb_init(driver.osk_data))
|
||||
g_extern.osk.cb_init = NULL;
|
||||
}
|
||||
|
||||
// process pending osk callback
|
||||
if (g_settings.osk.cb_callback != NULL)
|
||||
if (g_extern.osk.cb_callback != NULL)
|
||||
{
|
||||
if (g_settings.osk.cb_callback(driver.osk_data))
|
||||
g_settings.osk.cb_callback = NULL;
|
||||
if (g_extern.osk.cb_callback(driver.osk_data))
|
||||
g_extern.osk.cb_callback = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1344,8 +1344,8 @@ int menu_set_settings(void *data, unsigned setting, unsigned action)
|
||||
#if defined(HAVE_RSOUND) && defined(HAVE_OSK)
|
||||
if (action == RGUI_ACTION_OK)
|
||||
{
|
||||
g_settings.osk.cb_init = osk_callback_enter_rsound_init;
|
||||
g_settings.osk.cb_callback = osk_callback_enter_rsound;
|
||||
g_extern.osk.cb_init = osk_callback_enter_rsound_init;
|
||||
g_extern.osk.cb_callback = osk_callback_enter_rsound;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
11
general.h
11
general.h
@ -194,9 +194,6 @@ struct settings
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
uint64_t state;
|
||||
bool (*cb_init)(void *data);
|
||||
bool (*cb_callback)(void *data);
|
||||
} osk;
|
||||
#endif
|
||||
|
||||
@ -512,6 +509,14 @@ struct global
|
||||
} bsv;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OSK
|
||||
struct
|
||||
{
|
||||
bool (*cb_init)(void *data);
|
||||
bool (*cb_callback)(void *data);
|
||||
} osk;
|
||||
#endif
|
||||
|
||||
bool sram_load_disable;
|
||||
bool sram_save_disable;
|
||||
bool use_sram;
|
||||
|
Loading…
Reference in New Issue
Block a user