Merge runloop.c and retroarch.c
This commit is contained in:
parent
cc9e951b44
commit
42ebe7a7ad
|
@ -160,7 +160,6 @@ OBJ += frontend/frontend.o \
|
|||
command.o \
|
||||
msg_hash.o \
|
||||
intl/msg_hash_us.o \
|
||||
runloop.o \
|
||||
$(LIBRETRO_COMM_DIR)/queues/task_queue.o \
|
||||
tasks/task_content.o \
|
||||
tasks/task_save.o \
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include "../driver.h"
|
||||
#include "../configuration.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../list_special.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "../configuration.h"
|
||||
#include "../driver.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../list_special.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "../configuration.h"
|
||||
#include "../performance_counters.h"
|
||||
#include "../msg_hash.h"
|
||||
#include "../runloop.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../core.h"
|
||||
|
||||
#include "../network/net_http_special.h"
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
|
||||
#include "core.h"
|
||||
#include "verbosity.h"
|
||||
#include "runloop.h"
|
||||
#include "retroarch.h"
|
||||
#include "configuration.h"
|
||||
#include "input/input_remapping.h"
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "dirs.h"
|
||||
#include "paths.h"
|
||||
#include "retroarch.h"
|
||||
#include "runloop.h"
|
||||
#include "verbosity.h"
|
||||
#include "lakka.h"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "runloop.h"
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#include "config.def.h"
|
||||
|
|
2
dirs.c
2
dirs.c
|
@ -32,7 +32,7 @@
|
|||
#include "msg_hash.h"
|
||||
#include "paths.h"
|
||||
#include "content.h"
|
||||
#include "runloop.h"
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
struct rarch_dir_list
|
||||
|
|
2
driver.c
2
driver.c
|
@ -40,7 +40,7 @@
|
|||
#include "core.h"
|
||||
#include "core_info.h"
|
||||
#include "driver.h"
|
||||
#include "runloop.h"
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#define HASH_LOCATION_DRIVER 0x09189689U
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
#include "dirs.h"
|
||||
#include "paths.h"
|
||||
#include "retroarch.h"
|
||||
#include "runloop.h"
|
||||
#include "configuration.h"
|
||||
#include "msg_hash.h"
|
||||
#include "verbosity.h"
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
#include "../../file_path_special.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../defaults.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../ui/ui_companion_driver.h"
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "../../defaults.h"
|
||||
#include "../../content.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../command.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../file_path_special.h"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
|
||||
#include "tasks/tasks_internal.h"
|
||||
#include "runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include <sys/socket.h>
|
||||
#include "fs/fs_utils.h"
|
||||
#include "fs/sd_fat_devoptab.h"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "../frontend_driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../defaults.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
/* We only load this library once, so we let it be
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "../retroarch.h"
|
||||
|
||||
#ifndef HAVE_MAIN
|
||||
#include "../runloop.h"
|
||||
#include "../retroarch.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "../../verbosity.h"
|
||||
#include "../../driver.h"
|
||||
#include "../../paths.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../core_info.h"
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
#include "../configuration.h"
|
||||
#include "../driver.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../input/input_driver.h"
|
||||
#include "../list_special.h"
|
||||
#include "../core.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "font_driver.h"
|
||||
#include "video_shader_driver.h"
|
||||
|
||||
#include "../runloop.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
enum thread_cmd
|
||||
|
|
|
@ -832,7 +832,6 @@ RETROARCH
|
|||
#include "../retroarch.c"
|
||||
#include "../dirs.c"
|
||||
#include "../paths.c"
|
||||
#include "../runloop.c"
|
||||
#include "../libretro-common/queues/task_queue.c"
|
||||
|
||||
#include "../msg_hash.c"
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#include "../input_keymaps.h"
|
||||
#include "../input_keyboard.h"
|
||||
|
||||
#include "../../runloop.h"
|
||||
#include "../../driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include "keyboard_event_apple.h"
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "../input_config.h"
|
||||
#include "../input_keymaps.h"
|
||||
#include "../input_keyboard.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/common/win32_common.h"
|
||||
|
||||
LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message,
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <encodings/utf.h>
|
||||
|
||||
#include "input_keyboard.h"
|
||||
|
||||
#include "input_driver.h"
|
||||
|
||||
#include <encodings/utf.h>
|
||||
|
||||
#include "../runloop.h"
|
||||
#include "../retroarch.h"
|
||||
|
||||
struct input_keyboard_line
|
||||
{
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "input_remapping.h"
|
||||
#include "../configuration.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
|
||||
/**
|
||||
* input_remapping_load_file:
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "../core.h"
|
||||
#include "../driver.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../list_special.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "cheat_manager.h"
|
||||
|
||||
#include "../msg_hash.h"
|
||||
#include "../runloop.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../dynamic.h"
|
||||
#include "../core.h"
|
||||
#include "../verbosity.h"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "../../configuration.h"
|
||||
#include "../../core.h"
|
||||
#include "../../core_info.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifndef BIND_ACTION_DEFERRED_PUSH
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "../../managers/cheat_manager.h"
|
||||
#include "../../performance_counters.h"
|
||||
#include "../../paths.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../wifi/wifi_driver.h"
|
||||
|
||||
#ifndef BIND_ACTION_GET_VALUE
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "../../managers/cheat_manager.h"
|
||||
#include "../../file_path_special.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
|
||||
#ifndef BIND_ACTION_LEFT
|
||||
#define BIND_ACTION_LEFT(cbs, name) \
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#include "../../input/input_remapping.h"
|
||||
#include "../../paths.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../lakka.h"
|
||||
#include "../../wifi/wifi_driver.h"
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "../../managers/cheat_manager.h"
|
||||
#include "../../file_path_special.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../ui/ui_companion_driver.h"
|
||||
|
||||
#ifndef BIND_ACTION_RIGHT
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "../../managers/core_option_manager.h"
|
||||
#include "../../managers/cheat_manager.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../performance_counters.h"
|
||||
|
||||
#include "../../gfx/video_shader_driver.h"
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
#include "../../core.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "../../core_info.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include "../widgets/menu_input_dialog.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/drivers_font_renderer/bitmap.h"
|
||||
|
||||
#define RGUI_TERM_START_X(width) (width / 21)
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../playlist.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "../../gfx/video_driver.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include "../../gfx/drivers/d3d.h"
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
#include "../../core_info.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "../config.def.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../configuration.h"
|
||||
#include "../runloop.h"
|
||||
#include "../core.h"
|
||||
#include "../gfx/video_driver.h"
|
||||
#include "../gfx/video_thread_wrapper.h"
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
#include "../managers/core_option_manager.h"
|
||||
#include "../paths.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../core.h"
|
||||
#include "../frontend/frontend_driver.h"
|
||||
#include "../ui/ui_companion_driver.h"
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "../list_special.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../ui/ui_companion_driver.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
static const menu_ctx_driver_t *menu_ctx_drivers[] = {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "widgets/menu_list.h"
|
||||
|
||||
#include "../core.h"
|
||||
#include "../runloop.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../version.h"
|
||||
|
||||
void menu_entries_get_at_offset(const file_list_t *list, size_t idx,
|
||||
|
|
|
@ -67,7 +67,6 @@
|
|||
#include "../paths.h"
|
||||
#include "../dynamic.h"
|
||||
#include "../list_special.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../camera/camera_driver.h"
|
||||
#include "../wifi/wifi_driver.h"
|
||||
|
|
1
movie.c
1
movie.c
|
@ -27,7 +27,6 @@
|
|||
#include "core.h"
|
||||
#include "content.h"
|
||||
#include "retroarch.h"
|
||||
#include "runloop.h"
|
||||
#include "msg_hash.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <compat/zlib.h>
|
||||
|
||||
#include "../../core.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../core.h"
|
||||
#include "../../gfx/video_driver.h"
|
||||
#include "../../managers/core_option_manager.h"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include <compat/strl.h>
|
||||
#include <net/net_compat.h>
|
||||
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../version.h"
|
||||
#include "netplay.h"
|
||||
#include "netplay_discovery.h"
|
||||
|
|
|
@ -24,17 +24,17 @@
|
|||
#include <string/stdstring.h>
|
||||
#include <net/net_http.h>
|
||||
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "netplay_private.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../input/input_driver.h"
|
||||
#include "../../runloop.h"
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include <file/file_path.h>
|
||||
#include "../../file_path_special.h"
|
||||
#include "../../paths.h"
|
||||
#include "../../command.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
/* Only used before init_netplay */
|
||||
static bool netplay_enabled = false;
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "../../configuration.h"
|
||||
#include "../../content.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../version.h"
|
||||
#include "../../input/input_config.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "netplay_discovery.h"
|
||||
|
||||
#include "../../autosave.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#if defined(AF_INET6) && !defined(HAVE_SOCKET_LEGACY)
|
||||
#define HAVE_INET6 1
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "netplay_private.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#if 0
|
||||
|
|
1
paths.c
1
paths.c
|
@ -42,7 +42,6 @@
|
|||
#include "core.h"
|
||||
#include "msg_hash.h"
|
||||
#include "retroarch.h"
|
||||
#include "runloop.h"
|
||||
#include "verbosity.h"
|
||||
#include "tasks/tasks_internal.h"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "performance_counters.h"
|
||||
|
||||
#include "runloop.h"
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "../driver.h"
|
||||
#include "../gfx/video_driver.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../msg_hash.h"
|
||||
#include "../list_special.h"
|
||||
|
|
1177
retroarch.c
1177
retroarch.c
File diff suppressed because it is too large
Load Diff
195
retroarch.h
195
retroarch.h
|
@ -17,11 +17,16 @@
|
|||
#ifndef __RETROARCH_H
|
||||
#define __RETROARCH_H
|
||||
|
||||
#include <boolean.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include "core_type.h"
|
||||
#include "core.h"
|
||||
#include "runloop_defines.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
|
@ -129,6 +134,96 @@ enum rarch_override_setting
|
|||
RARCH_OVERRIDE_SETTING_LAST
|
||||
};
|
||||
|
||||
enum runloop_action
|
||||
{
|
||||
RUNLOOP_ACTION_NONE = 0,
|
||||
RUNLOOP_ACTION_AUTOSAVE
|
||||
};
|
||||
|
||||
enum runloop_ctl_state
|
||||
{
|
||||
RUNLOOP_CTL_NONE = 0,
|
||||
|
||||
RUNLOOP_CTL_SET_FRAME_LIMIT,
|
||||
|
||||
RUNLOOP_CTL_TASK_INIT,
|
||||
|
||||
RUNLOOP_CTL_FRAME_TIME_FREE,
|
||||
RUNLOOP_CTL_SET_FRAME_TIME_LAST,
|
||||
RUNLOOP_CTL_SET_FRAME_TIME,
|
||||
|
||||
RUNLOOP_CTL_IS_IDLE,
|
||||
RUNLOOP_CTL_SET_IDLE,
|
||||
|
||||
RUNLOOP_CTL_GET_WINDOWED_SCALE,
|
||||
RUNLOOP_CTL_SET_WINDOWED_SCALE,
|
||||
|
||||
RUNLOOP_CTL_IS_OVERRIDES_ACTIVE,
|
||||
RUNLOOP_CTL_SET_OVERRIDES_ACTIVE,
|
||||
RUNLOOP_CTL_UNSET_OVERRIDES_ACTIVE,
|
||||
|
||||
RUNLOOP_CTL_IS_MISSING_BIOS,
|
||||
RUNLOOP_CTL_SET_MISSING_BIOS,
|
||||
RUNLOOP_CTL_UNSET_MISSING_BIOS,
|
||||
|
||||
RUNLOOP_CTL_IS_GAME_OPTIONS_ACTIVE,
|
||||
|
||||
RUNLOOP_CTL_IS_NONBLOCK_FORCED,
|
||||
RUNLOOP_CTL_SET_NONBLOCK_FORCED,
|
||||
RUNLOOP_CTL_UNSET_NONBLOCK_FORCED,
|
||||
|
||||
RUNLOOP_CTL_SET_LIBRETRO_PATH,
|
||||
|
||||
RUNLOOP_CTL_IS_PAUSED,
|
||||
RUNLOOP_CTL_SET_PAUSED,
|
||||
RUNLOOP_CTL_SET_MAX_FRAMES,
|
||||
RUNLOOP_CTL_GLOBAL_FREE,
|
||||
|
||||
RUNLOOP_CTL_SET_CORE_SHUTDOWN,
|
||||
|
||||
RUNLOOP_CTL_SET_SHUTDOWN,
|
||||
RUNLOOP_CTL_IS_SHUTDOWN,
|
||||
|
||||
/* Runloop state */
|
||||
RUNLOOP_CTL_CLEAR_STATE,
|
||||
RUNLOOP_CTL_STATE_FREE,
|
||||
|
||||
/* Performance counters */
|
||||
RUNLOOP_CTL_GET_PERFCNT,
|
||||
RUNLOOP_CTL_SET_PERFCNT_ENABLE,
|
||||
RUNLOOP_CTL_UNSET_PERFCNT_ENABLE,
|
||||
RUNLOOP_CTL_IS_PERFCNT_ENABLE,
|
||||
|
||||
/* Key event */
|
||||
RUNLOOP_CTL_FRONTEND_KEY_EVENT_GET,
|
||||
RUNLOOP_CTL_KEY_EVENT_GET,
|
||||
RUNLOOP_CTL_DATA_DEINIT,
|
||||
|
||||
/* Message queue */
|
||||
RUNLOOP_CTL_MSG_QUEUE_INIT,
|
||||
RUNLOOP_CTL_MSG_QUEUE_DEINIT,
|
||||
|
||||
/* Core options */
|
||||
RUNLOOP_CTL_HAS_CORE_OPTIONS,
|
||||
RUNLOOP_CTL_GET_CORE_OPTION_SIZE,
|
||||
RUNLOOP_CTL_IS_CORE_OPTION_UPDATED,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_LIST_GET,
|
||||
RUNLOOP_CTL_CORE_OPTION_PREV,
|
||||
RUNLOOP_CTL_CORE_OPTION_NEXT,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_GET,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_INIT,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_DEINIT,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_FREE,
|
||||
|
||||
/* System info */
|
||||
RUNLOOP_CTL_SYSTEM_INFO_INIT,
|
||||
RUNLOOP_CTL_SYSTEM_INFO_FREE,
|
||||
|
||||
/* HTTP server */
|
||||
RUNLOOP_CTL_HTTPSERVER_INIT,
|
||||
RUNLOOP_CTL_HTTPSERVER_DESTROY
|
||||
};
|
||||
|
||||
struct rarch_main_wrap
|
||||
{
|
||||
int argc;
|
||||
|
@ -144,6 +239,73 @@ struct rarch_main_wrap
|
|||
bool touched;
|
||||
};
|
||||
|
||||
typedef struct rarch_resolution
|
||||
{
|
||||
unsigned idx;
|
||||
unsigned id;
|
||||
} rarch_resolution_t;
|
||||
|
||||
/* All run-time- / command line flag-related globals go here. */
|
||||
|
||||
typedef struct global
|
||||
{
|
||||
struct
|
||||
{
|
||||
char savefile[8192];
|
||||
char savestate[8192];
|
||||
char cheatfile[8192];
|
||||
char ups[8192];
|
||||
char bps[8192];
|
||||
char ips[8192];
|
||||
char remapfile[8192];
|
||||
} name;
|
||||
|
||||
/* Recording. */
|
||||
struct
|
||||
{
|
||||
char path[8192];
|
||||
char config[8192];
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
|
||||
size_t gpu_width;
|
||||
size_t gpu_height;
|
||||
char output_dir[8192];
|
||||
char config_dir[8192];
|
||||
bool use_output_dir;
|
||||
} record;
|
||||
|
||||
/* Settings and/or global state that is specific to
|
||||
* a console-style implementation. */
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
rarch_resolution_t current;
|
||||
rarch_resolution_t initial;
|
||||
uint32_t *list;
|
||||
unsigned count;
|
||||
bool check;
|
||||
} resolutions;
|
||||
|
||||
unsigned gamma_correction;
|
||||
unsigned int flicker_filter_index;
|
||||
unsigned char soft_filter_index;
|
||||
bool pal_enable;
|
||||
bool pal60_enable;
|
||||
} screen;
|
||||
|
||||
struct
|
||||
{
|
||||
bool system_bgm_enable;
|
||||
} sound;
|
||||
|
||||
bool flickerfilter_enable;
|
||||
bool softfilter_enable;
|
||||
} console;
|
||||
} global_t;
|
||||
|
||||
bool rarch_ctl(enum rarch_ctl_state state, void *data);
|
||||
|
||||
|
@ -184,6 +346,37 @@ bool retroarch_main_init(int argc, char *argv[]);
|
|||
|
||||
bool retroarch_main_quit(void);
|
||||
|
||||
global_t *global_get_ptr(void);
|
||||
|
||||
/**
|
||||
* runloop_iterate:
|
||||
*
|
||||
* Run Libretro core in RetroArch for one frame.
|
||||
*
|
||||
* Returns: 0 on successful run,
|
||||
* Returns 1 if we have to wait until button input in order
|
||||
* to wake up the loop.
|
||||
* Returns -1 if we forcibly quit out of the
|
||||
* RetroArch iteration loop.
|
||||
**/
|
||||
int runloop_iterate(unsigned *sleep_ms);
|
||||
|
||||
void runloop_msg_queue_push(const char *msg, unsigned prio,
|
||||
unsigned duration, bool flush);
|
||||
|
||||
bool runloop_msg_queue_pull(const char **ret);
|
||||
|
||||
void runloop_get_status(bool *is_paused, bool *is_idle, bool *is_slowmotion,
|
||||
bool *is_perfcnt_enable);
|
||||
|
||||
bool runloop_ctl(enum runloop_ctl_state state, void *data);
|
||||
|
||||
void runloop_set(enum runloop_action action);
|
||||
|
||||
void runloop_unset(enum runloop_action action);
|
||||
|
||||
rarch_system_info_t *runloop_get_system_info(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
222
runloop.h
222
runloop.h
|
@ -1,222 +0,0 @@
|
|||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2016 - Brad Parker
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __RETROARCH_RUNLOOP_H
|
||||
#define __RETROARCH_RUNLOOP_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include "core.h"
|
||||
#include "runloop_defines.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum runloop_action
|
||||
{
|
||||
RUNLOOP_ACTION_NONE = 0,
|
||||
RUNLOOP_ACTION_AUTOSAVE
|
||||
};
|
||||
|
||||
enum runloop_ctl_state
|
||||
{
|
||||
RUNLOOP_CTL_NONE = 0,
|
||||
|
||||
RUNLOOP_CTL_SET_FRAME_LIMIT,
|
||||
|
||||
RUNLOOP_CTL_TASK_INIT,
|
||||
|
||||
RUNLOOP_CTL_FRAME_TIME_FREE,
|
||||
RUNLOOP_CTL_SET_FRAME_TIME_LAST,
|
||||
RUNLOOP_CTL_SET_FRAME_TIME,
|
||||
|
||||
RUNLOOP_CTL_IS_IDLE,
|
||||
RUNLOOP_CTL_SET_IDLE,
|
||||
|
||||
RUNLOOP_CTL_GET_WINDOWED_SCALE,
|
||||
RUNLOOP_CTL_SET_WINDOWED_SCALE,
|
||||
|
||||
RUNLOOP_CTL_IS_OVERRIDES_ACTIVE,
|
||||
RUNLOOP_CTL_SET_OVERRIDES_ACTIVE,
|
||||
RUNLOOP_CTL_UNSET_OVERRIDES_ACTIVE,
|
||||
|
||||
RUNLOOP_CTL_IS_MISSING_BIOS,
|
||||
RUNLOOP_CTL_SET_MISSING_BIOS,
|
||||
RUNLOOP_CTL_UNSET_MISSING_BIOS,
|
||||
|
||||
RUNLOOP_CTL_IS_GAME_OPTIONS_ACTIVE,
|
||||
|
||||
RUNLOOP_CTL_IS_NONBLOCK_FORCED,
|
||||
RUNLOOP_CTL_SET_NONBLOCK_FORCED,
|
||||
RUNLOOP_CTL_UNSET_NONBLOCK_FORCED,
|
||||
|
||||
RUNLOOP_CTL_SET_LIBRETRO_PATH,
|
||||
|
||||
RUNLOOP_CTL_IS_PAUSED,
|
||||
RUNLOOP_CTL_SET_PAUSED,
|
||||
RUNLOOP_CTL_SET_MAX_FRAMES,
|
||||
RUNLOOP_CTL_GLOBAL_FREE,
|
||||
|
||||
RUNLOOP_CTL_SET_CORE_SHUTDOWN,
|
||||
|
||||
RUNLOOP_CTL_SET_SHUTDOWN,
|
||||
RUNLOOP_CTL_IS_SHUTDOWN,
|
||||
|
||||
/* Runloop state */
|
||||
RUNLOOP_CTL_CLEAR_STATE,
|
||||
RUNLOOP_CTL_STATE_FREE,
|
||||
|
||||
/* Performance counters */
|
||||
RUNLOOP_CTL_GET_PERFCNT,
|
||||
RUNLOOP_CTL_SET_PERFCNT_ENABLE,
|
||||
RUNLOOP_CTL_UNSET_PERFCNT_ENABLE,
|
||||
RUNLOOP_CTL_IS_PERFCNT_ENABLE,
|
||||
|
||||
/* Key event */
|
||||
RUNLOOP_CTL_FRONTEND_KEY_EVENT_GET,
|
||||
RUNLOOP_CTL_KEY_EVENT_GET,
|
||||
RUNLOOP_CTL_DATA_DEINIT,
|
||||
|
||||
/* Message queue */
|
||||
RUNLOOP_CTL_MSG_QUEUE_INIT,
|
||||
RUNLOOP_CTL_MSG_QUEUE_DEINIT,
|
||||
|
||||
/* Core options */
|
||||
RUNLOOP_CTL_HAS_CORE_OPTIONS,
|
||||
RUNLOOP_CTL_GET_CORE_OPTION_SIZE,
|
||||
RUNLOOP_CTL_IS_CORE_OPTION_UPDATED,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_LIST_GET,
|
||||
RUNLOOP_CTL_CORE_OPTION_PREV,
|
||||
RUNLOOP_CTL_CORE_OPTION_NEXT,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_GET,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_INIT,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_DEINIT,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_FREE,
|
||||
|
||||
/* System info */
|
||||
RUNLOOP_CTL_SYSTEM_INFO_INIT,
|
||||
RUNLOOP_CTL_SYSTEM_INFO_FREE,
|
||||
|
||||
/* HTTP server */
|
||||
RUNLOOP_CTL_HTTPSERVER_INIT,
|
||||
RUNLOOP_CTL_HTTPSERVER_DESTROY
|
||||
};
|
||||
|
||||
typedef struct rarch_resolution
|
||||
{
|
||||
unsigned idx;
|
||||
unsigned id;
|
||||
} rarch_resolution_t;
|
||||
|
||||
/* All run-time- / command line flag-related globals go here. */
|
||||
|
||||
typedef struct global
|
||||
{
|
||||
struct
|
||||
{
|
||||
char savefile[8192];
|
||||
char savestate[8192];
|
||||
char cheatfile[8192];
|
||||
char ups[8192];
|
||||
char bps[8192];
|
||||
char ips[8192];
|
||||
char remapfile[8192];
|
||||
} name;
|
||||
|
||||
/* Recording. */
|
||||
struct
|
||||
{
|
||||
char path[8192];
|
||||
char config[8192];
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
|
||||
size_t gpu_width;
|
||||
size_t gpu_height;
|
||||
char output_dir[8192];
|
||||
char config_dir[8192];
|
||||
bool use_output_dir;
|
||||
} record;
|
||||
|
||||
/* Settings and/or global state that is specific to
|
||||
* a console-style implementation. */
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
rarch_resolution_t current;
|
||||
rarch_resolution_t initial;
|
||||
uint32_t *list;
|
||||
unsigned count;
|
||||
bool check;
|
||||
} resolutions;
|
||||
|
||||
unsigned gamma_correction;
|
||||
unsigned int flicker_filter_index;
|
||||
unsigned char soft_filter_index;
|
||||
bool pal_enable;
|
||||
bool pal60_enable;
|
||||
} screen;
|
||||
|
||||
struct
|
||||
{
|
||||
bool system_bgm_enable;
|
||||
} sound;
|
||||
|
||||
bool flickerfilter_enable;
|
||||
bool softfilter_enable;
|
||||
} console;
|
||||
} global_t;
|
||||
|
||||
global_t *global_get_ptr(void);
|
||||
|
||||
/**
|
||||
* runloop_iterate:
|
||||
*
|
||||
* Run Libretro core in RetroArch for one frame.
|
||||
*
|
||||
* Returns: 0 on successful run,
|
||||
* Returns 1 if we have to wait until button input in order
|
||||
* to wake up the loop.
|
||||
* Returns -1 if we forcibly quit out of the
|
||||
* RetroArch iteration loop.
|
||||
**/
|
||||
int runloop_iterate(unsigned *sleep_ms);
|
||||
|
||||
void runloop_msg_queue_push(const char *msg, unsigned prio,
|
||||
unsigned duration, bool flush);
|
||||
|
||||
bool runloop_msg_queue_pull(const char **ret);
|
||||
|
||||
void runloop_get_status(bool *is_paused, bool *is_idle, bool *is_slowmotion,
|
||||
bool *is_perfcnt_enable);
|
||||
|
||||
bool runloop_ctl(enum runloop_ctl_state state, void *data);
|
||||
|
||||
void runloop_set(enum runloop_action action);
|
||||
|
||||
void runloop_unset(enum runloop_action action);
|
||||
|
||||
rarch_system_info_t *runloop_get_system_info(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
|
@ -85,7 +85,6 @@
|
|||
#include "../msg_hash.h"
|
||||
#include "../content.h"
|
||||
#include "../dynamic.h"
|
||||
#include "../runloop.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../file_path_special.h"
|
||||
#include "../core.h"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "../list_special.h"
|
||||
#include "../msg_hash.h"
|
||||
#include "../playlist.h"
|
||||
#include "../runloop.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../core_info.h"
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "../playlist.h"
|
||||
#include "../command.h"
|
||||
#include "../core_info.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
#include "../defaults.h"
|
||||
#include "../configuration.h"
|
||||
#include "../runloop.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../paths.h"
|
||||
#include "../msg_hash.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "../../../input/drivers/cocoa_input.h"
|
||||
|
||||
#include "../../../configuration.h"
|
||||
#include "../../../runloop.h"
|
||||
#include "../../../retroarch.h"
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "../../../menu/widgets/menu_entry.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "../../paths.h"
|
||||
#include "../../core.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
id apple_platform;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#endif
|
||||
#include "../../configuration.h"
|
||||
#include "../../frontend/frontend.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "../../menu/menu_setting.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "../ui_companion_driver.h"
|
||||
#include "../../core.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#ifdef HAVE_QT_WRAPPER
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "../../configuration.h"
|
||||
#include "../../driver.h"
|
||||
#include "../../paths.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/video_driver.h"
|
||||
#include "../../gfx/video_shader_driver.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
#include "../../ui_companion_driver.h"
|
||||
#include "../../../driver.h"
|
||||
#include "../../../runloop.h"
|
||||
#include "../../../retroarch.h"
|
||||
#include "../../../tasks/tasks_internal.h"
|
||||
|
||||
static void ui_window_win32_destroy(void *data)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include "../wifi_driver.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../lakka.h"
|
||||
|
||||
static bool connman_cache[256] = {0};
|
||||
|
|
Loading…
Reference in New Issue