mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
Get rid of some RARCH_CTL_ commands
This commit is contained in:
parent
cc3a339011
commit
da68e73f94
@ -28,6 +28,7 @@
|
|||||||
#include "font_driver.h"
|
#include "font_driver.h"
|
||||||
|
|
||||||
#include "../retroarch.h"
|
#include "../retroarch.h"
|
||||||
|
#include "../runloop.h"
|
||||||
#include "../verbosity.h"
|
#include "../verbosity.h"
|
||||||
|
|
||||||
static void *video_thread_init_never_call(const video_info_t *video,
|
static void *video_thread_init_never_call(const video_info_t *video,
|
||||||
@ -492,12 +493,15 @@ static void video_thread_loop(void *data)
|
|||||||
static bool video_thread_alive(void *data)
|
static bool video_thread_alive(void *data)
|
||||||
{
|
{
|
||||||
bool ret;
|
bool ret;
|
||||||
|
uint32_t runloop_flags;
|
||||||
thread_video_t *thr = (thread_video_t*)data;
|
thread_video_t *thr = (thread_video_t*)data;
|
||||||
|
|
||||||
if (!thr)
|
if (!thr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
runloop_flags = runloop_get_flags();
|
||||||
|
|
||||||
if (retroarch_ctl(RARCH_CTL_IS_PAUSED, NULL))
|
if (runloop_flags & RUNLOOP_FLAG_PAUSED)
|
||||||
{
|
{
|
||||||
thread_packet_t pkt;
|
thread_packet_t pkt;
|
||||||
pkt.type = CMD_ALIVE;
|
pkt.type = CMD_ALIVE;
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
#include "../../configuration.h"
|
#include "../../configuration.h"
|
||||||
#include "../../retroarch.h"
|
#include "../../retroarch.h"
|
||||||
|
#include "../../runloop.h"
|
||||||
|
|
||||||
#define MAX_TOUCH 16
|
#define MAX_TOUCH 16
|
||||||
#define MAX_NUM_KEYBOARDS 3
|
#define MAX_NUM_KEYBOARDS 3
|
||||||
@ -1491,7 +1492,8 @@ static void android_input_poll(void *data)
|
|||||||
|
|
||||||
if (android_app->reinitRequested != 0)
|
if (android_app->reinitRequested != 0)
|
||||||
{
|
{
|
||||||
if (retroarch_ctl(RARCH_CTL_IS_PAUSED, NULL))
|
uint32_t runloop_flags = runloop_get_flags();
|
||||||
|
if (runloop_flags & RUNLOOP_FLAG_PAUSED)
|
||||||
command_event(CMD_EVENT_REINIT, NULL);
|
command_event(CMD_EVENT_REINIT, NULL);
|
||||||
android_app_write_cmd(android_app, APP_CMD_REINIT_DONE);
|
android_app_write_cmd(android_app, APP_CMD_REINIT_DONE);
|
||||||
return;
|
return;
|
||||||
@ -1515,7 +1517,8 @@ bool android_run_events(void *data)
|
|||||||
|
|
||||||
if (android_app->reinitRequested != 0)
|
if (android_app->reinitRequested != 0)
|
||||||
{
|
{
|
||||||
if (retroarch_ctl(RARCH_CTL_IS_PAUSED, NULL))
|
uint32_t runloop_flags = runloop_get_flags();
|
||||||
|
if (runloop_flags & RUNLOOP_FLAG_PAUSED)
|
||||||
command_event(CMD_EVENT_REINIT, NULL);
|
command_event(CMD_EVENT_REINIT, NULL);
|
||||||
android_app_write_cmd(android_app, APP_CMD_REINIT_DONE);
|
android_app_write_cmd(android_app, APP_CMD_REINIT_DONE);
|
||||||
}
|
}
|
||||||
|
@ -5820,8 +5820,6 @@ bool retroarch_ctl(enum rarch_ctl_state state, void *data)
|
|||||||
sizeof(input_st->analog_requested));
|
sizeof(input_st->analog_requested));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RARCH_CTL_IS_IDLE:
|
|
||||||
return ((runloop_st->flags & RUNLOOP_FLAG_IDLE) > 0);
|
|
||||||
case RARCH_CTL_SET_IDLE:
|
case RARCH_CTL_SET_IDLE:
|
||||||
{
|
{
|
||||||
bool *ptr = (bool*)data;
|
bool *ptr = (bool*)data;
|
||||||
@ -5844,8 +5842,6 @@ bool retroarch_ctl(enum rarch_ctl_state state, void *data)
|
|||||||
runloop_st->flags &= ~RUNLOOP_FLAG_PAUSED;
|
runloop_st->flags &= ~RUNLOOP_FLAG_PAUSED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RARCH_CTL_IS_PAUSED:
|
|
||||||
return ((runloop_st->flags & RUNLOOP_FLAG_PAUSED) > 0);
|
|
||||||
case RARCH_CTL_SET_SHUTDOWN:
|
case RARCH_CTL_SET_SHUTDOWN:
|
||||||
runloop_st->flags |= RUNLOOP_FLAG_SHUTDOWN_INITIATED;
|
runloop_st->flags |= RUNLOOP_FLAG_SHUTDOWN_INITIATED;
|
||||||
break;
|
break;
|
||||||
|
@ -81,7 +81,6 @@ enum rarch_ctl_state
|
|||||||
|
|
||||||
RARCH_CTL_HAS_SET_SUBSYSTEMS,
|
RARCH_CTL_HAS_SET_SUBSYSTEMS,
|
||||||
|
|
||||||
RARCH_CTL_IS_IDLE,
|
|
||||||
RARCH_CTL_SET_IDLE,
|
RARCH_CTL_SET_IDLE,
|
||||||
|
|
||||||
RARCH_CTL_SET_WINDOWED_SCALE,
|
RARCH_CTL_SET_WINDOWED_SCALE,
|
||||||
@ -96,7 +95,6 @@ enum rarch_ctl_state
|
|||||||
RARCH_CTL_SET_MISSING_BIOS,
|
RARCH_CTL_SET_MISSING_BIOS,
|
||||||
RARCH_CTL_UNSET_MISSING_BIOS,
|
RARCH_CTL_UNSET_MISSING_BIOS,
|
||||||
|
|
||||||
RARCH_CTL_IS_PAUSED,
|
|
||||||
RARCH_CTL_SET_PAUSED,
|
RARCH_CTL_SET_PAUSED,
|
||||||
|
|
||||||
RARCH_CTL_SET_SHUTDOWN,
|
RARCH_CTL_SET_SHUTDOWN,
|
||||||
|
@ -81,6 +81,7 @@ static void ui_companion_cocoatouch_event_command(
|
|||||||
static void rarch_draw_observer(CFRunLoopObserverRef observer,
|
static void rarch_draw_observer(CFRunLoopObserverRef observer,
|
||||||
CFRunLoopActivity activity, void *info)
|
CFRunLoopActivity activity, void *info)
|
||||||
{
|
{
|
||||||
|
uint32_t runloop_flags;
|
||||||
int ret = runloop_iterate();
|
int ret = runloop_iterate();
|
||||||
|
|
||||||
task_queue_check();
|
task_queue_check();
|
||||||
@ -93,9 +94,9 @@ static void rarch_draw_observer(CFRunLoopObserverRef observer,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retroarch_ctl(RARCH_CTL_IS_IDLE, NULL))
|
runloop_flags = runloop_get_flags();
|
||||||
return;
|
if (!(runloop_flags & RUNLOOP_FLAG_IDLE))
|
||||||
CFRunLoopWakeUp(CFRunLoopGetMain());
|
CFRunLoopWakeUp(CFRunLoopGetMain());
|
||||||
}
|
}
|
||||||
|
|
||||||
apple_frontend_settings_t apple_frontend_settings;
|
apple_frontend_settings_t apple_frontend_settings;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user