mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Add HAVE_RUNAHEAD ifdef
This commit is contained in:
parent
6e662a8064
commit
c041470bb0
@ -259,12 +259,16 @@ OBJ += frontend/frontend.o \
|
||||
$(LIBRETRO_COMM_DIR)/features/features_cpu.o \
|
||||
performance_counters.o \
|
||||
verbosity.o \
|
||||
runahead/copy_load_info.o \
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD), 1)
|
||||
DEFINES += -DHAVE_RUNAHEAD
|
||||
OBJ += runahead/copy_load_info.o \
|
||||
runahead/dirty_input.o \
|
||||
runahead/mem_util.o \
|
||||
runahead/mylist.o \
|
||||
runahead/run_ahead.o \
|
||||
runahead/secondary_core.o
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
@ -44,8 +44,10 @@
|
||||
#include "gfx/video_driver.h"
|
||||
#include "audio/audio_driver.h"
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
#include "runahead/copy_load_info.h"
|
||||
#include "runahead/secondary_core.h"
|
||||
#endif
|
||||
|
||||
struct retro_callbacks retro_ctx;
|
||||
struct retro_core_t current_core;
|
||||
@ -266,7 +268,9 @@ bool core_set_controller_port_device(retro_ctx_controller_info_t *pad)
|
||||
if (!pad)
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
remember_controller_port_device(pad->port, pad->device);
|
||||
#endif
|
||||
|
||||
current_core.retro_set_controller_port_device(pad->port, pad->device);
|
||||
return true;
|
||||
@ -286,7 +290,9 @@ bool core_load_game(retro_ctx_load_content_info_t *load_info)
|
||||
bool contentless = false;
|
||||
bool is_inited = false;
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
set_load_content_info(load_info);
|
||||
#endif
|
||||
|
||||
content_get_status(&contentless, &is_inited);
|
||||
|
||||
|
23
dynamic.c
23
dynamic.c
@ -66,7 +66,9 @@
|
||||
#include "msg_hash.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
#include "runahead/secondary_core.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#define SYMBOL(x) do { \
|
||||
@ -393,24 +395,28 @@ bool init_libretro_sym_custom(enum rarch_core_type type, struct retro_core_t *cu
|
||||
{
|
||||
case CORE_TYPE_PLAIN:
|
||||
#ifdef HAVE_DYNAMIC
|
||||
|
||||
if (lib_path == NULL || lib_handle_p == NULL)
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
if (!lib_path || !lib_handle_p)
|
||||
#endif
|
||||
{
|
||||
if (!load_dynamic_core())
|
||||
return false;
|
||||
lib_handle_local = lib_handle;
|
||||
}
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
else
|
||||
{
|
||||
/* for a secondary core, we already have a primary library loaded, so we can skip some checks and just load the library */
|
||||
/* for a secondary core, we already have a
|
||||
* primary library loaded, so we can skip
|
||||
* some checks and just load the library */
|
||||
retro_assert(lib_path != NULL && lib_handle_p != NULL);
|
||||
lib_handle_local = dylib_load(lib_path);
|
||||
if (lib_handle_local == NULL)
|
||||
{
|
||||
|
||||
if (!lib_handle_local)
|
||||
return false;
|
||||
}
|
||||
*lib_handle_p = lib_handle_local;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
SYMBOL(retro_init);
|
||||
@ -659,8 +665,11 @@ bool init_libretro_sym(enum rarch_core_type type, struct retro_core_t *current_c
|
||||
if (!load_symbols(type, current_core))
|
||||
return false;
|
||||
|
||||
/* remember last core type created, so creating a secondary core will know what core type to use */
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
/* remember last core type created, so creating a
|
||||
* secondary core will know what core type to use. */
|
||||
set_last_core_type(type);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1255,12 +1255,14 @@ MENU
|
||||
#include "../libretro-common/net/net_http_parse.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
#include "../runahead/mem_util.c"
|
||||
#include "../runahead/secondary_core.c"
|
||||
#include "../runahead/run_ahead.c"
|
||||
#include "../runahead/copy_load_info.c"
|
||||
#include "../runahead/dirty_input.c"
|
||||
#include "../runahead/mylist.c"
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
DEPENDENCIES
|
||||
|
@ -11,6 +11,7 @@ HAVE_MATERIALUI=auto # MaterialUI menu
|
||||
HAVE_XMB=auto # XMB menu
|
||||
HAVE_ZARCH=no # Zarch menu
|
||||
HAVE_NUKLEAR=no # Nuklear menu
|
||||
HAVE_RUNAHEAD=yes # Runahead support
|
||||
HAVE_OVERLAY=yes # Overlay support
|
||||
HAVE_DYNAMIC=yes # Dynamic loading of libretro library
|
||||
HAVE_SDL=auto # SDL support
|
||||
|
@ -118,7 +118,9 @@
|
||||
|
||||
#include "command.h"
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
#include "runahead/run_ahead.h"
|
||||
#endif
|
||||
|
||||
#define _PSUPP(var, name, desc) printf(" %s:\n\t\t%s: %s\n", name, desc, _##var##_supp ? "yes" : "no")
|
||||
|
||||
@ -3250,10 +3252,12 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||
if ((settings->uints.video_frame_delay > 0) && !input_nonblock_state)
|
||||
retro_sleep(settings->uints.video_frame_delay);
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
/* Run Ahead Feature replaces the call to core_run in this loop */
|
||||
if (settings->bools.run_ahead_enabled && settings->uints.run_ahead_frames > 0)
|
||||
run_ahead(settings->uints.run_ahead_frames, settings->bools.run_ahead_secondary_instance);
|
||||
else
|
||||
#endif
|
||||
core_run();
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
|
Loading…
x
Reference in New Issue
Block a user