From 76c392718fb003b48e26c361c838422ab7130492 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 9 Jan 2015 18:40:33 +0100 Subject: [PATCH] Create runloop.h --- frontend/frontend.c | 1 + frontend/platform/platform_apple.c | 1 + general.h | 15 ----------- runloop.c | 1 + runloop.h | 43 ++++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 runloop.h diff --git a/frontend/frontend.c b/frontend/frontend.c index 49cb4442e0..f937cbf92e 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -20,6 +20,7 @@ #include "../general.h" #include "../settings.h" #include "../retroarch.h" +#include "../runloop.h" #include #if defined(RARCH_CONSOLE) || defined(RARCH_MOBILE) diff --git a/frontend/platform/platform_apple.c b/frontend/platform/platform_apple.c index dc9bd67ff4..3928ada56a 100644 --- a/frontend/platform/platform_apple.c +++ b/frontend/platform/platform_apple.c @@ -18,6 +18,7 @@ #include "../../apple/common/CFExtensions.h" #include "../frontend.h" +#include "../runloop.h" #include "../../menu/disp/ios.h" #include diff --git a/general.h b/general.h index 1295c63f9c..6ac7b01ef8 100644 --- a/general.h +++ b/general.h @@ -846,21 +846,6 @@ void rarch_main_init_wrap(const struct rarch_main_wrap *args, int rarch_main_init(int argc, char *argv[]); -/** - * rarch_main_iterate: - * - * Run Libretro/RetroArch for one frame. - * - * Returns: 0 if we want to indicate to the caller that - * any top-level runtime loop needs to be forcibly woken up. - * - * 1 if we have to wait until button input in order - * to wake up the loop. - * - * -1 if we forcibly quit out of the RetroArch iteration loop. - **/ -int rarch_main_iterate(void); - void rarch_playlist_load_content(content_playlist_t *playlist, unsigned index); diff --git a/runloop.c b/runloop.c index cf8497b4a0..8f054b4680 100644 --- a/runloop.c +++ b/runloop.c @@ -22,6 +22,7 @@ #include "retroarch_logger.h" #include "intl/intl.h" #include "retroarch.h" +#include "runloop.h" #ifdef HAVE_MENU #include "menu/menu_common.h" diff --git a/runloop.h b/runloop.h new file mode 100644 index 0000000000..b46abe2b10 --- /dev/null +++ b/runloop.h @@ -0,0 +1,43 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2015 - Daniel De Matteis + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#ifndef __RETROARCH_RUNLOOP_H +#define __RETROARCH_RUNLOOP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * rarch_main_iterate: + * + * Run Libretro/RetroArch for one frame. + * + * Returns: 0 if we want to indicate to the caller that + * any top-level runtime loop needs to be forcibly woken up. + * + * 1 if we have to wait until button input in order + * to wake up the loop. + * + * -1 if we forcibly quit out of the RetroArch iteration loop. + **/ +int rarch_main_iterate(void); + +#ifdef __cplusplus +} +#endif + +#endif