mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Cut down on HAVE_MENU ifdefs
This commit is contained in:
parent
d789013789
commit
f553f3f6bd
@ -1087,6 +1087,7 @@ error:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
bool task_push_load_content_from_playlist_from_menu(
|
bool task_push_load_content_from_playlist_from_menu(
|
||||||
const char *core_path,
|
const char *core_path,
|
||||||
const char *fullpath,
|
const char *fullpath,
|
||||||
@ -1124,12 +1125,10 @@ bool task_push_load_content_from_playlist_from_menu(
|
|||||||
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)core_path);
|
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)core_path);
|
||||||
|
|
||||||
/* Is content required by this core? */
|
/* Is content required by this core? */
|
||||||
#ifdef HAVE_MENU
|
|
||||||
if (fullpath)
|
if (fullpath)
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT, NULL);
|
||||||
else
|
else
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_LOAD_NO_CONTENT, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_LOAD_NO_CONTENT, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* On targets that have no dynamic core loading support, we'd
|
/* On targets that have no dynamic core loading support, we'd
|
||||||
* execute the new core from this point. If this returns false,
|
* execute the new core from this point. If this returns false,
|
||||||
@ -1138,9 +1137,7 @@ bool task_push_load_content_from_playlist_from_menu(
|
|||||||
goto error;
|
goto error;
|
||||||
#ifndef HAVE_DYNAMIC
|
#ifndef HAVE_DYNAMIC
|
||||||
runloop_ctl(RUNLOOP_CTL_SET_SHUTDOWN, NULL);
|
runloop_ctl(RUNLOOP_CTL_SET_SHUTDOWN, NULL);
|
||||||
#ifdef HAVE_MENU
|
|
||||||
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Load core */
|
/* Load core */
|
||||||
@ -1162,15 +1159,14 @@ error:
|
|||||||
free(error_string);
|
free(error_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
|
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (content_ctx.directory_system)
|
if (content_ctx.directory_system)
|
||||||
free(content_ctx.directory_system);
|
free(content_ctx.directory_system);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool task_push_start_current_core(content_ctx_info_t *content_info)
|
bool task_push_start_current_core(content_ctx_info_t *content_info)
|
||||||
{
|
{
|
||||||
@ -1278,6 +1274,7 @@ bool task_push_load_new_core(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
bool task_push_load_content_with_new_core_from_menu(
|
bool task_push_load_content_with_new_core_from_menu(
|
||||||
const char *core_path,
|
const char *core_path,
|
||||||
const char *fullpath,
|
const char *fullpath,
|
||||||
@ -1288,7 +1285,6 @@ bool task_push_load_content_with_new_core_from_menu(
|
|||||||
{
|
{
|
||||||
content_information_ctx_t content_ctx;
|
content_information_ctx_t content_ctx;
|
||||||
|
|
||||||
bool loading_from_menu = false;
|
|
||||||
char *error_string = NULL;
|
char *error_string = NULL;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
@ -1324,18 +1320,14 @@ bool task_push_load_content_with_new_core_from_menu(
|
|||||||
command_event(CMD_EVENT_LOAD_CORE, NULL);
|
command_event(CMD_EVENT_LOAD_CORE, NULL);
|
||||||
|
|
||||||
/* Load content */
|
/* Load content */
|
||||||
#ifdef HAVE_MENU
|
|
||||||
loading_from_menu = true;
|
|
||||||
|
|
||||||
if (!content_info->environ_get)
|
if (!content_info->environ_get)
|
||||||
content_info->environ_get = menu_content_environment_get;
|
content_info->environ_get = menu_content_environment_get;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (task_push_content_update_firmware_status(&content_ctx))
|
if (task_push_content_update_firmware_status(&content_ctx))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!task_load_content(content_info, &content_ctx,
|
if (!task_load_content(content_info, &content_ctx,
|
||||||
loading_from_menu, false, &error_string))
|
true, false, &error_string))
|
||||||
{
|
{
|
||||||
if (error_string)
|
if (error_string)
|
||||||
{
|
{
|
||||||
@ -1344,9 +1336,7 @@ bool task_push_load_content_with_new_core_from_menu(
|
|||||||
free(error_string);
|
free(error_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
|
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (content_ctx.directory_system)
|
if (content_ctx.directory_system)
|
||||||
free(content_ctx.directory_system);
|
free(content_ctx.directory_system);
|
||||||
@ -1361,16 +1351,15 @@ bool task_push_load_content_with_new_core_from_menu(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Push quick menu onto menu stack */
|
/* Push quick menu onto menu stack */
|
||||||
#ifdef HAVE_MENU
|
|
||||||
if (type != CORE_TYPE_DUMMY)
|
if (type != CORE_TYPE_DUMMY)
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUICK_MENU, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUICK_MENU, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (content_ctx.directory_system)
|
if (content_ctx.directory_system)
|
||||||
free(content_ctx.directory_system);
|
free(content_ctx.directory_system);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool task_load_content_callback(content_ctx_info_t *content_info,
|
static bool task_load_content_callback(content_ctx_info_t *content_info,
|
||||||
bool loading_from_menu, bool loading_from_cli)
|
bool loading_from_menu, bool loading_from_cli)
|
||||||
@ -1536,6 +1525,7 @@ bool task_push_load_content_with_current_core_from_companion_ui(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
bool task_push_load_content_with_core_from_menu(
|
bool task_push_load_content_with_core_from_menu(
|
||||||
const char *fullpath,
|
const char *fullpath,
|
||||||
content_ctx_info_t *content_info,
|
content_ctx_info_t *content_info,
|
||||||
@ -1549,20 +1539,17 @@ bool task_push_load_content_with_core_from_menu(
|
|||||||
/* Load content */
|
/* Load content */
|
||||||
if (!task_load_content_callback(content_info, true, false))
|
if (!task_load_content_callback(content_info, true, false))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MENU
|
|
||||||
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
|
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Push quick menu onto menu stack */
|
/* Push quick menu onto menu stack */
|
||||||
#ifdef HAVE_MENU
|
|
||||||
if (type != CORE_TYPE_DUMMY)
|
if (type != CORE_TYPE_DUMMY)
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUICK_MENU, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUICK_MENU, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void content_get_status(
|
void content_get_status(
|
||||||
bool *contentless,
|
bool *contentless,
|
||||||
|
@ -26,6 +26,10 @@
|
|||||||
#include <queues/task_queue.h>
|
#include <queues/task_queue.h>
|
||||||
#include <formats/image.h>
|
#include <formats/image.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "../config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../content.h"
|
#include "../content.h"
|
||||||
#include "../core_type.h"
|
#include "../core_type.h"
|
||||||
#include "../msg_hash.h"
|
#include "../msg_hash.h"
|
||||||
@ -173,6 +177,7 @@ bool task_push_load_content_with_new_core_from_companion_ui(
|
|||||||
retro_task_callback_t cb,
|
retro_task_callback_t cb,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
bool task_push_load_content_with_new_core_from_menu(
|
bool task_push_load_content_with_new_core_from_menu(
|
||||||
const char *core_path,
|
const char *core_path,
|
||||||
const char *fullpath,
|
const char *fullpath,
|
||||||
@ -194,6 +199,7 @@ bool task_push_load_content_with_core_from_menu(
|
|||||||
enum rarch_core_type type,
|
enum rarch_core_type type,
|
||||||
retro_task_callback_t cb,
|
retro_task_callback_t cb,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
#endif
|
||||||
|
|
||||||
void task_image_load_free(retro_task_t *task);
|
void task_image_load_free(retro_task_t *task);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user