Create RARCH_CTL_IS_DUMMY_CORE
This commit is contained in:
parent
01d58f8681
commit
1eac61e9a0
|
@ -530,7 +530,7 @@ static bool event_init_content(void)
|
||||||
|
|
||||||
/* No content to be loaded for dummy core,
|
/* No content to be loaded for dummy core,
|
||||||
* just successfully exit. */
|
* just successfully exit. */
|
||||||
if (global->inited.core.type == CORE_TYPE_DUMMY)
|
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL))
|
if (!content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL))
|
||||||
|
@ -607,7 +607,7 @@ static bool event_save_auto_state(void)
|
||||||
|
|
||||||
if (!settings->savestate_auto_save)
|
if (!settings->savestate_auto_save)
|
||||||
return false;
|
return false;
|
||||||
if (global->inited.core.type == CORE_TYPE_DUMMY)
|
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
return false;
|
return false;
|
||||||
if (content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL))
|
if (content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1850,7 +1850,7 @@ static void config_load_core_specific(void)
|
||||||
if (!*settings->libretro)
|
if (!*settings->libretro)
|
||||||
return;
|
return;
|
||||||
#ifdef HAVE_DYNAMIC
|
#ifdef HAVE_DYNAMIC
|
||||||
if (global->inited.core.type == CORE_TYPE_DUMMY)
|
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -150,13 +150,12 @@ static void history_playlist_push(content_playlist_t *playlist,
|
||||||
const char *path, const char *core_path,
|
const char *path, const char *core_path,
|
||||||
struct retro_system_info *info)
|
struct retro_system_info *info)
|
||||||
{
|
{
|
||||||
char tmp[PATH_MAX_LENGTH] = {0};
|
char tmp[PATH_MAX_LENGTH];
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
rarch_system_info_t *system = NULL;
|
rarch_system_info_t *system = NULL;
|
||||||
|
|
||||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||||
|
|
||||||
if (!playlist || (global->inited.core.type == CORE_TYPE_DUMMY) || !info)
|
if (!playlist || rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL) || !info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Path can be relative here.
|
/* Path can be relative here.
|
||||||
|
|
|
@ -1325,7 +1325,7 @@ static int mui_list_push(void *data, void *userdata,
|
||||||
case DISPLAYLIST_MAIN_MENU:
|
case DISPLAYLIST_MAIN_MENU:
|
||||||
menu_entries_clear(info->list);
|
menu_entries_clear(info->list);
|
||||||
|
|
||||||
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && (global->inited.core.type != CORE_TYPE_DUMMY))
|
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
menu_displaylist_parse_settings(menu, info,
|
menu_displaylist_parse_settings(menu, info,
|
||||||
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS), PARSE_ACTION, false);
|
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS), PARSE_ACTION, false);
|
||||||
|
|
||||||
|
|
|
@ -2568,7 +2568,7 @@ static int xmb_list_push(void *data, void *userdata, menu_displaylist_info_t *in
|
||||||
case DISPLAYLIST_MAIN_MENU:
|
case DISPLAYLIST_MAIN_MENU:
|
||||||
menu_entries_clear(info->list);
|
menu_entries_clear(info->list);
|
||||||
|
|
||||||
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && (global->inited.core.type != CORE_TYPE_DUMMY))
|
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
menu_displaylist_parse_settings(menu, info,
|
menu_displaylist_parse_settings(menu, info,
|
||||||
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS), PARSE_ACTION, false);
|
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS), PARSE_ACTION, false);
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ static void menu_display_d3d_draw_bg(
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
||||||
|
|
||||||
if ((settings->menu.pause_libretro
|
if ((settings->menu.pause_libretro
|
||||||
|| !rarch_ctl(RARCH_CTL_IS_INITED, NULL) || (global->inited.core.type == CORE_TYPE_DUMMY))
|
|| !rarch_ctl(RARCH_CTL_IS_INITED, NULL) || rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
&& !force_transparency
|
&& !force_transparency
|
||||||
&& texture)
|
&& texture)
|
||||||
coords.color = (const float*)coord_color2;
|
coords.color = (const float*)coord_color2;
|
||||||
|
|
|
@ -140,7 +140,6 @@ static void menu_display_gl_draw_bg(
|
||||||
struct gfx_coords coords;
|
struct gfx_coords coords;
|
||||||
const GLfloat *new_vertex = NULL;
|
const GLfloat *new_vertex = NULL;
|
||||||
const GLfloat *new_tex_coord = NULL;
|
const GLfloat *new_tex_coord = NULL;
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
gl_t *gl = gl_get_ptr();
|
gl_t *gl = gl_get_ptr();
|
||||||
|
|
||||||
|
@ -166,7 +165,7 @@ static void menu_display_gl_draw_bg(
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
||||||
|
|
||||||
if ((settings->menu.pause_libretro
|
if ((settings->menu.pause_libretro
|
||||||
|| !rarch_ctl(RARCH_CTL_IS_INITED, NULL) || (global->inited.core.type == CORE_TYPE_DUMMY))
|
|| !rarch_ctl(RARCH_CTL_IS_INITED, NULL) || rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
&& !force_transparency
|
&& !force_transparency
|
||||||
&& texture)
|
&& texture)
|
||||||
coords.color = (const float*)coord_color2;
|
coords.color = (const float*)coord_color2;
|
||||||
|
|
|
@ -306,12 +306,9 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case MENU_DISPLAY_CTL_LIBRETRO_RUNNING:
|
case MENU_DISPLAY_CTL_LIBRETRO_RUNNING:
|
||||||
{
|
if (!settings->menu.pause_libretro)
|
||||||
global_t *global = global_get_ptr();
|
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
if (!settings->menu.pause_libretro)
|
return true;
|
||||||
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && (global->inited.core.type != CORE_TYPE_DUMMY))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MENU_DISPLAY_CTL_LIBRETRO:
|
case MENU_DISPLAY_CTL_LIBRETRO:
|
||||||
video_driver_set_texture_enable(true, false);
|
video_driver_set_texture_enable(true, false);
|
||||||
|
|
|
@ -1721,7 +1721,7 @@ static int menu_displaylist_parse_load_content_settings(menu_displaylist_info_t
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && (global->inited.core.type != CORE_TYPE_DUMMY))
|
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
{
|
{
|
||||||
rarch_system_info_t *system = NULL;
|
rarch_system_info_t *system = NULL;
|
||||||
|
|
||||||
|
@ -1774,7 +1774,7 @@ static int menu_displaylist_parse_load_content_settings(menu_displaylist_info_t
|
||||||
menu_hash_to_str(MENU_LABEL_VALUE_CORE_CHEAT_OPTIONS),
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_CHEAT_OPTIONS),
|
||||||
menu_hash_to_str(MENU_LABEL_CORE_CHEAT_OPTIONS),
|
menu_hash_to_str(MENU_LABEL_CORE_CHEAT_OPTIONS),
|
||||||
MENU_SETTING_ACTION, 0, 0);
|
MENU_SETTING_ACTION, 0, 0);
|
||||||
if ((global->inited.core.type != CORE_TYPE_DUMMY) && system && system->disk_control.get_num_images)
|
if ((!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) && system && system->disk_control.get_num_images)
|
||||||
menu_entries_push(info->list,
|
menu_entries_push(info->list,
|
||||||
menu_hash_to_str(MENU_LABEL_VALUE_DISK_OPTIONS),
|
menu_hash_to_str(MENU_LABEL_VALUE_DISK_OPTIONS),
|
||||||
menu_hash_to_str(MENU_LABEL_DISK_OPTIONS),
|
menu_hash_to_str(MENU_LABEL_DISK_OPTIONS),
|
||||||
|
@ -1819,8 +1819,8 @@ static int menu_displaylist_parse_horizontal_content_actions(menu_displaylist_in
|
||||||
|
|
||||||
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
|
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
|
||||||
|
|
||||||
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && (global->inited.core.type != CORE_TYPE_DUMMY)
|
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
||||||
&& !strcmp(menu->deferred_path, fullpath))
|
&& !strcmp(menu->deferred_path, fullpath))
|
||||||
menu_displaylist_parse_load_content_settings(info);
|
menu_displaylist_parse_load_content_settings(info);
|
||||||
else
|
else
|
||||||
menu_entries_push(info->list, "Run", "collection",
|
menu_entries_push(info->list, "Run", "collection",
|
||||||
|
@ -2599,7 +2599,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||||
info->need_push = true;
|
info->need_push = true;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_MAIN_MENU:
|
case DISPLAYLIST_MAIN_MENU:
|
||||||
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && (global->inited.core.type != CORE_TYPE_DUMMY))
|
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
menu_displaylist_parse_settings(menu, info,
|
menu_displaylist_parse_settings(menu, info,
|
||||||
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS), PARSE_ACTION, false);
|
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS), PARSE_ACTION, false);
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "../command_event.h"
|
#include "../command_event.h"
|
||||||
#include "../general.h"
|
#include "../general.h"
|
||||||
|
#include "../retroarch.h"
|
||||||
#include "../verbosity.h"
|
#include "../verbosity.h"
|
||||||
#include "../msg_hash.h"
|
#include "../msg_hash.h"
|
||||||
#include "../string_list_special.h"
|
#include "../string_list_special.h"
|
||||||
|
@ -293,7 +294,7 @@ bool recording_init(void)
|
||||||
if (!*recording_enabled)
|
if (!*recording_enabled)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (global->inited.core.type == CORE_TYPE_DUMMY)
|
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
{
|
{
|
||||||
RARCH_WARN("%s\n", msg_hash_to_str(MSG_USING_LIBRETRO_DUMMY_CORE_RECORDING_SKIPPED));
|
RARCH_WARN("%s\n", msg_hash_to_str(MSG_USING_LIBRETRO_DUMMY_CORE_RECORDING_SKIPPED));
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -953,7 +953,7 @@ static void parse_input(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global->inited.core.type == CORE_TYPE_DUMMY)
|
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
{
|
{
|
||||||
if (optind < argc)
|
if (optind < argc)
|
||||||
{
|
{
|
||||||
|
@ -1293,6 +1293,8 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||||
|
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
|
case RARCH_CTL_IS_DUMMY_CORE:
|
||||||
|
return (global->inited.core.type == CORE_TYPE_DUMMY);
|
||||||
case RARCH_CTL_IS_INITED:
|
case RARCH_CTL_IS_INITED:
|
||||||
return rarch_is_inited;
|
return rarch_is_inited;
|
||||||
case RARCH_CTL_UNSET_INITED:
|
case RARCH_CTL_UNSET_INITED:
|
||||||
|
|
|
@ -67,6 +67,8 @@ enum rarch_ctl_state
|
||||||
|
|
||||||
RARCH_CTL_IS_INITED,
|
RARCH_CTL_IS_INITED,
|
||||||
|
|
||||||
|
RARCH_CTL_IS_DUMMY_CORE,
|
||||||
|
|
||||||
RARCH_CTL_PREINIT,
|
RARCH_CTL_PREINIT,
|
||||||
|
|
||||||
RARCH_CTL_DESTROY,
|
RARCH_CTL_DESTROY,
|
||||||
|
|
|
@ -1236,7 +1236,6 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||||
static retro_time_t frame_limit_last_time = 0.0;
|
static retro_time_t frame_limit_last_time = 0.0;
|
||||||
static retro_input_t last_input = 0;
|
static retro_input_t last_input = 0;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
rarch_system_info_t *system = NULL;
|
rarch_system_info_t *system = NULL;
|
||||||
|
|
||||||
cmd.state[1] = last_input;
|
cmd.state[1] = last_input;
|
||||||
|
@ -1327,11 +1326,11 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||||
event_command(EVENT_CMD_GRAB_MOUSE_TOGGLE);
|
event_command(EVENT_CMD_GRAB_MOUSE_TOGGLE);
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
if (runloop_cmd_menu_press(cmd_ptr) || (global->inited.core.type == CORE_TYPE_DUMMY))
|
if (runloop_cmd_menu_press(cmd_ptr) || rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
{
|
{
|
||||||
if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL))
|
if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL))
|
||||||
{
|
{
|
||||||
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && (global->inited.core.type != CORE_TYPE_DUMMY))
|
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||||
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue