mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Start debugging do_iteration
This commit is contained in:
parent
3ec863d4a5
commit
37271a0d13
@ -28,23 +28,63 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
//#define DEBUG_RUNLOOP
|
||||||
|
|
||||||
void apple_start_iteration(void);
|
void apple_start_iteration(void);
|
||||||
|
|
||||||
void apple_stop_iteration(void);
|
void apple_stop_iteration(void);
|
||||||
|
|
||||||
static CFRunLoopObserverRef iterate_observer = NULL;
|
static CFRunLoopObserverRef iterate_observer = NULL;
|
||||||
|
|
||||||
static void do_iteration(void)
|
static int do_ra_iteration(void)
|
||||||
{
|
{
|
||||||
int ret = rarch_main_iterate();
|
int ret = rarch_main_iterate();
|
||||||
|
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
{
|
|
||||||
main_exit(NULL);
|
main_exit(NULL);
|
||||||
return;
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void do_iteration(CFRunLoopObserverRef observer, CFRunLoopActivity activity,
|
||||||
|
void *info)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_RUNLOOP
|
||||||
|
if (activity & kCFRunLoopEntry)
|
||||||
|
{
|
||||||
|
RARCH_LOG("RUNLOOP ENTRY, frame: %d.\n", g_runloop.frames.video.count);
|
||||||
|
}
|
||||||
|
if (activity & kCFRunLoopBeforeTimers)
|
||||||
|
{
|
||||||
|
RARCH_LOG("RUNLOOP BEFORE TIMERS, frame: %d.\n", g_runloop.frames.video.count);
|
||||||
|
}
|
||||||
|
if (activity & kCFRunLoopAfterWaiting)
|
||||||
|
{
|
||||||
|
RARCH_LOG("RUNLOOP AFTER WAITING, frame: %d.\n", g_runloop.frames.video.count);
|
||||||
|
}
|
||||||
|
if (activity & kCFRunLoopBeforeSources)
|
||||||
|
{
|
||||||
|
RARCH_LOG("RUNLOOP BEFORE SOURCES, frame: %d\n.", g_runloop.frames.video.count);
|
||||||
|
}
|
||||||
|
if (activity & kCFRunLoopExit)
|
||||||
|
{
|
||||||
|
RARCH_LOG("RUNLOOP EXIT, frame: %d.\n", g_runloop.frames.video.count);
|
||||||
|
}
|
||||||
|
if (activity & kCFRunLoopAllActivities)
|
||||||
|
{
|
||||||
|
RARCH_LOG("RUNLOOP ALL ACTIVITIES, frame: %d.\n", g_runloop.frames.video.count);
|
||||||
|
}
|
||||||
|
if (activity & kCFRunLoopBeforeWaiting)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_RUNLOOP
|
||||||
|
RARCH_LOG("RUNLOOP BEFORE WAITING, frame: %d.\n", g_runloop.frames.video.count);
|
||||||
|
#endif
|
||||||
|
int ret = do_ra_iteration();
|
||||||
|
if (ret == -1)
|
||||||
|
return;
|
||||||
CFRunLoopWakeUp(CFRunLoopGetMain());
|
CFRunLoopWakeUp(CFRunLoopGetMain());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* TODO/FIXME
|
/* TODO/FIXME
|
||||||
I am almost positive that this is not necessary and is actually a
|
I am almost positive that this is not necessary and is actually a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user