mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
Make rarch_main_data_get_ptr a public function
This commit is contained in:
parent
0330d2f245
commit
6f84857ec3
@ -1081,6 +1081,7 @@ int rarch_main_iterate(void)
|
|||||||
unsigned i;
|
unsigned i;
|
||||||
retro_input_t trigger_input;
|
retro_input_t trigger_input;
|
||||||
event_cmd_state_t cmd = {0};
|
event_cmd_state_t cmd = {0};
|
||||||
|
data_runloop_t *data = NULL;
|
||||||
runloop_t *runloop = rarch_main_get_ptr();
|
runloop_t *runloop = rarch_main_get_ptr();
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
static retro_input_t last_input = 0;
|
static retro_input_t last_input = 0;
|
||||||
@ -1110,7 +1111,9 @@ int rarch_main_iterate(void)
|
|||||||
rarch_main_iterate_linefeed_overlay();
|
rarch_main_iterate_linefeed_overlay();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (rarch_main_data_active(runloop))
|
data = rarch_main_data_get_ptr();
|
||||||
|
|
||||||
|
if (rarch_main_data_active(data))
|
||||||
rarch_main_data_iterate();
|
rarch_main_data_iterate();
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
|
@ -34,7 +34,7 @@ static char data_runloop_msg[PATH_MAX_LENGTH];
|
|||||||
|
|
||||||
static struct data_runloop *g_data_runloop;
|
static struct data_runloop *g_data_runloop;
|
||||||
|
|
||||||
static void *rarch_main_data_get_ptr(void)
|
data_runloop_t *rarch_main_data_get_ptr(void)
|
||||||
{
|
{
|
||||||
return g_data_runloop;
|
return g_data_runloop;
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ static void data_runloop_thread_deinit(data_runloop_t *runloop)
|
|||||||
|
|
||||||
void rarch_main_data_deinit(void)
|
void rarch_main_data_deinit(void)
|
||||||
{
|
{
|
||||||
data_runloop_t *runloop = (data_runloop_t*)rarch_main_data_get_ptr();
|
data_runloop_t *runloop = rarch_main_data_get_ptr();
|
||||||
|
|
||||||
if (!runloop)
|
if (!runloop)
|
||||||
return;
|
return;
|
||||||
@ -80,7 +80,7 @@ void rarch_main_data_deinit(void)
|
|||||||
|
|
||||||
void rarch_main_data_free(void)
|
void rarch_main_data_free(void)
|
||||||
{
|
{
|
||||||
data_runloop_t *runloop = (data_runloop_t*)rarch_main_data_get_ptr();
|
data_runloop_t *runloop = rarch_main_data_get_ptr();
|
||||||
|
|
||||||
if (runloop)
|
if (runloop)
|
||||||
free(runloop);
|
free(runloop);
|
||||||
@ -203,7 +203,7 @@ static void data_thread_loop(void *data)
|
|||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
static void rarch_main_data_thread_init(void)
|
static void rarch_main_data_thread_init(void)
|
||||||
{
|
{
|
||||||
data_runloop_t *runloop = (data_runloop_t*)rarch_main_data_get_ptr();
|
data_runloop_t *runloop = rarch_main_data_get_ptr();
|
||||||
|
|
||||||
if (!runloop)
|
if (!runloop)
|
||||||
return;
|
return;
|
||||||
@ -236,7 +236,7 @@ error:
|
|||||||
|
|
||||||
void rarch_main_data_iterate(void)
|
void rarch_main_data_iterate(void)
|
||||||
{
|
{
|
||||||
data_runloop_t *runloop = (data_runloop_t*)rarch_main_data_get_ptr();
|
data_runloop_t *runloop = rarch_main_data_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
(void)settings;
|
(void)settings;
|
||||||
@ -302,7 +302,7 @@ void rarch_main_data_clear_state(void)
|
|||||||
|
|
||||||
void rarch_main_data_init_queues(void)
|
void rarch_main_data_init_queues(void)
|
||||||
{
|
{
|
||||||
data_runloop_t *runloop = (data_runloop_t*)rarch_main_data_get_ptr();
|
data_runloop_t *runloop = rarch_main_data_get_ptr();
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
if (!runloop->http.msg_queue)
|
if (!runloop->http.msg_queue)
|
||||||
rarch_assert(runloop->http.msg_queue = msg_queue_new(8));
|
rarch_assert(runloop->http.msg_queue = msg_queue_new(8));
|
||||||
@ -323,7 +323,7 @@ void rarch_main_data_msg_queue_push(unsigned type,
|
|||||||
{
|
{
|
||||||
char new_msg[PATH_MAX_LENGTH];
|
char new_msg[PATH_MAX_LENGTH];
|
||||||
msg_queue_t *queue = NULL;
|
msg_queue_t *queue = NULL;
|
||||||
data_runloop_t *runloop = (data_runloop_t*)rarch_main_data_get_ptr();
|
data_runloop_t *runloop = rarch_main_data_get_ptr();
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
|
@ -165,6 +165,8 @@ void rarch_main_data_init_queues(void);
|
|||||||
|
|
||||||
bool rarch_main_data_active(data_runloop_t *runloop);
|
bool rarch_main_data_active(data_runloop_t *runloop);
|
||||||
|
|
||||||
|
data_runloop_t *rarch_main_data_get_ptr(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user