1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-03 00:38:44 +00:00

Create runloop.c and split up runloop code to this new file; (#13269)

* Create runloop.c and split up runloop code to this new file;
retroarch.c now 207Kb and runloop.c 301Kb

* Define empty runloop_secondary_core_destroy
This commit is contained in:
Autechre 2021-11-22 03:27:23 +01:00 committed by GitHub
parent 8dfaf84cc9
commit 2b87cd9313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9547 additions and 9296 deletions

View File

@ -234,6 +234,7 @@ endif
OBJ += frontend/frontend_driver.o \
retroarch.o \
runloop.o \
driver.o \
ui/ui_companion_driver.o \
camera/camera_driver.o \

View File

@ -1218,6 +1218,7 @@ GIT
RETROARCH
============================================================ */
#include "../retroarch.c"
#include "../runloop.c"
#include "../command.c"
#include "../driver.c"
#include "../midi_driver.c"

View File

@ -2,6 +2,7 @@
* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2016-2019 - Andr<EFBFBD>s Su<EFBFBD>rez (input mapper code)
*
* 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

File diff suppressed because it is too large Load Diff

View File

@ -72,6 +72,19 @@ RETRO_BEGIN_DECLS
* 3 - Late
*/
#define DRIVERS_CMD_ALL \
( DRIVER_AUDIO_MASK \
| DRIVER_VIDEO_MASK \
| DRIVER_INPUT_MASK \
| DRIVER_CAMERA_MASK \
| DRIVER_LOCATION_MASK \
| DRIVER_MENU_MASK \
| DRIVERS_VIDEO_INPUT_MASK \
| DRIVER_BLUETOOTH_MASK \
| DRIVER_WIFI_MASK \
| DRIVER_LED_MASK \
| DRIVER_MIDI_MASK )
bool retroarch_ctl(enum rarch_ctl_state state, void *data);
int retroarch_get_capabilities(enum rarch_capabilities type,
@ -108,6 +121,8 @@ int content_get_subsystem(void);
void retroarch_menu_running(void);
void retroarch_path_set_redirect(settings_t *settings);
void retroarch_menu_running_finished(bool quit);
enum retro_language rarch_get_language_from_iso(const char *lang);

9413
runloop.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -40,6 +40,7 @@
#include "core_option_manager.h"
#include "performance_counters.h"
#include "state_manager.h"
#include "tasks/tasks_internal.h"
/* Arbitrary twenty subsystems limit */
#define SUBSYSTEM_MAX_SUBSYSTEMS 20
@ -358,7 +359,85 @@ void runloop_set_current_core_type(
**/
int runloop_iterate(void);
void runloop_perf_log(void);
void runloop_system_info_free(void);
bool runloop_path_init_subsystem(void);
/**
* libretro_get_system_info:
* @path : Path to libretro library.
* @info : Pointer to system info information.
* @load_no_content : If true, core should be able to auto-start
* without any content loaded.
*
* Gets system info from an arbitrary lib.
* The struct returned must be freed as strings are allocated dynamically.
*
* Returns: true (1) if successful, otherwise false (0).
**/
bool libretro_get_system_info(
const char *path,
struct retro_system_info *info,
bool *load_no_content);
void runloop_performance_counter_register(
struct retro_perf_counter *perf);
void runloop_runtime_log_deinit(
runloop_state_t *runloop_st,
bool content_runtime_log,
bool content_runtime_log_aggregate,
const char *dir_runtime_log,
const char *dir_playlist);
void runloop_event_deinit_core(void);
#ifdef HAVE_RUNAHEAD
void runloop_runahead_clear_variables(runloop_state_t *runloop_st);
#endif
bool runloop_event_init_core(
settings_t *settings,
void *input_data,
enum rarch_core_type type);
void runloop_pause_checks(void);
float runloop_set_frame_limit(
const struct retro_system_av_info *av_info,
float fastforward_ratio);
float runloop_get_fastforward_ratio(
settings_t *settings,
struct retro_fastforwarding_override *fastmotion_override);
void runloop_task_msg_queue_push(
retro_task_t *task, const char *msg,
unsigned prio, unsigned duration,
bool flush);
void runloop_frame_time_free(void);
void runloop_fastmotion_override_free(void);
void runloop_audio_buffer_status_free(void);
bool secondary_core_ensure_exists(settings_t *settings);
void runloop_core_options_cb_free(void);
void runloop_log_counters(
struct retro_perf_counter **counters, unsigned num);
void runloop_secondary_core_destroy(void);
void runloop_msg_queue_deinit(void);
void runloop_msg_queue_init(void);
void runloop_path_init_savefile(runloop_state_t *runloop_st);
runloop_state_t *runloop_state_get_ptr(void);