mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-19 01:12:33 +00:00
Create retroarch_set_current_core_type
This commit is contained in:
parent
ccd5b2f73d
commit
c16cae7ef9
10
retroarch.c
10
retroarch.c
@ -106,6 +106,7 @@ enum
|
||||
RA_OPT_MAX_FRAMES
|
||||
};
|
||||
|
||||
static bool current_core_explicitly_set = false;
|
||||
static enum rarch_core_type current_core_type;
|
||||
static char current_savefile_dir[PATH_MAX_LENGTH];
|
||||
|
||||
@ -1296,6 +1297,9 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_TASK_INIT, NULL);
|
||||
|
||||
if (current_core_explicitly_set)
|
||||
current_core_explicitly_set = false;
|
||||
else
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
@ -1639,6 +1643,12 @@ int retroarch_get_capabilities(enum rarch_capabilities type,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void retroarch_set_current_core_type(enum rarch_core_type type)
|
||||
{
|
||||
current_core_explicitly_set = true;
|
||||
current_core_type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* retroarch_fail:
|
||||
* @error_code : Error code.
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include "core_type.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -152,10 +154,7 @@ void retroarch_set_pathnames(const char *path);
|
||||
|
||||
void retroarch_fill_pathnames(void);
|
||||
|
||||
/* Replaces currently loaded configuration file with
|
||||
* another one. Will load a dummy core to flush state
|
||||
* properly. */
|
||||
bool retroarch_replace_config(char *path);
|
||||
void retroarch_set_current_core_type(enum rarch_core_type type);
|
||||
|
||||
/**
|
||||
* retroarch_fail:
|
||||
|
@ -1754,6 +1754,7 @@ bool task_push_content_load_default(
|
||||
core_path = settings->path.libretro; /* TODO/FIXME */
|
||||
runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)core_path);
|
||||
retroarch_set_current_core_type(CORE_TYPE_NET_RETROPAD);
|
||||
#ifdef HAVE_DYNAMIC
|
||||
command_event(CMD_EVENT_LOAD_CORE, NULL);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user