mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-07 08:36:02 -10:00
settings: migrate the overlay enable setting to a single-source def file
Performed by tools/settings_migrate_group.py with the standard battery and the integrated enum consolidation stage; the lookup gate's parent baseline is computed per run.
This commit is contained in:
1 parent
ab0c198696
commit
c194072a51
8 files changed
+121
-16
No files matched your search
@@ -1964,6 +1964,7 @@ static struct config_bool_setting *populate_settings_bool(
|
||||
#include "settings/settings_def_video_fullscreen.h"
|
||||
#define SETTINGS_DEF_CONFIG_PASS
|
||||
#include "settings/settings_def_video_sync.h"
|
||||
#include "settings/settings_def_overlay_enable.h"
|
||||
#ifdef HAVE_MICROPHONE
|
||||
#include "settings/settings_def_microphone.h"
|
||||
#endif
|
||||
@@ -2347,6 +2348,7 @@ static struct config_float_setting *populate_settings_float(
|
||||
#include "settings/settings_def_video_fullscreen.h"
|
||||
#define SETTINGS_DEF_CONFIG_PASS
|
||||
#include "settings/settings_def_video_sync.h"
|
||||
#include "settings/settings_def_overlay_enable.h"
|
||||
#ifdef HAVE_MICROPHONE
|
||||
#include "settings/settings_def_microphone.h"
|
||||
#endif
|
||||
@@ -2669,6 +2671,7 @@ static struct config_uint_setting *populate_settings_uint(
|
||||
#include "settings/settings_def_video_fullscreen.h"
|
||||
#define SETTINGS_DEF_CONFIG_PASS
|
||||
#include "settings/settings_def_video_sync.h"
|
||||
#include "settings/settings_def_overlay_enable.h"
|
||||
#ifdef HAVE_MICROPHONE
|
||||
#include "settings/settings_def_microphone.h"
|
||||
#endif
|
||||
@@ -2966,6 +2969,7 @@ static struct config_int_setting *populate_settings_int(
|
||||
#include "settings/settings_def_video_fullscreen.h"
|
||||
#define SETTINGS_DEF_CONFIG_PASS
|
||||
#include "settings/settings_def_video_sync.h"
|
||||
#include "settings/settings_def_overlay_enable.h"
|
||||
#ifdef HAVE_MICROPHONE
|
||||
#include "settings/settings_def_microphone.h"
|
||||
#endif
|
||||
|
||||
@@ -1930,10 +1930,6 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE_STR
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_BEHIND_MENU,
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_BEHIND_MENU_STR
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU,
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU_STR
|
||||
|
||||
@@ -537,6 +537,7 @@ static const char *const msg_hash_us_lbl_strs[] = {
|
||||
#define S_FLOAT_NS(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us) n,
|
||||
#include "../settings/settings_def_video_fullscreen.h"
|
||||
#include "../settings/settings_def_video_sync.h"
|
||||
#include "../settings/settings_def_overlay_enable.h"
|
||||
#include "../settings/settings_def_microphone.h"
|
||||
#include "../settings/settings_def_audio_sync.h"
|
||||
#include "../settings/settings_def_audio_enable.h"
|
||||
@@ -601,6 +602,7 @@ static const uint32_t msg_hash_us_lbl_ids[] = {
|
||||
#define S_FLOAT_NS(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us) (uint32_t)MENU_ENUM_LABEL_##T,
|
||||
#include "../settings/settings_def_video_fullscreen.h"
|
||||
#include "../settings/settings_def_video_sync.h"
|
||||
#include "../settings/settings_def_overlay_enable.h"
|
||||
#include "../settings/settings_def_microphone.h"
|
||||
#include "../settings/settings_def_audio_sync.h"
|
||||
#include "../settings/settings_def_audio_enable.h"
|
||||
|
||||
+32
-8
@@ -5808,14 +5808,38 @@ MSG_HASH(
|
||||
"Overlays are used for borders and on-screen controls."
|
||||
)
|
||||
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_BEHIND_MENU,
|
||||
"Show Overlay Behind Menu"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_INPUT_OVERLAY_BEHIND_MENU,
|
||||
"Show the overlay behind instead of in front of the menu."
|
||||
)
|
||||
/* GENERATED REGION: overlay enable setting (see settings_def_overlay_enable.h). */
|
||||
#define SETTINGS_DEF_STRINGS_PASS
|
||||
#define S_BOOL(f, T, n, d, sd, df, c, us, sub) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us) \
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_##T, sub)
|
||||
#define S_BOOL_NS(f, T, n, d, sd, df, c, us) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us)
|
||||
#define S_UINT(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us, sub) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us) \
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_##T, sub)
|
||||
#define S_UINT_NS(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us)
|
||||
#define S_INT(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us, sub) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us) \
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_##T, sub)
|
||||
#define S_INT_NS(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us)
|
||||
#define S_FLOAT(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us, sub) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us) \
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_##T, sub)
|
||||
#define S_FLOAT_NS(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us)
|
||||
#include "../settings/settings_def_overlay_enable.h"
|
||||
#undef S_BOOL
|
||||
#undef S_BOOL_NS
|
||||
#undef S_UINT
|
||||
#undef S_UINT_NS
|
||||
#undef S_INT
|
||||
#undef S_INT_NS
|
||||
#undef S_FLOAT
|
||||
#undef S_FLOAT_NS
|
||||
#undef SETTINGS_DEF_STRINGS_PASS
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU,
|
||||
"Hide Overlay in Menu"
|
||||
|
||||
+26
-2
@@ -16088,8 +16088,32 @@ static bool setting_append_list(
|
||||
{
|
||||
{
|
||||
static const setting_desc_t ovl_desc_0[] = {
|
||||
SDESC_BOOL_ROW(input_overlay_behind_menu, INPUT_OVERLAY_BEHIND_MENU,
|
||||
DEFAULT_OVERLAY_BEHIND_MENU, SD_FLAG_NONE, 0, 0),
|
||||
/* GENERATED: rows come from settings_def_overlay_enable.h in order. */
|
||||
#define S_BOOL(f, T, n, d, sd, df, c, us, sub) \
|
||||
SDESC_BOOL_ROW(f, T, d, sd, df, c),
|
||||
#define S_BOOL_NS(f, T, n, d, sd, df, c, us) \
|
||||
SDESC_BOOL_ROW(f, T, d, sd, df, c),
|
||||
#define S_UINT(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us, sub) \
|
||||
SDESC_UINT_ROW(f, T, d, sd, df, c, mn, mx, st, ob, ok, rp),
|
||||
#define S_UINT_NS(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us) \
|
||||
SDESC_UINT_ROW(f, T, d, sd, df, c, mn, mx, st, ob, ok, rp),
|
||||
#define S_INT(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us, sub) \
|
||||
SDESC_INT_ROW(f, T, d, sd, df, c, mn, mx, st, ob, ok, rp),
|
||||
#define S_INT_NS(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us) \
|
||||
SDESC_INT_ROW(f, T, d, sd, df, c, mn, mx, st, ob, ok, rp),
|
||||
#define S_FLOAT(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us, sub) \
|
||||
SDESC_FLOAT_ROW(f, T, d, rnd, sd, df, c, mn, mx, st, ok, rp),
|
||||
#define S_FLOAT_NS(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us) \
|
||||
SDESC_FLOAT_ROW(f, T, d, rnd, sd, df, c, mn, mx, st, ok, rp),
|
||||
#include "../settings/settings_def_overlay_enable.h"
|
||||
#undef S_BOOL
|
||||
#undef S_BOOL_NS
|
||||
#undef S_UINT
|
||||
#undef S_UINT_NS
|
||||
#undef S_INT
|
||||
#undef S_INT_NS
|
||||
#undef S_FLOAT
|
||||
#undef S_FLOAT_NS
|
||||
};
|
||||
settings_list_add_desc(list, list_info, settings,
|
||||
ovl_desc_0, ARRAY_SIZE(ovl_desc_0),
|
||||
|
||||
+38
-1
@@ -1435,7 +1435,44 @@ enum msg_hash_enums
|
||||
MENU_LABEL(INPUT_OSK_OVERLAY_ENABLE),
|
||||
MENU_LABEL(INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO),
|
||||
MENU_LABEL(INPUT_QUIT_GAMEPAD_COMBO),
|
||||
MENU_LABEL(INPUT_OVERLAY_BEHIND_MENU),
|
||||
/* GENERATED REGION: overlay enable setting enum rows (see settings/settings_def_overlay_enable.h). */
|
||||
#define SETTINGS_DEF_ENUM_PASS
|
||||
#define SETTINGS_DEF_STRINGS_PASS
|
||||
#define S_BOOL(f, T, n, d, sd, df, c, us, sub) MENU_LABEL(T),
|
||||
#define S_BOOL_NS(f, T, n, d, sd, df, c, us) MENU_LABEL(T),
|
||||
#define S_UINT(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us, sub) MENU_LABEL(T),
|
||||
#define S_UINT_NS(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us) MENU_LABEL(T),
|
||||
#define S_INT(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us, sub) MENU_LABEL(T),
|
||||
#define S_INT_NS(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us) MENU_LABEL(T),
|
||||
#define S_FLOAT(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us, sub) MENU_LABEL(T),
|
||||
#define S_FLOAT_NS(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us) MENU_LABEL(T),
|
||||
#define S_BOOL_H(f, T, n, d, sd, df, c, us, sub) MENU_LBL_H(T),
|
||||
#define S_UINT_H(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us, sub) MENU_LBL_H(T),
|
||||
#define S_BOOL_NS_H(f, T, n, d, sd, df, c, us) MENU_LBL_H(T),
|
||||
#define S_INT_H(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us, sub) MENU_LBL_H(T),
|
||||
#define S_FLOAT_H(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us, sub) MENU_LBL_H(T),
|
||||
#define S_UINT_NS_H(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us) MENU_LBL_H(T),
|
||||
#define S_INT_NS_H(f, T, n, d, sd, df, c, mn, mx, st, ob, ok, rp, us) MENU_LBL_H(T),
|
||||
#define S_FLOAT_NS_H(f, T, n, d, rnd, sd, df, c, mn, mx, st, ok, rp, us) MENU_LBL_H(T),
|
||||
#include "settings/settings_def_overlay_enable.h"
|
||||
#undef S_BOOL
|
||||
#undef S_BOOL_NS
|
||||
#undef S_UINT
|
||||
#undef S_UINT_NS
|
||||
#undef S_INT
|
||||
#undef S_INT_NS
|
||||
#undef S_FLOAT
|
||||
#undef S_FLOAT_NS
|
||||
#undef S_BOOL_H
|
||||
#undef S_UINT_H
|
||||
#undef S_BOOL_NS_H
|
||||
#undef S_INT_H
|
||||
#undef S_FLOAT_H
|
||||
#undef S_UINT_NS_H
|
||||
#undef S_INT_NS_H
|
||||
#undef S_FLOAT_NS_H
|
||||
#undef SETTINGS_DEF_STRINGS_PASS
|
||||
#undef SETTINGS_DEF_ENUM_PASS
|
||||
MENU_LABEL(INPUT_OVERLAY_HIDE_IN_MENU),
|
||||
MENU_LABEL(INPUT_OVERLAY_HIDE_WHEN_GAMEPAD_CONNECTED),
|
||||
#if defined(ANDROID)
|
||||
|
||||
@@ -486,7 +486,6 @@
|
||||
#define MENU_ENUM_LABEL_INPUT_OVERLAY_STR "input_overlay"
|
||||
#define MENU_ENUM_LABEL_INPUT_OSK_OVERLAY_STR "input_osk_overlay"
|
||||
#define MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE_STR "input_overlay_enable"
|
||||
#define MENU_ENUM_LABEL_INPUT_OVERLAY_BEHIND_MENU_STR "overlay_behind_menu"
|
||||
#define MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU_STR "overlay_hide_in_menu"
|
||||
#define MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_WHEN_GAMEPAD_CONNECTED_STR "overlay_hide_when_gamepad_connected"
|
||||
#define MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_INPUTS_STR "input_overlay_show_inputs"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* Single-source definitions: overlay enable setting.
|
||||
* Grammar identical to settings_def_video_sync.h plus S_FLOAT and
|
||||
* the _NS no-sublabel variants; the descriptor argument span
|
||||
* matches SDESC_<kind>_ROW; row order is menu display order;
|
||||
* h2json.py parses these rows for the Crowdin source upload. */
|
||||
|
||||
/* Descriptor and configuration rows are #ifdef HAVE_OVERLAY; the string
|
||||
* tables always carry this row via the strings pass. */
|
||||
#if defined(HAVE_OVERLAY) || defined(SETTINGS_DEF_STRINGS_PASS)
|
||||
/* config key "input_overlay_behind_menu" differs from the label string; the
|
||||
* configuration.c row stays literal for this setting. */
|
||||
#ifndef SETTINGS_DEF_CONFIG_PASS
|
||||
S_BOOL(input_overlay_behind_menu, INPUT_OVERLAY_BEHIND_MENU,
|
||||
"overlay_behind_menu",
|
||||
DEFAULT_OVERLAY_BEHIND_MENU, SD_FLAG_NONE, 0, 0,
|
||||
"Show Overlay Behind Menu",
|
||||
"Show the overlay behind instead of in front of the menu.")
|
||||
#endif
|
||||
#endif
|
||||
Reference in new issue
Block a user