mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-26 11:36:01 +00:00
Add UI Companion Enable setting
This commit is contained in:
parent
2ff854177c
commit
cebea56412
@ -757,6 +757,8 @@ static const bool ui_companion_start_on_boot = false;
|
||||
static const bool ui_companion_start_on_boot = true;
|
||||
#endif
|
||||
|
||||
static const bool ui_companion_enable = false;
|
||||
|
||||
#if defined(ANDROID)
|
||||
#if defined(ANDROID_ARM)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/armeabi-v7a/";
|
||||
|
@ -612,6 +612,7 @@ static void config_set_defaults(void)
|
||||
#endif
|
||||
|
||||
settings->ui.companion_start_on_boot = ui_companion_start_on_boot;
|
||||
settings->ui.companion_enable = ui_companion_enable;
|
||||
settings->ui.menubar_enable = true;
|
||||
settings->ui.suspend_screensaver_enable = true;
|
||||
|
||||
@ -1436,6 +1437,7 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, input.input_descriptor_hide_unbound, "input_descriptor_hide_unbound");
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, ui.companion_start_on_boot, "ui_companion_start_on_boot");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, ui.companion_enable, "ui_companion_enable");
|
||||
|
||||
config_get_path(conf, "core_updater_buildbot_url",
|
||||
settings->network.buildbot_url, sizeof(settings->network.buildbot_url));
|
||||
@ -2532,6 +2534,7 @@ bool config_save_file(const char *path)
|
||||
config_set_float(conf, "input_axis_threshold",
|
||||
settings->input.axis_threshold);
|
||||
config_set_bool(conf, "ui_companion_start_on_boot", settings->ui.companion_start_on_boot);
|
||||
config_set_bool(conf, "ui_companion_enable", settings->ui.companion_enable);
|
||||
config_set_bool(conf, "video_gpu_record", settings->video.gpu_record);
|
||||
config_set_bool(conf, "input_remap_binds_enable",
|
||||
settings->input.remap_binds_enable);
|
||||
|
@ -112,6 +112,7 @@ typedef struct settings
|
||||
bool menubar_enable;
|
||||
bool suspend_screensaver_enable;
|
||||
bool companion_start_on_boot;
|
||||
bool companion_enable;
|
||||
} ui;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
|
@ -290,6 +290,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
|
||||
return "pause_nonactive";
|
||||
case MENU_LABEL_UI_COMPANION_START_ON_BOOT:
|
||||
return "ui_companion_start_on_boot";
|
||||
case MENU_LABEL_UI_COMPANION_ENABLE:
|
||||
return "ui_companion_enable";
|
||||
case MENU_LABEL_UI_MENUBAR_ENABLE:
|
||||
return "ui_menubar_enable";
|
||||
case MENU_LABEL_ARCHIVE_MODE:
|
||||
@ -1008,6 +1010,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
||||
return "Don't run in background";
|
||||
case MENU_LABEL_VALUE_UI_COMPANION_START_ON_BOOT:
|
||||
return "UI Companion Start On Boot";
|
||||
case MENU_LABEL_VALUE_UI_COMPANION_ENABLE:
|
||||
return "UI Companion Enable";
|
||||
case MENU_LABEL_VALUE_UI_MENUBAR_ENABLE:
|
||||
return "Menubar";
|
||||
case MENU_LABEL_VALUE_ARCHIVE_MODE:
|
||||
|
@ -22,6 +22,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MENU_LABEL_UI_COMPANION_ENABLE 0xb2d7a20cU
|
||||
#define MENU_LABEL_VALUE_UI_COMPANION_ENABLE 0xee4933ceU
|
||||
|
||||
#define MENU_LABEL_CHEEVOS_TEST_UNOFFICIAL 0xa1ae28f0U
|
||||
#define MENU_LABEL_VALUE_CHEEVOS_TEST_UNOFFICIAL 0x0698e665U
|
||||
|
||||
|
@ -5942,6 +5942,21 @@ static bool setting_append_list_ui_options(
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->ui.companion_enable,
|
||||
menu_hash_to_str(MENU_LABEL_UI_COMPANION_ENABLE),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_UI_COMPANION_ENABLE),
|
||||
ui_companion_enable,
|
||||
menu_hash_to_str(MENU_VALUE_OFF),
|
||||
menu_hash_to_str(MENU_VALUE_ON),
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
|
@ -46,11 +46,10 @@ void apple_rarch_exited(void);
|
||||
|
||||
static void rarch_enable_ui(void)
|
||||
{
|
||||
bool boolean = true;
|
||||
#ifdef HAVE_AVFOUNDATION
|
||||
[[RetroArch_iOS get] supportOtherAudioSessions];
|
||||
#endif
|
||||
|
||||
bool boolean = true;
|
||||
|
||||
ui_companion_set_foreground(true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user