(runloop.c) Turn some functions static

This commit is contained in:
twinaphex 2015-11-30 23:29:46 +01:00
parent 809f8da955
commit 952ecf22cd
3 changed files with 20 additions and 25 deletions

View File

@ -1115,8 +1115,7 @@ void rarch_main_free(void)
runloop_ctl(RUNLOOP_CTL_STATE_FREE, NULL);
runloop_ctl(RUNLOOP_CTL_GLOBAL_FREE, NULL);
rarch_main_data_deinit();
runloop_ctl(RUNLOOP_CTL_DATA_DEINIT, NULL);
config_free();
}

View File

@ -359,13 +359,16 @@ global_t *global_get_ptr(void)
return &g_extern;
}
static void rarch_main_data_clear_state(void)
{
runloop_ctl(RUNLOOP_CTL_DATA_DEINIT, NULL);
rarch_task_init();
}
bool runloop_ctl(enum runloop_ctl_state state, void *data)
{
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
#ifdef HAVE_NETPLAY
driver_t *driver = driver_get_ptr();
#endif
switch (state)
{
@ -453,14 +456,17 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
event_command(EVENT_CMD_VOLUME_DOWN);
#ifdef HAVE_NETPLAY
if (driver->netplay_data)
{
if (cmd->netplay_flip_pressed)
event_command(EVENT_CMD_NETPLAY_FLIP_PLAYERS);
driver_t *driver = driver_get_ptr();
if (driver->netplay_data)
{
if (cmd->netplay_flip_pressed)
event_command(EVENT_CMD_NETPLAY_FLIP_PLAYERS);
if (cmd->fullscreen_toggle)
event_command(EVENT_CMD_FULLSCREEN_TOGGLE);
break;
if (cmd->fullscreen_toggle)
event_command(EVENT_CMD_FULLSCREEN_TOGGLE);
break;
}
}
#endif
if (!runloop_ctl(RUNLOOP_CTL_CHECK_IDLE_STATE, data))
@ -725,6 +731,9 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
case RUNLOOP_CTL_SET_EXEC:
main_exec = true;
break;
case RUNLOOP_CTL_DATA_DEINIT:
rarch_task_deinit();
break;
default:
return false;
}
@ -1116,21 +1125,11 @@ end:
return 0;
}
void rarch_main_data_deinit(void)
{
rarch_task_deinit();
}
void rarch_main_data_iterate(void)
{
rarch_task_check();
}
void rarch_main_data_clear_state(void)
{
rarch_main_data_deinit();
rarch_task_init();
}
void data_runloop_osd_msg(const char *msg, size_t len)
{

View File

@ -58,6 +58,7 @@ enum runloop_ctl_state
RUNLOOP_CTL_SET_PERFCNT_ENABLE,
RUNLOOP_CTL_UNSET_PERFCNT_ENABLE,
RUNLOOP_CTL_IS_PERFCNT_ENABLE,
RUNLOOP_CTL_DATA_DEINIT,
/* Checks for state changes in this frame. */
RUNLOOP_CTL_CHECK_STATE,
RUNLOOP_CTL_CHECK_MOVIE,
@ -329,12 +330,8 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data);
typedef int (*transfer_cb_t)(void *data, size_t len);
void rarch_main_data_clear_state(void);
void rarch_main_data_iterate(void);
void rarch_main_data_deinit(void);
#ifdef __cplusplus
}
#endif