Turn a bunch of variables into macros

This commit is contained in:
twinaphex 2019-06-14 11:13:02 +02:00
parent 523b516195
commit 408d41b629
4 changed files with 74 additions and 69 deletions

View File

@ -73,14 +73,17 @@
#define DEFAULT_MATERIALUI_ICONS_ENABLE true
#endif
static const unsigned crt_switch_resolution = CRT_SWITCH_NONE;
static const int crt_switch_resolution_super = 2560;
static const int crt_switch_center_adjust = 0;
#define DEFAULT_CRT_SWITCH_RESOLUTION CRT_SWITCH_NONE
static const bool def_history_list_enable = true;
static const bool def_playlist_entry_rename = true;
#define DEFAULT_CRT_SWITCH_RESOLUTION_SUPER 2560
static const unsigned int def_user_language = 0;
#define DEFAULT_CRT_SWITCH_CENTER_ADJUST 0
#define DEFAULT_HISTORY_LIST_ENABLE true
#define DEFAULT_PLAYLIST_ENTRY_RENAME true
#define DEFAULT_USER_LANGUAGE 0
#if (defined(_WIN32) && !defined(_XBOX)) || (defined(__linux) && !defined(ANDROID) && !defined(HAVE_LAKKA)) || (defined(__MACH__) && !defined(IOS)) || defined(EMSCRIPTEN)
#define DEFAULT_MOUSE_ENABLE true
@ -284,13 +287,13 @@ static const unsigned int def_user_language = 0;
#define DEFAULT_BLOCK_CONFIG_READ true
#ifdef HAVE_LIBNX
static bool menu_use_preferred_system_color_theme = true;
#define DEFAULT_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME true
#else
static bool menu_use_preferred_system_color_theme = false;
#define DEFAULT_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME false
#endif
#ifdef HAVE_OZONE
static bool ozone_collapse_sidebar = false;
#define DEFAULT_OZONE_COLLAPSE_SIDEBAR false
#endif
static bool quick_menu_show_take_screenshot = true;
@ -365,10 +368,11 @@ static unsigned menu_font_color_blue = 255;
static unsigned xmb_menu_layout = 0;
static unsigned xmb_icon_theme = XMB_ICON_THEME_MONOCHROME;
static unsigned xmb_theme = XMB_THEME_ELECTRIC_BLUE;
#if defined(HAVE_LAKKA) || defined(__arm__) || defined(__PPC64__) || defined(__ppc64__) || defined(__powerpc64__) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__)
static bool xmb_shadows_enable = false;
#define DEFAULT_XMB_SHADOWS_ENABLE false
#else
static bool xmb_shadows_enable = true;
#define DEFAULT_XMB_SHADOWS_ENABLE true
#endif
#endif
@ -381,14 +385,15 @@ static float menu_footer_opacity = 1.000;
static float menu_header_opacity = 1.000;
#if defined(HAVE_OPENGLES2) || (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
static unsigned menu_shader_pipeline = 1;
#define DEFAULT_MENU_SHADER_PIPELINE 1
#else
static unsigned menu_shader_pipeline = 2;
#define DEFAULT_MENU_SHADER_PIPELINE 2
#endif
static bool show_advanced_settings = false;
#define DEFAULT_SHOW_ADVANCED_SETTINGS false
#define DEFAULT_RGUI_COLOR_THEME RGUI_THEME_CLASSIC_GREEN
static unsigned rgui_color_theme = RGUI_THEME_CLASSIC_GREEN;
static bool rgui_inline_thumbnails = false;
static bool rgui_swap_thumbnails = false;
static unsigned rgui_thumbnail_downscaler = RGUI_THUMB_SCALE_POINT;
@ -439,7 +444,7 @@ static unsigned input_backtouch_enable = false;
static unsigned input_backtouch_toggle = false;
#endif
static bool show_physical_inputs = true;
#define DEFAULT_SHOW_PHYSICAL_INPUTS true
static bool all_users_control_menu = false;
@ -483,22 +488,22 @@ static const float message_bgcolor_opacity = 1.0f;
/* Record post-filtered (CPU filter) video,
* rather than raw game output. */
static const bool post_filter_record = false;
#define DEFAULT_POST_FILTER_RECORD false
/* Screenshots post-shaded GPU output if available. */
static const bool gpu_screenshot = true;
#define DEFAULT_GPU_SCREENSHOT true
/* Watch shader files for changes and auto-apply as necessary. */
static const bool video_shader_watch_files = false;
#define DEFAULT_VIDEO_SHADER_WATCH_FILES false
/* Screenshots named automatically. */
static const bool auto_screenshot_filename = true;
#define DEFAULT_AUTO_SCREENSHOT_FILENAME true
/* Record post-shaded GPU output instead of raw game footage if available. */
static const bool gpu_record = false;
#define DEFAULT_GPU_RECORD false
/* OSD-messages. */
static const bool font_enable = true;
#define DEFAULT_FONT_ENABLE true
/* The accurate refresh rate of your monitor (Hz).
* This is used to calculate audio input rate with the formula:
@ -521,7 +526,7 @@ static const float crt_refresh_rate = 60/1.001;
/* Allow games to set rotation. If false, rotation requests are
* honored, but ignored.
* Used for setups where one manually rotates the monitor. */
static const bool allow_rotate = true;
#define DEFAULT_ALLOW_ROTATE true
#if defined(_3DS)
/* Enable bottom LCD screen */
@ -543,9 +548,9 @@ static const bool audio_enable_menu_notice = false;
static const bool audio_enable_menu_bgm = false;
#ifdef HAVE_MENU_WIDGETS
static const bool menu_enable_widgets = true;
#define DEFAULT_MENU_ENABLE_WIDGETS true
#else
static const bool menu_enable_widgets = false;
#define DEFAULT_MENU_ENABLE_WIDGETS false
#endif
/* Output samplerate. */
@ -558,7 +563,7 @@ static const bool menu_enable_widgets = false;
#endif
/* Audio device (e.g. hw:0,0 or /dev/audio). If NULL, will use defaults. */
static const char *audio_device = NULL;
#define DEFAULT_AUDIO_DEVICE NULL
/* Desired audio latency in milliseconds. Might not be honored
* if driver can't provide given latency. */
@ -865,7 +870,7 @@ static const bool vibrate_on_keypress = false;
static const bool enable_device_vibration = false;
#ifdef HAVE_VULKAN
static const int vulkan_gpu_index = 0;
#define DEFAULT_VULKAN_GPU_INDEX 0
#endif
#if defined(HAKCHI)

View File

@ -1353,7 +1353,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("ui_companion_enable", &settings->bools.ui_companion_enable, true, ui_companion_enable, false);
SETTING_BOOL("ui_companion_toggle", &settings->bools.ui_companion_toggle, false, ui_companion_toggle, false);
SETTING_BOOL("desktop_menu_enable", &settings->bools.desktop_menu_enable, true, desktop_menu_enable, false);
SETTING_BOOL("video_gpu_record", &settings->bools.video_gpu_record, true, gpu_record, false);
SETTING_BOOL("video_gpu_record", &settings->bools.video_gpu_record, true, DEFAULT_GPU_RECORD, false);
SETTING_BOOL("input_remap_binds_enable", &settings->bools.input_remap_binds_enable, true, true, false);
SETTING_BOOL("all_users_control_menu", &settings->bools.input_all_users_control_menu, true, all_users_control_menu, false);
SETTING_BOOL("menu_swap_ok_cancel_buttons", &settings->bools.input_menu_swap_ok_cancel_buttons, true, menu_swap_ok_cancel_buttons, false);
@ -1404,12 +1404,12 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("run_ahead_hide_warnings", &settings->bools.run_ahead_hide_warnings, true, false, false);
SETTING_BOOL("audio_sync", &settings->bools.audio_sync, true, DEFAULT_AUDIO_SYNC, false);
SETTING_BOOL("video_shader_enable", &settings->bools.video_shader_enable, true, DEFAULT_SHADER_ENABLE, false);
SETTING_BOOL("video_shader_watch_files", &settings->bools.video_shader_watch_files, true, video_shader_watch_files, false);
SETTING_BOOL("video_shader_watch_files", &settings->bools.video_shader_watch_files, true, DEFAULT_VIDEO_SHADER_WATCH_FILES, false);
/* Let implementation decide if automatic, or 1:1 PAR. */
SETTING_BOOL("video_aspect_ratio_auto", &settings->bools.video_aspect_ratio_auto, true, DEFAULT_ASPECT_RATIO_AUTO, false);
SETTING_BOOL("video_allow_rotate", &settings->bools.video_allow_rotate, true, allow_rotate, false);
SETTING_BOOL("video_allow_rotate", &settings->bools.video_allow_rotate, true, DEFAULT_ALLOW_ROTATE, false);
SETTING_BOOL("video_windowed_fullscreen", &settings->bools.video_windowed_fullscreen, true, DEFAULT_WINDOWED_FULLSCREEN, false);
SETTING_BOOL("video_crop_overscan", &settings->bools.video_crop_overscan, true, DEFAULT_CROP_OVERSCAN, false);
SETTING_BOOL("video_scale_integer", &settings->bools.video_scale_integer, true, DEFAULT_SCALE_INTEGER, false);
@ -1417,7 +1417,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("video_force_aspect", &settings->bools.video_force_aspect, true, DEFAULT_FORCE_ASPECT, false);
SETTING_BOOL("video_threaded", video_driver_get_threaded(), true, DEFAULT_VIDEO_THREADED, false);
SETTING_BOOL("video_shared_context", &settings->bools.video_shared_context, true, DEFAULT_VIDEO_SHARED_CONTEXT, false);
SETTING_BOOL("auto_screenshot_filename", &settings->bools.auto_screenshot_filename, true, auto_screenshot_filename, false);
SETTING_BOOL("auto_screenshot_filename", &settings->bools.auto_screenshot_filename, true, DEFAULT_AUTO_SCREENSHOT_FILENAME, false);
SETTING_BOOL("video_force_srgb_disable", &settings->bools.video_force_srgb_disable, true, false, false);
SETTING_BOOL("video_fullscreen", &settings->bools.video_fullscreen, true, DEFAULT_FULLSCREEN, false);
SETTING_BOOL("bundle_assets_extract_enable", &settings->bools.bundle_assets_extract_enable, true, DEFAULT_BUNDLE_ASSETS_EXTRACT_ENABLE, false);
@ -1427,12 +1427,12 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("video_black_frame_insertion", &settings->bools.video_black_frame_insertion, true, DEFAULT_BLACK_FRAME_INSERTION, false);
SETTING_BOOL("video_disable_composition", &settings->bools.video_disable_composition, true, DEFAULT_DISABLE_COMPOSITION, false);
SETTING_BOOL("pause_nonactive", &settings->bools.pause_nonactive, true, DEFAULT_PAUSE_NONACTIVE, false);
SETTING_BOOL("video_gpu_screenshot", &settings->bools.video_gpu_screenshot, true, gpu_screenshot, false);
SETTING_BOOL("video_post_filter_record", &settings->bools.video_post_filter_record, true, post_filter_record, false);
SETTING_BOOL("video_gpu_screenshot", &settings->bools.video_gpu_screenshot, true, DEFAULT_GPU_SCREENSHOT, false);
SETTING_BOOL("video_post_filter_record", &settings->bools.video_post_filter_record, true, DEFAULT_POST_FILTER_RECORD, false);
SETTING_BOOL("keyboard_gamepad_enable", &settings->bools.input_keyboard_gamepad_enable, true, true, false);
SETTING_BOOL("core_set_supports_no_game_enable", &settings->bools.set_supports_no_game_enable, true, true, false);
SETTING_BOOL("audio_enable", &settings->bools.audio_enable, true, DEFAULT_AUDIO_ENABLE, false);
SETTING_BOOL("menu_enable_widgets", &settings->bools.menu_enable_widgets, true, menu_enable_widgets, false);
SETTING_BOOL("menu_enable_widgets", &settings->bools.menu_enable_widgets, true, DEFAULT_MENU_ENABLE_WIDGETS, false);
SETTING_BOOL("audio_enable_menu", &settings->bools.audio_enable_menu, true, audio_enable_menu, false);
SETTING_BOOL("audio_enable_menu_ok", &settings->bools.audio_enable_menu_ok, true, audio_enable_menu_ok, false);
SETTING_BOOL("audio_enable_menu_cancel", &settings->bools.audio_enable_menu_cancel, true, audio_enable_menu_cancel, false);
@ -1441,7 +1441,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("audio_mute_enable", audio_get_bool_ptr(AUDIO_ACTION_MUTE_ENABLE), true, false, false);
SETTING_BOOL("audio_mixer_mute_enable", audio_get_bool_ptr(AUDIO_ACTION_MIXER_MUTE_ENABLE), true, false, false);
SETTING_BOOL("location_allow", &settings->bools.location_allow, true, false, false);
SETTING_BOOL("video_font_enable", &settings->bools.video_font_enable, true, font_enable, false);
SETTING_BOOL("video_font_enable", &settings->bools.video_font_enable, true, DEFAULT_FONT_ENABLE, false);
SETTING_BOOL("core_updater_auto_extract_archive", &settings->bools.network_buildbot_auto_extract_archive, true, true, false);
SETTING_BOOL("camera_allow", &settings->bools.camera_allow, true, false, false);
SETTING_BOOL("discord_allow", &settings->bools.discord_enable, true, false, false);
@ -1494,7 +1494,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("quick_menu_show_download_thumbnails", &settings->bools.quick_menu_show_download_thumbnails, true, quick_menu_show_download_thumbnails, false);
#endif
SETTING_BOOL("kiosk_mode_enable", &settings->bools.kiosk_mode_enable, true, kiosk_mode_enable, false);
SETTING_BOOL("menu_use_preferred_system_color_theme", &settings->bools.menu_use_preferred_system_color_theme, true, menu_use_preferred_system_color_theme, false);
SETTING_BOOL("menu_use_preferred_system_color_theme", &settings->bools.menu_use_preferred_system_color_theme, true, DEFAULT_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, false);
SETTING_BOOL("content_show_settings", &settings->bools.menu_content_show_settings, true, content_show_settings, false);
SETTING_BOOL("content_show_favorites", &settings->bools.menu_content_show_favorites, true, content_show_favorites, false);
#ifdef HAVE_IMAGEVIEWER
@ -1535,7 +1535,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("menu_navigation_wraparound_enable", &settings->bools.menu_navigation_wraparound_enable, true, true, false);
SETTING_BOOL("menu_navigation_browser_filter_supported_extensions_enable",
&settings->bools.menu_navigation_browser_filter_supported_extensions_enable, true, true, false);
SETTING_BOOL("menu_show_advanced_settings", &settings->bools.menu_show_advanced_settings, true, show_advanced_settings, false);
SETTING_BOOL("menu_show_advanced_settings", &settings->bools.menu_show_advanced_settings, true, DEFAULT_SHOW_ADVANCED_SETTINGS, false);
#ifdef HAVE_MATERIALUI
SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, DEFAULT_MATERIALUI_ICONS_ENABLE, false);
#endif
@ -1550,7 +1550,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("rgui_extended_ascii", &settings->bools.menu_rgui_extended_ascii, true, rgui_extended_ascii, false);
#endif
#ifdef HAVE_XMB
SETTING_BOOL("xmb_shadows_enable", &settings->bools.menu_xmb_shadows_enable, true, xmb_shadows_enable, false);
SETTING_BOOL("xmb_shadows_enable", &settings->bools.menu_xmb_shadows_enable, true, DEFAULT_XMB_SHADOWS_ENABLE, false);
SETTING_BOOL("xmb_vertical_thumbnails", &settings->bools.menu_xmb_vertical_thumbnails, true, xmb_vertical_thumbnails, false);
#endif
#endif
@ -1590,8 +1590,8 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("savestate_auto_save", &settings->bools.savestate_auto_save, true, savestate_auto_save, false);
SETTING_BOOL("savestate_auto_load", &settings->bools.savestate_auto_load, true, savestate_auto_load, false);
SETTING_BOOL("savestate_thumbnail_enable", &settings->bools.savestate_thumbnail_enable, true, savestate_thumbnail_enable, false);
SETTING_BOOL("history_list_enable", &settings->bools.history_list_enable, true, def_history_list_enable, false);
SETTING_BOOL("playlist_entry_rename", &settings->bools.playlist_entry_rename, true, def_playlist_entry_rename, false);
SETTING_BOOL("history_list_enable", &settings->bools.history_list_enable, true, DEFAULT_HISTORY_LIST_ENABLE, false);
SETTING_BOOL("playlist_entry_rename", &settings->bools.playlist_entry_rename, true, DEFAULT_PLAYLIST_ENTRY_RENAME, false);
SETTING_BOOL("game_specific_options", &settings->bools.game_specific_options, true, default_game_specific_options, false);
SETTING_BOOL("auto_overrides_enable", &settings->bools.auto_overrides_enable, true, default_auto_overrides_enable, false);
SETTING_BOOL("auto_remaps_enable", &settings->bools.auto_remaps_enable, true, default_auto_remaps_enable, false);
@ -1635,7 +1635,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("enable_device_vibration", &settings->bools.enable_device_vibration, true, enable_device_vibration, false);
#ifdef HAVE_OZONE
SETTING_BOOL("ozone_collapse_sidebar", &settings->bools.ozone_collapse_sidebar, true, ozone_collapse_sidebar, false);
SETTING_BOOL("ozone_collapse_sidebar", &settings->bools.ozone_collapse_sidebar, true, DEFAULT_OZONE_COLLAPSE_SIDEBAR, false);
#endif
SETTING_BOOL("translation_service_enable", &settings->bools.translation_service_enable, true, default_translation_service_enable, false);
@ -1702,7 +1702,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
#ifdef HAVE_NETWORKING
SETTING_UINT("streaming_mode", &settings->uints.streaming_mode, true, STREAMING_MODE_TWITCH, false);
#endif
SETTING_UINT("crt_switch_resolution", &settings->uints.crt_switch_resolution, true, crt_switch_resolution, false);
SETTING_UINT("crt_switch_resolution", &settings->uints.crt_switch_resolution, true, DEFAULT_CRT_SWITCH_RESOLUTION, false);
SETTING_UINT("input_bind_timeout", &settings->uints.input_bind_timeout, true, input_bind_timeout, false);
SETTING_UINT("input_bind_hold", &settings->uints.input_bind_hold, true, input_bind_hold, false);
SETTING_UINT("input_turbo_period", &settings->uints.input_turbo_period, true, turbo_period, false);
@ -1747,7 +1747,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
SETTING_UINT("menu_timedate_style", &settings->uints.menu_timedate_style, true, menu_timedate_style, false);
SETTING_UINT("menu_ticker_type", &settings->uints.menu_ticker_type, true, menu_ticker_type, false);
#ifdef HAVE_RGUI
SETTING_UINT("rgui_menu_color_theme", &settings->uints.menu_rgui_color_theme, true, rgui_color_theme, false);
SETTING_UINT("rgui_menu_color_theme", &settings->uints.menu_rgui_color_theme, true, DEFAULT_RGUI_COLOR_THEME, false);
SETTING_UINT("rgui_thumbnail_downscaler", &settings->uints.menu_rgui_thumbnail_downscaler, true, rgui_thumbnail_downscaler, false);
SETTING_UINT("rgui_thumbnail_delay", &settings->uints.menu_rgui_thumbnail_delay, true, rgui_thumbnail_delay, false);
SETTING_UINT("rgui_internal_upscale_level", &settings->uints.menu_rgui_internal_upscale_level, true, rgui_internal_upscale_level, false);
@ -1780,14 +1780,14 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
SETTING_UINT("menu_xmb_thumbnail_scale_factor", &settings->uints.menu_xmb_thumbnail_scale_factor, true, xmb_thumbnail_scale_factor, false);
#endif
SETTING_UINT("materialui_menu_color_theme", &settings->uints.menu_materialui_color_theme, true, MATERIALUI_THEME_BLUE, false);
SETTING_UINT("menu_shader_pipeline", &settings->uints.menu_xmb_shader_pipeline, true, menu_shader_pipeline, false);
SETTING_UINT("menu_shader_pipeline", &settings->uints.menu_xmb_shader_pipeline, true, DEFAULT_MENU_SHADER_PIPELINE, false);
#ifdef HAVE_OZONE
SETTING_UINT("ozone_menu_color_theme", &settings->uints.menu_ozone_color_theme, true, 1, false);
#endif
#endif
SETTING_UINT("audio_out_rate", &settings->uints.audio_out_rate, true, DEFAULT_OUTPUT_RATE, false);
SETTING_UINT("custom_viewport_width", &settings->video_viewport_custom.width, false, 0 /* TODO */, false);
SETTING_UINT("crt_switch_resolution_super", &settings->uints.crt_switch_resolution_super, true, crt_switch_resolution_super, false);
SETTING_UINT("crt_switch_resolution_super", &settings->uints.crt_switch_resolution_super, true, DEFAULT_CRT_SWITCH_RESOLUTION_SUPER, false);
SETTING_UINT("custom_viewport_height", &settings->video_viewport_custom.height, false, 0 /* TODO */, false);
SETTING_UINT("custom_viewport_x", (unsigned*)&settings->video_viewport_custom.x, false, 0 /* TODO */, false);
SETTING_UINT("custom_viewport_y", (unsigned*)&settings->video_viewport_custom.y, false, 0 /* TODO */, false);
@ -1808,7 +1808,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
SETTING_UINT("netplay_share_analog", &settings->uints.netplay_share_analog, true, netplay_share_analog, false);
#endif
#ifdef HAVE_LANGEXTRA
SETTING_UINT("user_language", msg_hash_get_uint(MSG_HASH_USER_LANGUAGE), true, def_user_language, false);
SETTING_UINT("user_language", msg_hash_get_uint(MSG_HASH_USER_LANGUAGE), true, DEFAULT_USER_LANGUAGE, false);
#endif
SETTING_UINT("bundle_assets_extract_version_current", &settings->uints.bundle_assets_extract_version_current, true, 0, false);
SETTING_UINT("bundle_assets_extract_last_version", &settings->uints.bundle_assets_extract_last_version, true, 0, false);
@ -1884,9 +1884,9 @@ static struct config_int_setting *populate_settings_int(settings_t *settings, in
#ifdef HAVE_WASAPI
SETTING_INT("audio_wasapi_sh_buffer_length", &settings->ints.audio_wasapi_sh_buffer_length, true, wasapi_sh_buffer_length, false);
#endif
SETTING_INT("crt_switch_center_adjust", &settings->ints.crt_switch_center_adjust, false, 0 /* TODO */, false);
SETTING_INT("crt_switch_center_adjust", &settings->ints.crt_switch_center_adjust, false, DEFAULT_CRT_SWITCH_CENTER_ADJUST, false);
#ifdef HAVE_VULKAN
SETTING_INT("vulkan_gpu_index", &settings->ints.vulkan_gpu_index, true, vulkan_gpu_index, false);
SETTING_INT("vulkan_gpu_index", &settings->ints.vulkan_gpu_index, true, DEFAULT_VULKAN_GPU_INDEX, false);
#endif
*size = count;
@ -2062,9 +2062,9 @@ void config_set_defaults(void)
g_defaults.settings.video_refresh_rate != refresh_rate)
settings->floats.video_refresh_rate = g_defaults.settings.video_refresh_rate;
if (audio_device)
if (DEFAULT_AUDIO_DEVICE)
strlcpy(settings->arrays.audio_device,
audio_device, sizeof(settings->arrays.audio_device));
DEFAULT_AUDIO_DEVICE, sizeof(settings->arrays.audio_device));
if (!g_defaults.settings.out_latency)
g_defaults.settings.out_latency = DEFAULT_OUT_LATENCY;

View File

@ -189,7 +189,7 @@ static int action_start_netplay_mitm_server(unsigned type, const char *label)
static int action_start_shader_watch_for_changes(unsigned type, const char *label)
{
settings_t *settings = config_get_ptr();
settings->bools.video_shader_watch_files = video_shader_watch_files;
settings->bools.video_shader_watch_files = DEFAULT_VIDEO_SHADER_WATCH_FILES;
return 0;
}

View File

@ -7361,7 +7361,7 @@ static bool setting_append_list(
bool_entries[4].target = &settings->bools.video_allow_rotate;
bool_entries[4].name_enum_idx = MENU_ENUM_LABEL_VIDEO_ALLOW_ROTATE;
bool_entries[4].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE;
bool_entries[4].default_value = allow_rotate;
bool_entries[4].default_value = DEFAULT_ALLOW_ROTATE;
bool_entries[4].flags = SD_FLAG_ADVANCED;
for (i = 0; i < ARRAY_SIZE(bool_entries); i++)
@ -9079,7 +9079,7 @@ static bool setting_append_list(
&settings->bools.video_gpu_screenshot,
MENU_ENUM_LABEL_VIDEO_GPU_SCREENSHOT,
MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT,
gpu_screenshot,
DEFAULT_GPU_SCREENSHOT,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -9144,7 +9144,7 @@ static bool setting_append_list(
&settings->uints.crt_switch_resolution,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION,
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION,
crt_switch_resolution,
DEFAULT_CRT_SWITCH_RESOLUTION,
&group_info,
&subgroup_info,
parent_group,
@ -9162,7 +9162,7 @@ static bool setting_append_list(
&settings->uints.crt_switch_resolution_super,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION_SUPER,
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER,
crt_switch_resolution_super,
DEFAULT_CRT_SWITCH_RESOLUTION_SUPER,
&group_info,
&subgroup_info,
parent_group,
@ -9179,7 +9179,7 @@ static bool setting_append_list(
&settings->ints.crt_switch_center_adjust,
MENU_ENUM_LABEL_CRT_SWITCH_X_AXIS_CENTERING,
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_X_AXIS_CENTERING,
crt_switch_center_adjust,
DEFAULT_CRT_SWITCH_CENTER_ADJUST,
&group_info,
&subgroup_info,
parent_group,
@ -10266,7 +10266,7 @@ static bool setting_append_list(
&settings->bools.video_post_filter_record,
MENU_ENUM_LABEL_VIDEO_POST_FILTER_RECORD,
MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD,
post_filter_record,
DEFAULT_POST_FILTER_RECORD,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -10282,7 +10282,7 @@ static bool setting_append_list(
&settings->bools.video_gpu_record,
MENU_ENUM_LABEL_VIDEO_GPU_RECORD,
MENU_ENUM_LABEL_VALUE_VIDEO_GPU_RECORD,
gpu_record,
DEFAULT_GPU_RECORD,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -10509,7 +10509,7 @@ static bool setting_append_list(
&settings->bools.video_font_enable,
MENU_ENUM_LABEL_VIDEO_FONT_ENABLE,
MENU_ENUM_LABEL_VALUE_VIDEO_FONT_ENABLE,
font_enable,
DEFAULT_FONT_ENABLE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -10770,7 +10770,7 @@ static bool setting_append_list(
&settings->bools.input_overlay_show_physical_inputs,
MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS,
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS,
show_physical_inputs,
DEFAULT_SHOW_PHYSICAL_INPUTS,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -11199,7 +11199,7 @@ static bool setting_append_list(
&settings->uints.menu_rgui_color_theme,
MENU_ENUM_LABEL_RGUI_MENU_COLOR_THEME,
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME,
rgui_color_theme,
DEFAULT_RGUI_COLOR_THEME,
&group_info,
&subgroup_info,
parent_group,
@ -11409,7 +11409,7 @@ static bool setting_append_list(
&settings->bools.menu_show_advanced_settings,
MENU_ENUM_LABEL_SHOW_ADVANCED_SETTINGS,
MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS,
show_advanced_settings,
DEFAULT_SHOW_ADVANCED_SETTINGS,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -11425,7 +11425,7 @@ static bool setting_append_list(
&settings->bools.menu_enable_widgets,
MENU_ENUM_LABEL_MENU_WIDGETS_ENABLE,
MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE,
menu_enable_widgets,
DEFAULT_MENU_ENABLE_WIDGETS,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -11663,7 +11663,7 @@ static bool setting_append_list(
&settings->bools.menu_xmb_shadows_enable,
MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE,
MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE,
xmb_shadows_enable,
DEFAULT_XMB_SHADOWS_ENABLE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -11681,7 +11681,7 @@ static bool setting_append_list(
&settings->uints.menu_xmb_shader_pipeline,
MENU_ENUM_LABEL_XMB_RIBBON_ENABLE,
MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE,
menu_shader_pipeline,
DEFAULT_MENU_SHADER_PIPELINE,
&group_info,
&subgroup_info,
parent_group,
@ -11720,7 +11720,7 @@ static bool setting_append_list(
&settings->bools.menu_use_preferred_system_color_theme,
MENU_ENUM_LABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME,
MENU_ENUM_LABEL_VALUE_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME,
menu_use_preferred_system_color_theme,
DEFAULT_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -12194,7 +12194,7 @@ static bool setting_append_list(
&settings->bools.ozone_collapse_sidebar,
MENU_ENUM_LABEL_OZONE_COLLAPSE_SIDEBAR,
MENU_ENUM_LABEL_VALUE_OZONE_COLLAPSE_SIDEBAR,
ozone_collapse_sidebar,
DEFAULT_OZONE_COLLAPSE_SIDEBAR,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -13133,7 +13133,7 @@ static bool setting_append_list(
&settings->bools.playlist_entry_rename,
MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
def_playlist_entry_rename,
DEFAULT_PLAYLIST_ENTRY_RENAME,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -14003,7 +14003,7 @@ static bool setting_append_list(
msg_hash_get_uint(MSG_HASH_USER_LANGUAGE),
MENU_ENUM_LABEL_USER_LANGUAGE,
MENU_ENUM_LABEL_VALUE_USER_LANGUAGE,
def_user_language,
DEFAULT_USER_LANGUAGE,
&group_info,
&subgroup_info,
parent_group,