(config.def.h) Turn const variables into macros

This commit is contained in:
twinaphex 2019-06-02 17:18:52 +02:00
parent cc22680480
commit 5a4294359a
4 changed files with 196 additions and 199 deletions

View File

@ -70,7 +70,7 @@
#endif
#ifdef HAVE_MATERIALUI
static bool materialui_icons_enable = true;
#define DEFAULT_MATERIALUI_ICONS_ENABLE true
#endif
static const unsigned crt_switch_resolution = CRT_SWITCH_NONE;
@ -84,13 +84,13 @@ static const bool def_playlist_entry_rename = true;
static const unsigned int def_user_language = 0;
#if (defined(_WIN32) && !defined(_XBOX)) || (defined(__linux) && !defined(ANDROID) && !defined(HAVE_LAKKA)) || (defined(__MACH__) && !defined(IOS)) || defined(EMSCRIPTEN)
static const bool def_mouse_enable = true;
#define DEFAULT_MOUSE_ENABLE true
#else
static const bool def_mouse_enable = false;
#define DEFAULT_MOUSE_ENABLE false
#endif
#ifdef HAVE_CHEEVOS
static const bool cheevos_enable = false;
#define DEFAULT_CHEEVOS_ENABLE false
#endif
/* VIDEO */
@ -105,34 +105,33 @@ static const bool cheevos_enable = false;
* Real x resolution = aspect * base_size * x scale
* Real y resolution = base_size * y scale
*/
static const float scale = 3.0;
#define DEFAULT_SCALE (3.0)
/* Fullscreen */
/* To start in Fullscreen, or not. */
static const bool fullscreen = false;
#define DEFAULT_FULLSCREEN false
/* To use windowed mode or not when going fullscreen. */
static const bool windowed_fullscreen = true;
#define DEFAULT_WINDOWED_FULLSCREEN true
/* Which monitor to prefer. 0 is any monitor, 1 and up selects
* specific monitors, 1 being the first monitor. */
static const unsigned monitor_index = 0;
#define DEFAULT_MONITOR_INDEX 0
/* Window */
/* Window size. A value of 0 uses window scale
* multiplied by the core framebuffer size. */
static const unsigned window_width = 1280;
static const unsigned window_height = 720;
#define DEFAULT_WINDOW_WIDTH 1280
#define DEFAULT_WINDOW_HEIGHT 720
/* Fullscreen resolution. A value of 0 uses the desktop
* resolution. */
static const unsigned fullscreen_x = 0;
static const unsigned fullscreen_y = 0;
#define DEFAULT_FULLSCREEN_X 0
#define DEFAULT_FULLSCREEN_Y 0
/* Number of threads to use for video recording */
static const unsigned video_record_threads = 2;
#define DEFAULT_VIDEO_RECORD_THREADS 2
/* Amount of transparency to use for the main window.
* 1 is the most transparent while 100 is opaque.
@ -148,44 +147,45 @@ static const bool load_dummy_on_core_shutdown = false;
static const bool load_dummy_on_core_shutdown = true;
#endif
static const bool check_firmware_before_loading = false;
/* Forcibly disable composition.
* Only valid on Windows Vista/7/8 for now. */
static const bool disable_composition = false;
#define DEFAULT_DISABLE_COMPOSITION false
/* Video VSYNC (recommended) */
static const bool vsync = true;
#define DEFAULT_VSYNC false
static const unsigned max_swapchain_images = 3;
#define DEFAULT_MAX_SWAPCHAIN_IMAGES 3
static const bool adaptive_vsync = false;
#define DEFAULT_ADAPTIVE_VSYNC false
/* Attempts to hard-synchronize CPU and GPU.
* Can reduce latency at cost of performance. */
static const bool hard_sync = false;
#define DEFAULT_HARD_SYNC false
/* Configures how many frames the GPU can run ahead of CPU.
* 0: Syncs to GPU immediately.
* 1: Syncs to previous frame.
* 2: Etc ...
*/
static const unsigned hard_sync_frames = 0;
#define DEFAULT_HARD_SYNC_FRAMES 0
/* Sets how many milliseconds to delay after VSync before running the core.
* Can reduce latency at cost of higher risk of stuttering.
*/
static const unsigned frame_delay = 0;
#define DEFAULT_FRAME_DELAY 0
/* Inserts a black frame inbetween frames.
* Useful for 120 Hz monitors who want to play 60 Hz material with eliminated
* ghosting. video_refresh_rate should still be configured as if it
* is a 60 Hz monitor (divide refresh rate by 2).
*/
static bool black_frame_insertion = false;
#define DEFAULT_BLACK_FRAME_INSERTION false
/* Uses a custom swap interval for VSync.
* Set this to effectively halve monitor refresh rate.
*/
static unsigned swap_interval = 1;
#define DEFAULT_SWAP_INTERVAL 1
/* Threaded video. Will possibly increase performance significantly
* at the cost of worse synchronization and latency.
@ -219,10 +219,10 @@ static const bool video_vfilter = true;
#endif
/* Smooths picture. */
static const bool video_smooth = true;
#define DEFAULT_VIDEO_SMOOTH true
/* On resize and fullscreen, rendering area will stay 4:3 */
static const bool force_aspect = true;
#define DEFAULT_FORCE_ASPECT true
/* Enable use of shaders. */
#ifdef RARCH_CONSOLE
@ -239,25 +239,22 @@ static const bool scale_integer = false;
/* Controls aspect ratio handling. */
/* Automatic */
static const float aspect_ratio = DEFAULT_ASPECT_RATIO;
/* 1:1 PAR */
static const bool aspect_ratio_auto = false;
#define DEFAULT_ASPECT_RATIO_AUTO false
#if defined(__CELLOS_LV2) || defined(_XBOX360)
static unsigned aspect_ratio_idx = ASPECT_RATIO_16_9;
#define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_16_9
#elif defined(PSP)
static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
#define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_CORE
#elif defined(_3DS)
/* Previously defaulted to ASPECT_RATIO_4_3.
* Non-4:3 content looks dreadful when stretched
* to 4:3 on the 3DS screen... */
static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
#define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_CORE
#elif defined(RARCH_CONSOLE)
static unsigned aspect_ratio_idx = ASPECT_RATIO_4_3;
#define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_4_3
#else
static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
#define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_CORE
#endif
/* Save configuration file on exit. */
@ -460,9 +457,9 @@ static const bool crop_overscan = true;
/* Font size for on-screen messages. */
#if defined(HAVE_LIBDBGFONT)
static const float font_size = 1.0f;
#define DEFAULT_FONT_SIZE 1.0f
#else
static const float font_size = 32;
#define DEFAULT_FONT_SIZE 32
#endif
/* Offset for where messages will be placed on-screen.
@ -536,7 +533,7 @@ static const unsigned video_3ds_display_mode = CTR_VIDEO_MODE_3D;
/* AUDIO */
/* Will enable audio or not. */
static const bool audio_enable = true;
#define DEFAULT_AUDIO_ENABLE true
/* Enable menu audio sounds. */
static const bool audio_enable_menu = false;
@ -553,11 +550,11 @@ static const bool menu_enable_widgets = false;
/* Output samplerate. */
#ifdef GEKKO
static const unsigned out_rate = 32000;
#define DEFAULT_OUTPUT_RATE 32000
#elif defined(_3DS)
static const unsigned out_rate = 32730;
#define DEFAULT_OUTPUT_RATE 32730
#else
static const unsigned out_rate = 48000;
#define DEFAULT_OUTPUT_RATE 48000
#endif
/* Audio device (e.g. hw:0,0 or /dev/audio). If NULL, will use defaults. */
@ -567,34 +564,34 @@ static const char *audio_device = NULL;
* if driver can't provide given latency. */
#if defined(ANDROID) || defined(EMSCRIPTEN)
/* For most Android devices, 64ms is way too low. */
static const int out_latency = 128;
#define DEFAULT_OUT_LATENCY 128
#else
static const int out_latency = 64;
#define DEFAULT_OUT_LATENCY 64
#endif
/* Will sync audio. (recommended) */
static const bool audio_sync = true;
#define DEFAULT_AUDIO_SYNC true
/* Audio rate control. */
#if !defined(RARCH_CONSOLE)
static const bool rate_control = true;
#define DEFAULT_RATE_CONTROL true
#else
static const bool rate_control = false;
#define DEFAULT_RATE_CONTROL false
#endif
/* Rate control delta. Defines how much rate_control
* is allowed to adjust input rate. */
static const float rate_control_delta = 0.005;
#define DEFAULT_RATE_CONTROL_DELTA 0.005
/* Maximum timing skew. Defines how much adjust_system_rates
* is allowed to adjust input rate. */
static const float max_timing_skew = 0.05;
#define DEFAULT_MAX_TIMING_SKEW 0.05
/* Default audio volume in dB. (0.0 dB == unity gain). */
static const float audio_volume = 0.0;
#define DEFAULT_AUDIO_VOLUME 0.0
/* Default audio volume of the audio mixer in dB. (0.0 dB == unity gain). */
static const float audio_mixer_volume = 0.0;
#define DEFAULT_AUDIO_MIXER_VOLUME 0.0
#ifdef HAVE_WASAPI
/* WASAPI defaults */
@ -606,56 +603,56 @@ static const int wasapi_sh_buffer_length = -16; /* auto */
/* MISC */
/* Enables displaying the current frames per second. */
static const bool fps_show = false;
#define DEFAULT_FPS_SHOW false
/* Enables displaying the current frame count. */
static const bool framecount_show = false;
#define DEFAULT_FRAMECOUNT_SHOW false
/* Includes displaying the current memory usage/total with FPS/Frames. */
static const bool memory_show = false;
#define DEFAULT_MEMORY_SHOW false
/* Enables displaying various timing statistics. */
static const bool statistics_show = false;
#define DEFAULT_STATISTICS_SHOW false
/* Enables use of rewind. This will incur some memory footprint
* depending on the save state buffer. */
static const bool rewind_enable = false;
#define DEFAULT_REWIND_ENABLE false
/* When set, any time a cheat is toggled it is immediately applied. */
static const bool apply_cheats_after_toggle = false;
#define DEFAULT_APPLY_CHEATS_AFTER_TOGGLE false
/* When set, all enabled cheats are auto-applied when a game is loaded. */
static const bool apply_cheats_after_load = false;
#define DEFAULT_APPLY_CHEATS_AFTER_LOAD false
/* The buffer size for the rewind buffer. This needs to be about
* 15-20MB per minute. Very game dependant. */
static const unsigned rewind_buffer_size = 20 << 20; /* 20MiB */
#define DEFAULT_REWIND_BUFFER_SIZE (20 << 20) /* 20MiB */
/* The amount of MB to increase/decrease the rewind_buffer_size when it is changed via the UI. */
static const unsigned rewind_buffer_size_step = 10; /* 10MB */
#define DEFAULT_REWIND_BUFFER_SIZE_STEP 10 /* 10MB */
/* How many frames to rewind at a time. */
static const unsigned rewind_granularity = 1;
#define DEFAULT_REWIND_GRANULARITY 1
/* Pause gameplay when gameplay loses focus. */
#ifdef EMSCRIPTEN
static const bool pause_nonactive = false;
#define DEFAULT_PAUSE_NONACTIVE false
#else
static const bool pause_nonactive = true;
#define DEFAULT_PAUSE_NONACTIVE true
#endif
/* Saves non-volatile SRAM at a regular interval.
* It is measured in seconds. A value of 0 disables autosave. */
#if defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(__x86_64__) || defined(_M_X64) || defined(_WIN32) || defined(OSX) || defined(ANDROID) || defined(IOS)
/* Flush to file every 10 seconds on modern platforms by default */
static const unsigned autosave_interval = 10;
#define DEFAULT_AUTOSAVE_INTERVAL 10
#else
/* Default to disabled on I/O-constrained platforms */
static const unsigned autosave_interval = 0;
#define DEFAULT_AUTOSAVE_INTERVAL 0
#endif
/* Publicly announce netplay */
static const bool netplay_public_announce = true;
#define DEFAULT_NETPLAY_PUBLIC_ANNOUNCE true
/* Start netplay in spectator mode */
static const bool netplay_start_as_spectator = false;
@ -709,16 +706,16 @@ static const bool savestate_auto_load = false;
static const bool savestate_thumbnail_enable = false;
/* Slowmotion ratio. */
static const float slowmotion_ratio = 3.0;
#define DEFAULT_SLOWMOTION_RATIO 3.0
/* Maximum fast forward ratio. */
static const float fastforward_ratio = 0.0;
#define DEFAULT_FASTFORWARD_RATIO 0.0
/* Enable runloop for variable refresh rate screens. Force x1 speed while handling fast forward too. */
static const bool vrr_runloop_enable = false;
#define DEFAULT_VRR_RUNLOOP_ENABLE false
/* Run core logic one or more frames ahead then load the state back to reduce perceived input lag. */
static const unsigned run_ahead_frames = 1;
#define DEFAULT_RUN_AHEAD_FRAMES 1
/* When using the Run Ahead feature, use a secondary instance of the core. */
static const bool run_ahead_secondary_instance = true;
@ -858,8 +855,8 @@ static const unsigned midi_volume = 100;
/* Only applies to Android 7.0 (API 24) and up */
static const bool sustained_performance_mode = false;
static const bool vibrate_on_keypress = false;
static const bool enable_device_vibration = false;
static const bool vibrate_on_keypress = false;
static const bool enable_device_vibration = false;
#if defined(HAKCHI)
static char buildbot_server_url[] = "http://hakchicloud.com/Libretro_Cores/";

View File

@ -1357,7 +1357,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
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);
#ifdef HAVE_NETWORKING
SETTING_BOOL("netplay_public_announce", &settings->bools.netplay_public_announce, true, netplay_public_announce, false);
SETTING_BOOL("netplay_public_announce", &settings->bools.netplay_public_announce, true, DEFAULT_NETPLAY_PUBLIC_ANNOUNCE, false);
SETTING_BOOL("netplay_start_as_spectator", &settings->bools.netplay_start_as_spectator, false, netplay_start_as_spectator, false);
SETTING_BOOL("netplay_allow_slaves", &settings->bools.netplay_allow_slaves, true, netplay_allow_slaves, false);
SETTING_BOOL("netplay_require_slaves", &settings->bools.netplay_require_slaves, true, netplay_require_slaves, false);
@ -1388,49 +1388,49 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("check_firmware_before_loading", &settings->bools.check_firmware_before_loading, true, check_firmware_before_loading, false);
SETTING_BOOL("builtin_mediaplayer_enable", &settings->bools.multimedia_builtin_mediaplayer_enable, false, false /* TODO */, false);
SETTING_BOOL("builtin_imageviewer_enable", &settings->bools.multimedia_builtin_imageviewer_enable, true, true, false);
SETTING_BOOL("fps_show", &settings->bools.video_fps_show, true, fps_show, false);
SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, statistics_show, false);
SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, framecount_show, false);
SETTING_BOOL("memory_show", &settings->bools.video_memory_show, true, memory_show, false);
SETTING_BOOL("fps_show", &settings->bools.video_fps_show, true, DEFAULT_FPS_SHOW, false);
SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, DEFAULT_STATISTICS_SHOW, false);
SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, DEFAULT_FRAMECOUNT_SHOW, false);
SETTING_BOOL("memory_show", &settings->bools.video_memory_show, true, DEFAULT_MEMORY_SHOW, false);
SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false);
SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false);
SETTING_BOOL("rewind_enable", &settings->bools.rewind_enable, true, rewind_enable, false);
SETTING_BOOL("vrr_runloop_enable", &settings->bools.vrr_runloop_enable, true, vrr_runloop_enable, false);
SETTING_BOOL("apply_cheats_after_toggle", &settings->bools.apply_cheats_after_toggle, true, apply_cheats_after_toggle, false);
SETTING_BOOL("apply_cheats_after_load", &settings->bools.apply_cheats_after_load, true, apply_cheats_after_load, false);
SETTING_BOOL("rewind_enable", &settings->bools.rewind_enable, true, DEFAULT_REWIND_ENABLE, false);
SETTING_BOOL("vrr_runloop_enable", &settings->bools.vrr_runloop_enable, true, DEFAULT_VRR_RUNLOOP_ENABLE, false);
SETTING_BOOL("apply_cheats_after_toggle", &settings->bools.apply_cheats_after_toggle, true, DEFAULT_APPLY_CHEATS_AFTER_TOGGLE, false);
SETTING_BOOL("apply_cheats_after_load", &settings->bools.apply_cheats_after_load, true, DEFAULT_APPLY_CHEATS_AFTER_LOAD, false);
SETTING_BOOL("run_ahead_enabled", &settings->bools.run_ahead_enabled, true, false, false);
SETTING_BOOL("run_ahead_secondary_instance", &settings->bools.run_ahead_secondary_instance, true, false, false);
SETTING_BOOL("run_ahead_hide_warnings", &settings->bools.run_ahead_hide_warnings, true, false, false);
SETTING_BOOL("audio_sync", &settings->bools.audio_sync, true, audio_sync, 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, shader_enable, false);
SETTING_BOOL("video_shader_watch_files", &settings->bools.video_shader_watch_files, true, 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, aspect_ratio_auto, false);
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_windowed_fullscreen", &settings->bools.video_windowed_fullscreen, true, windowed_fullscreen, 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, crop_overscan, false);
SETTING_BOOL("video_scale_integer", &settings->bools.video_scale_integer, true, scale_integer, false);
SETTING_BOOL("video_smooth", &settings->bools.video_smooth, true, video_smooth, false);
SETTING_BOOL("video_force_aspect", &settings->bools.video_force_aspect, true, force_aspect, false);
SETTING_BOOL("video_smooth", &settings->bools.video_smooth, true, DEFAULT_VIDEO_SMOOTH, false);
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, video_shared_context, false);
SETTING_BOOL("auto_screenshot_filename", &settings->bools.auto_screenshot_filename, true, 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, fullscreen, 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);
SETTING_BOOL("video_vsync", &settings->bools.video_vsync, true, vsync, false);
SETTING_BOOL("video_adaptive_vsync", &settings->bools.video_adaptive_vsync, true, adaptive_vsync, false);
SETTING_BOOL("video_hard_sync", &settings->bools.video_hard_sync, true, hard_sync, false);
SETTING_BOOL("video_black_frame_insertion", &settings->bools.video_black_frame_insertion, true, black_frame_insertion, false);
SETTING_BOOL("video_disable_composition", &settings->bools.video_disable_composition, true, disable_composition, false);
SETTING_BOOL("pause_nonactive", &settings->bools.pause_nonactive, true, pause_nonactive, false);
SETTING_BOOL("video_vsync", &settings->bools.video_vsync, true, DEFAULT_VSYNC, false);
SETTING_BOOL("video_adaptive_vsync", &settings->bools.video_adaptive_vsync, true, DEFAULT_ADAPTIVE_VSYNC, false);
SETTING_BOOL("video_hard_sync", &settings->bools.video_hard_sync, true, DEFAULT_HARD_SYNC, false);
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("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, audio_enable, 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("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);
@ -1464,7 +1464,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("menu_horizontal_animation", &settings->bools.menu_horizontal_animation, true, true, false);
SETTING_BOOL("dpi_override_enable", &settings->bools.menu_dpi_override_enable, true, menu_dpi_override_enable, false);
SETTING_BOOL("menu_pause_libretro", &settings->bools.menu_pause_libretro, true, true, false);
SETTING_BOOL("menu_mouse_enable", &settings->bools.menu_mouse_enable, true, def_mouse_enable, false);
SETTING_BOOL("menu_mouse_enable", &settings->bools.menu_mouse_enable, true, DEFAULT_MOUSE_ENABLE, false);
SETTING_BOOL("menu_pointer_enable", &settings->bools.menu_pointer_enable, true, DEFAULT_POINTER_ENABLE, false);
SETTING_BOOL("menu_timedate_enable", &settings->bools.menu_timedate_enable, true, true, false);
SETTING_BOOL("menu_battery_level_enable", &settings->bools.menu_battery_level_enable, true, true, false);
@ -1536,7 +1536,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
&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);
#ifdef HAVE_MATERIALUI
SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false);
SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, DEFAULT_MATERIALUI_ICONS_ENABLE, false);
#endif
#ifdef HAVE_RGUI
SETTING_BOOL("rgui_background_filler_thickness_enable", &settings->bools.menu_rgui_background_filler_thickness_enable, true, true, false);
@ -1554,7 +1554,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
#endif
#endif
#ifdef HAVE_CHEEVOS
SETTING_BOOL("cheevos_enable", &settings->bools.cheevos_enable, true, cheevos_enable, false);
SETTING_BOOL("cheevos_enable", &settings->bools.cheevos_enable, true, DEFAULT_CHEEVOS_ENABLE, false);
SETTING_BOOL("cheevos_test_unofficial", &settings->bools.cheevos_test_unofficial, true, false, false);
SETTING_BOOL("cheevos_hardcore_mode_enable", &settings->bools.cheevos_hardcore_mode_enable, true, false, false);
SETTING_BOOL("cheevos_leaderboards_enable", &settings->bools.cheevos_leaderboards_enable, true, false, false);
@ -1601,7 +1601,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("config_save_on_exit", &settings->bools.config_save_on_exit, true, config_save_on_exit, false);
SETTING_BOOL("show_hidden_files", &settings->bools.show_hidden_files, true, show_hidden_files, false);
SETTING_BOOL("input_autodetect_enable", &settings->bools.input_autodetect_enable, true, input_autodetect_enable, false);
SETTING_BOOL("audio_rate_control", &settings->bools.audio_rate_control, true, rate_control, false);
SETTING_BOOL("audio_rate_control", &settings->bools.audio_rate_control, true, DEFAULT_RATE_CONTROL, false);
#ifdef HAVE_WASAPI
SETTING_BOOL("audio_wasapi_exclusive_mode", &settings->bools.audio_wasapi_exclusive_mode, true, wasapi_exclusive_mode, false);
SETTING_BOOL("audio_wasapi_float_format", &settings->bools.audio_wasapi_float_format, true, wasapi_float_format, false);
@ -1655,14 +1655,14 @@ static struct config_float_setting *populate_settings_float(settings_t *settings
if (!tmp)
return NULL;
SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, aspect_ratio, false);
SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, DEFAULT_ASPECT_RATIO, false);
SETTING_FLOAT("video_scale", &settings->floats.video_scale, false, 0.0f, false);
SETTING_FLOAT("crt_video_refresh_rate", &settings->floats.crt_video_refresh_rate, true, crt_refresh_rate, false);
SETTING_FLOAT("video_refresh_rate", &settings->floats.video_refresh_rate, true, refresh_rate, false);
SETTING_FLOAT("audio_rate_control_delta", audio_get_float_ptr(AUDIO_ACTION_RATE_CONTROL_DELTA), true, rate_control_delta, false);
SETTING_FLOAT("audio_max_timing_skew", &settings->floats.audio_max_timing_skew, true, max_timing_skew, false);
SETTING_FLOAT("audio_volume", &settings->floats.audio_volume, true, audio_volume, false);
SETTING_FLOAT("audio_mixer_volume", &settings->floats.audio_mixer_volume, true, audio_mixer_volume, false);
SETTING_FLOAT("audio_rate_control_delta", audio_get_float_ptr(AUDIO_ACTION_RATE_CONTROL_DELTA), true, DEFAULT_RATE_CONTROL_DELTA, false);
SETTING_FLOAT("audio_max_timing_skew", &settings->floats.audio_max_timing_skew, true, DEFAULT_MAX_TIMING_SKEW, false);
SETTING_FLOAT("audio_volume", &settings->floats.audio_volume, true, DEFAULT_AUDIO_VOLUME, false);
SETTING_FLOAT("audio_mixer_volume", &settings->floats.audio_mixer_volume, true, DEFAULT_AUDIO_MIXER_VOLUME, false);
#ifdef HAVE_OVERLAY
SETTING_FLOAT("input_overlay_opacity", &settings->floats.input_overlay_opacity, true, default_input_overlay_opacity, false);
SETTING_FLOAT("input_overlay_scale", &settings->floats.input_overlay_scale, true, 1.0f, false);
@ -1676,9 +1676,9 @@ static struct config_float_setting *populate_settings_float(settings_t *settings
#endif
SETTING_FLOAT("video_message_pos_x", &settings->floats.video_msg_pos_x, true, message_pos_offset_x, false);
SETTING_FLOAT("video_message_pos_y", &settings->floats.video_msg_pos_y, true, message_pos_offset_y, false);
SETTING_FLOAT("video_font_size", &settings->floats.video_font_size, true, font_size, false);
SETTING_FLOAT("fastforward_ratio", &settings->floats.fastforward_ratio, true, fastforward_ratio, false);
SETTING_FLOAT("slowmotion_ratio", &settings->floats.slowmotion_ratio, true, slowmotion_ratio, false);
SETTING_FLOAT("video_font_size", &settings->floats.video_font_size, true, DEFAULT_FONT_SIZE, false);
SETTING_FLOAT("fastforward_ratio", &settings->floats.fastforward_ratio, true, DEFAULT_FASTFORWARD_RATIO, false);
SETTING_FLOAT("slowmotion_ratio", &settings->floats.slowmotion_ratio, true, DEFAULT_SLOWMOTION_RATIO, false);
SETTING_FLOAT("input_axis_threshold", input_driver_get_float(INPUT_ACTION_AXIS_THRESHOLD), true, axis_threshold, false);
SETTING_FLOAT("input_analog_deadzone", &settings->floats.input_analog_deadzone, true, analog_deadzone, false);
SETTING_FLOAT("input_analog_sensitivity", &settings->floats.input_analog_sensitivity, true, analog_sensitivity, false);
@ -1713,15 +1713,15 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
#ifdef ANDROID
SETTING_UINT("input_block_timeout", &settings->uints.input_block_timeout, true, 1, false);
#endif
SETTING_UINT("rewind_granularity", &settings->uints.rewind_granularity, true, rewind_granularity, false);
SETTING_UINT("rewind_buffer_size_step", &settings->uints.rewind_buffer_size_step, true, rewind_buffer_size_step, false);
SETTING_UINT("autosave_interval", &settings->uints.autosave_interval, true, autosave_interval, false);
SETTING_UINT("rewind_granularity", &settings->uints.rewind_granularity, true, DEFAULT_REWIND_GRANULARITY, false);
SETTING_UINT("rewind_buffer_size_step", &settings->uints.rewind_buffer_size_step, true, DEFAULT_REWIND_BUFFER_SIZE_STEP, false);
SETTING_UINT("autosave_interval", &settings->uints.autosave_interval, true, DEFAULT_AUTOSAVE_INTERVAL, false);
SETTING_UINT("libretro_log_level", &settings->uints.libretro_log_level, true, libretro_log_level, false);
SETTING_UINT("keyboard_gamepad_mapping_type",&settings->uints.input_keyboard_gamepad_mapping_type, true, 1, false);
SETTING_UINT("input_poll_type_behavior", &settings->uints.input_poll_type_behavior, true, 2, false);
SETTING_UINT("video_monitor_index", &settings->uints.video_monitor_index, true, monitor_index, false);
SETTING_UINT("video_fullscreen_x", &settings->uints.video_fullscreen_x, true, fullscreen_x, false);
SETTING_UINT("video_fullscreen_y", &settings->uints.video_fullscreen_y, true, fullscreen_y, false);
SETTING_UINT("video_monitor_index", &settings->uints.video_monitor_index, true, DEFAULT_MONITOR_INDEX, false);
SETTING_UINT("video_fullscreen_x", &settings->uints.video_fullscreen_x, true, DEFAULT_FULLSCREEN_X, false);
SETTING_UINT("video_fullscreen_y", &settings->uints.video_fullscreen_y, true, DEFAULT_FULLSCREEN_Y, false);
SETTING_UINT("video_window_opacity", &settings->uints.video_window_opacity, true, window_opacity, false);
#ifdef HAVE_VIDEO_LAYOUT
SETTING_UINT("video_layout_selected_view", &settings->uints.video_layout_selected_view, true, 0, false);
@ -1779,20 +1779,20 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
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, out_rate, false);
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("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);
SETTING_UINT("content_history_size", &settings->uints.content_history_size, true, default_content_history_size, false);
SETTING_UINT("video_hard_sync_frames", &settings->uints.video_hard_sync_frames, true, hard_sync_frames, false);
SETTING_UINT("video_frame_delay", &settings->uints.video_frame_delay, true, frame_delay, false);
SETTING_UINT("video_max_swapchain_images", &settings->uints.video_max_swapchain_images, true, max_swapchain_images, false);
SETTING_UINT("video_swap_interval", &settings->uints.video_swap_interval, true, swap_interval, false);
SETTING_UINT("video_hard_sync_frames", &settings->uints.video_hard_sync_frames, true, DEFAULT_HARD_SYNC_FRAMES, false);
SETTING_UINT("video_frame_delay", &settings->uints.video_frame_delay, true, DEFAULT_FRAME_DELAY, false);
SETTING_UINT("video_max_swapchain_images", &settings->uints.video_max_swapchain_images, true, DEFAULT_MAX_SWAPCHAIN_IMAGES, false);
SETTING_UINT("video_swap_interval", &settings->uints.video_swap_interval, true, DEFAULT_SWAP_INTERVAL, false);
SETTING_UINT("video_rotation", &settings->uints.video_rotation, true, ORIENTATION_NORMAL, false);
SETTING_UINT("screen_orientation", &settings->uints.screen_orientation, true, ORIENTATION_NORMAL, false);
SETTING_UINT("aspect_ratio_index", &settings->uints.video_aspect_ratio_idx, true, aspect_ratio_idx, false);
SETTING_UINT("aspect_ratio_index", &settings->uints.video_aspect_ratio_idx, true, DEFAULT_ASPECT_RATIO_IDX, false);
#ifdef HAVE_NETWORKING
SETTING_UINT("netplay_ip_port", &settings->uints.netplay_port, true, RARCH_DEFAULT_PORT, false);
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT);
@ -1822,10 +1822,10 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
SETTING_UINT("video_stream_scale_factor", &settings->uints.video_stream_scale_factor, true, 1, false);
SETTING_UINT("video_windowed_position_x", &settings->uints.window_position_x, true, 0, false);
SETTING_UINT("video_windowed_position_y", &settings->uints.window_position_y, true, 0, false);
SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, window_width, false);
SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, window_height, false);
SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, DEFAULT_WINDOW_WIDTH, false);
SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, DEFAULT_WINDOW_HEIGHT, false);
SETTING_UINT("video_record_threads", &settings->uints.video_record_threads, true, video_record_threads, false);
SETTING_UINT("video_record_threads", &settings->uints.video_record_threads, true, DEFAULT_VIDEO_RECORD_THREADS, false);
#ifdef HAVE_LIBNX
SETTING_UINT("libnx_overclock", &settings->uints.libnx_overclock, true, SWITCH_DEFAULT_CPU_PROFILE, false);
@ -1853,7 +1853,7 @@ static struct config_size_setting *populate_settings_size(settings_t *settings,
if (!tmp)
return NULL;
SETTING_SIZE("rewind_buffer_size", &settings->sizes.rewind_buffer_size, true, rewind_buffer_size, false);
SETTING_SIZE("rewind_buffer_size", &settings->sizes.rewind_buffer_size, true, DEFAULT_REWIND_BUFFER_SIZE, false);
*size = count;
@ -2038,7 +2038,7 @@ void config_set_defaults(void)
#else
configuration_set_bool(settings, settings->bools.multimedia_builtin_mediaplayer_enable, false);
#endif
settings->floats.video_scale = scale;
settings->floats.video_scale = DEFAULT_SCALE;
if (g_defaults.settings.video_threaded_enable != DEFAULT_VIDEO_THREADED)
video_driver_set_threaded(g_defaults.settings.video_threaded_enable);
@ -2056,7 +2056,7 @@ void config_set_defaults(void)
audio_device, sizeof(settings->arrays.audio_device));
if (!g_defaults.settings.out_latency)
g_defaults.settings.out_latency = out_latency;
g_defaults.settings.out_latency = DEFAULT_OUT_LATENCY;
settings->uints.audio_latency = g_defaults.settings.out_latency;

View File

@ -7627,7 +7627,7 @@ static bool setting_append_list(
&settings->uints.autosave_interval,
MENU_ENUM_LABEL_AUTOSAVE_INTERVAL,
MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL,
autosave_interval,
DEFAULT_AUTOSAVE_INTERVAL,
&group_info,
&subgroup_info,
parent_group,
@ -7703,7 +7703,7 @@ static bool setting_append_list(
&settings->bools.rewind_enable,
MENU_ENUM_LABEL_REWIND_ENABLE,
MENU_ENUM_LABEL_VALUE_REWIND_ENABLE,
rewind_enable,
DEFAULT_REWIND_ENABLE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -7719,7 +7719,7 @@ static bool setting_append_list(
&settings->uints.rewind_granularity,
MENU_ENUM_LABEL_REWIND_GRANULARITY,
MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY,
rewind_granularity,
DEFAULT_REWIND_GRANULARITY,
&group_info,
&subgroup_info,
parent_group,
@ -7734,7 +7734,7 @@ static bool setting_append_list(
&settings->sizes.rewind_buffer_size,
MENU_ENUM_LABEL_REWIND_BUFFER_SIZE,
MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE,
rewind_buffer_size,
DEFAULT_REWIND_BUFFER_SIZE,
&group_info,
&subgroup_info,
parent_group,
@ -7748,7 +7748,7 @@ static bool setting_append_list(
&settings->uints.rewind_buffer_size_step,
MENU_ENUM_LABEL_REWIND_BUFFER_SIZE_STEP,
MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE_STEP,
rewind_buffer_size_step,
DEFAULT_REWIND_BUFFER_SIZE_STEP,
&group_info,
&subgroup_info,
parent_group,
@ -7774,7 +7774,7 @@ static bool setting_append_list(
&settings->bools.apply_cheats_after_load,
MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_LOAD,
MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD,
apply_cheats_after_load,
DEFAULT_APPLY_CHEATS_AFTER_LOAD,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -7789,7 +7789,7 @@ static bool setting_append_list(
&settings->bools.apply_cheats_after_toggle,
MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_TOGGLE,
MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_TOGGLE,
apply_cheats_after_toggle,
DEFAULT_APPLY_CHEATS_AFTER_TOGGLE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8220,7 +8220,7 @@ static bool setting_append_list(
&settings->bools.video_fps_show,
MENU_ENUM_LABEL_FPS_SHOW,
MENU_ENUM_LABEL_VALUE_FPS_SHOW,
fps_show,
DEFAULT_FPS_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8235,7 +8235,7 @@ static bool setting_append_list(
&settings->bools.video_memory_show,
MENU_ENUM_LABEL_MEMORY_SHOW,
MENU_ENUM_LABEL_VALUE_MEMORY_SHOW,
memory_show,
DEFAULT_MEMORY_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8250,7 +8250,7 @@ static bool setting_append_list(
&settings->bools.video_statistics_show,
MENU_ENUM_LABEL_STATISTICS_SHOW,
MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
statistics_show,
DEFAULT_STATISTICS_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8265,7 +8265,7 @@ static bool setting_append_list(
&settings->bools.video_framecount_show,
MENU_ENUM_LABEL_FRAMECOUNT_SHOW,
MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
framecount_show,
DEFAULT_FRAMECOUNT_SHOW,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8290,7 +8290,7 @@ static bool setting_append_list(
&settings->uints.video_monitor_index,
MENU_ENUM_LABEL_VIDEO_MONITOR_INDEX,
MENU_ENUM_LABEL_VALUE_VIDEO_MONITOR_INDEX,
monitor_index,
DEFAULT_MONITOR_INDEX,
&group_info,
&subgroup_info,
parent_group,
@ -8308,7 +8308,7 @@ static bool setting_append_list(
&settings->bools.video_fullscreen,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN,
MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN,
fullscreen,
DEFAULT_FULLSCREEN,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8327,7 +8327,7 @@ static bool setting_append_list(
&settings->bools.video_windowed_fullscreen,
MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN,
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_FULLSCREEN,
windowed_fullscreen,
DEFAULT_WINDOWED_FULLSCREEN,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8343,7 +8343,7 @@ static bool setting_append_list(
&settings->uints.video_fullscreen_x,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_X,
MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN_X,
fullscreen_x,
DEFAULT_FULLSCREEN_X,
&group_info,
&subgroup_info,
parent_group,
@ -8358,7 +8358,7 @@ static bool setting_append_list(
&settings->uints.video_fullscreen_y,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y,
MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN_Y,
fullscreen_y,
DEFAULT_FULLSCREEN_Y,
&group_info,
&subgroup_info,
parent_group,
@ -8453,7 +8453,7 @@ static bool setting_append_list(
&settings->uints.video_aspect_ratio_idx,
MENU_ENUM_LABEL_VIDEO_ASPECT_RATIO_INDEX,
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
aspect_ratio_idx,
DEFAULT_ASPECT_RATIO_IDX,
&group_info,
&subgroup_info,
parent_group,
@ -8602,7 +8602,7 @@ static bool setting_append_list(
&settings->floats.video_scale,
MENU_ENUM_LABEL_VIDEO_SCALE,
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE,
scale,
DEFAULT_SCALE,
"%.1fx",
&group_info,
&subgroup_info,
@ -8617,7 +8617,7 @@ static bool setting_append_list(
&settings->uints.window_position_width,
MENU_ENUM_LABEL_VIDEO_WINDOW_WIDTH,
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_WIDTH,
window_width,
DEFAULT_WINDOW_WIDTH,
&group_info,
&subgroup_info,
parent_group,
@ -8631,7 +8631,7 @@ static bool setting_append_list(
&settings->uints.window_position_height,
MENU_ENUM_LABEL_VIDEO_WINDOW_HEIGHT,
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_HEIGHT,
window_height,
DEFAULT_WINDOW_HEIGHT,
&group_info,
&subgroup_info,
parent_group,
@ -8742,7 +8742,7 @@ static bool setting_append_list(
&settings->bools.video_smooth,
MENU_ENUM_LABEL_VIDEO_SMOOTH,
MENU_ENUM_LABEL_VALUE_VIDEO_SMOOTH,
video_smooth,
DEFAULT_VIDEO_SMOOTH,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8822,7 +8822,7 @@ static bool setting_append_list(
&settings->bools.video_vsync,
MENU_ENUM_LABEL_VIDEO_VSYNC,
MENU_ENUM_LABEL_VALUE_VIDEO_VSYNC,
vsync,
DEFAULT_VSYNC,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8838,7 +8838,7 @@ static bool setting_append_list(
&settings->uints.video_swap_interval,
MENU_ENUM_LABEL_VIDEO_SWAP_INTERVAL,
MENU_ENUM_LABEL_VALUE_VIDEO_SWAP_INTERVAL,
swap_interval,
DEFAULT_SWAP_INTERVAL,
&group_info,
&subgroup_info,
parent_group,
@ -8861,7 +8861,7 @@ static bool setting_append_list(
&settings->uints.video_max_swapchain_images,
MENU_ENUM_LABEL_VIDEO_MAX_SWAPCHAIN_IMAGES,
MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES,
max_swapchain_images,
DEFAULT_MAX_SWAPCHAIN_IMAGES,
&group_info,
&subgroup_info,
parent_group,
@ -8882,7 +8882,7 @@ static bool setting_append_list(
&settings->bools.video_hard_sync,
MENU_ENUM_LABEL_VIDEO_HARD_SYNC,
MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC,
hard_sync,
DEFAULT_HARD_SYNC,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8898,7 +8898,7 @@ static bool setting_append_list(
&settings->uints.video_hard_sync_frames,
MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES,
MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC_FRAMES,
hard_sync_frames,
DEFAULT_HARD_SYNC_FRAMES,
&group_info,
&subgroup_info,
parent_group,
@ -8919,7 +8919,7 @@ static bool setting_append_list(
&settings->bools.video_adaptive_vsync,
MENU_ENUM_LABEL_VIDEO_ADAPTIVE_VSYNC,
MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC,
false,
DEFAULT_ADAPTIVE_VSYNC,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -8937,7 +8937,7 @@ static bool setting_append_list(
&settings->uints.video_frame_delay,
MENU_ENUM_LABEL_VIDEO_FRAME_DELAY,
MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY,
frame_delay,
DEFAULT_FRAME_DELAY,
&group_info,
&subgroup_info,
parent_group,
@ -8958,7 +8958,7 @@ static bool setting_append_list(
&settings->bools.video_black_frame_insertion,
MENU_ENUM_LABEL_VIDEO_BLACK_FRAME_INSERTION,
MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION,
black_frame_insertion,
DEFAULT_BLACK_FRAME_INSERTION,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -9103,7 +9103,7 @@ static bool setting_append_list(
&settings->bools.crt_switch_custom_refresh_enable,
MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE,
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE,
audio_enable,
DEFAULT_AUDIO_ENABLE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -9222,7 +9222,7 @@ static bool setting_append_list(
&settings->bools.audio_enable,
MENU_ENUM_LABEL_AUDIO_ENABLE,
MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE,
audio_enable,
DEFAULT_AUDIO_ENABLE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -9270,7 +9270,7 @@ static bool setting_append_list(
&settings->floats.audio_volume,
MENU_ENUM_LABEL_AUDIO_VOLUME,
MENU_ENUM_LABEL_VALUE_AUDIO_VOLUME,
audio_volume,
DEFAULT_AUDIO_VOLUME,
"%.1f",
&group_info,
&subgroup_info,
@ -9285,7 +9285,7 @@ static bool setting_append_list(
&settings->floats.audio_mixer_volume,
MENU_ENUM_LABEL_AUDIO_MIXER_VOLUME,
MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_VOLUME,
audio_mixer_volume,
DEFAULT_AUDIO_MIXER_VOLUME,
"%.1f",
&group_info,
&subgroup_info,
@ -9313,7 +9313,7 @@ static bool setting_append_list(
&settings->bools.audio_sync,
MENU_ENUM_LABEL_AUDIO_SYNC,
MENU_ENUM_LABEL_VALUE_AUDIO_SYNC,
audio_sync,
DEFAULT_AUDIO_SYNC,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -9331,7 +9331,7 @@ static bool setting_append_list(
MENU_ENUM_LABEL_AUDIO_LATENCY,
MENU_ENUM_LABEL_VALUE_AUDIO_LATENCY,
g_defaults.settings.out_latency ?
g_defaults.settings.out_latency : out_latency,
g_defaults.settings.out_latency : DEFAULT_OUT_LATENCY,
&group_info,
&subgroup_info,
parent_group,
@ -9363,7 +9363,7 @@ static bool setting_append_list(
audio_get_float_ptr(AUDIO_ACTION_RATE_CONTROL_DELTA),
MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA,
MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA,
rate_control_delta,
DEFAULT_RATE_CONTROL_DELTA,
"%.3f",
&group_info,
&subgroup_info,
@ -9385,7 +9385,7 @@ static bool setting_append_list(
&settings->floats.audio_max_timing_skew,
MENU_ENUM_LABEL_AUDIO_MAX_TIMING_SKEW,
MENU_ENUM_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW,
max_timing_skew,
DEFAULT_MAX_TIMING_SKEW,
"%.2f",
&group_info,
&subgroup_info,
@ -9454,7 +9454,7 @@ static bool setting_append_list(
&settings->uints.audio_out_rate,
MENU_ENUM_LABEL_AUDIO_OUTPUT_RATE,
MENU_ENUM_LABEL_VALUE_AUDIO_OUTPUT_RATE,
out_rate,
DEFAULT_OUTPUT_RATE,
&group_info,
&subgroup_info,
parent_group,
@ -10138,7 +10138,7 @@ static bool setting_append_list(
&settings->uints.video_record_threads,
MENU_ENUM_LABEL_VIDEO_RECORD_THREADS,
MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS,
video_record_threads,
DEFAULT_VIDEO_RECORD_THREADS,
&group_info,
&subgroup_info,
parent_group,
@ -10255,7 +10255,7 @@ static bool setting_append_list(
&settings->floats.fastforward_ratio,
MENU_ENUM_LABEL_FASTFORWARD_RATIO,
MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO,
fastforward_ratio,
DEFAULT_FASTFORWARD_RATIO,
"%.1fx",
&group_info,
&subgroup_info,
@ -10287,7 +10287,7 @@ static bool setting_append_list(
&settings->floats.slowmotion_ratio,
MENU_ENUM_LABEL_SLOWMOTION_RATIO,
MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO,
slowmotion_ratio,
DEFAULT_SLOWMOTION_RATIO,
"%.1fx",
&group_info,
&subgroup_info,
@ -10446,7 +10446,7 @@ static bool setting_append_list(
&settings->floats.video_font_size,
MENU_ENUM_LABEL_VIDEO_FONT_SIZE,
MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE,
font_size,
DEFAULT_FONT_SIZE,
"%.1f",
&group_info,
&subgroup_info,
@ -10917,7 +10917,7 @@ static bool setting_append_list(
&settings->bools.menu_mouse_enable,
MENU_ENUM_LABEL_MOUSE_ENABLE,
MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE,
def_mouse_enable,
DEFAULT_MOUSE_ENABLE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -11997,7 +11997,7 @@ static bool setting_append_list(
&settings->bools.menu_materialui_icons_enable,
MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE,
MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
materialui_icons_enable,
DEFAULT_MATERIALUI_ICONS_ENABLE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -12474,7 +12474,7 @@ static bool setting_append_list(
&settings->bools.pause_nonactive,
MENU_ENUM_LABEL_PAUSE_NONACTIVE,
MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE,
pause_nonactive,
DEFAULT_PAUSE_NONACTIVE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -12491,7 +12491,7 @@ static bool setting_append_list(
&settings->bools.video_disable_composition,
MENU_ENUM_LABEL_VIDEO_DISABLE_COMPOSITION,
MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
disable_composition,
DEFAULT_DISABLE_COMPOSITION,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
@ -13128,7 +13128,7 @@ static bool setting_append_list(
&settings->bools.cheevos_enable,
MENU_ENUM_LABEL_CHEEVOS_ENABLE,
MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE,
cheevos_enable,
DEFAULT_CHEEVOS_ENABLE,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,

View File

@ -4606,41 +4606,41 @@ int runloop_iterate(unsigned *sleep_ms)
autosave_unlock();
/* Condition for max speed x0.0 when vrr_runloop is off to skip that part */
if (fastforward_ratio || vrr_runloop_enable)
end:
{
retro_time_t to_sleep_ms;
if (!(fastforward_ratio || vrr_runloop_enable))
return 0;
if (vrr_runloop_enable)
{
struct retro_system_av_info *av_info =
end:
if (vrr_runloop_enable)
{
struct retro_system_av_info *av_info =
video_viewport_get_system_av_info();
/* Sync on video only, block audio later. */
if (fastforward_after_frames && settings->bools.audio_sync)
/* Sync on video only, block audio later. */
if (fastforward_after_frames && settings->bools.audio_sync)
{
if (fastforward_after_frames == 1)
command_event(CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE, NULL);
fastforward_after_frames++;
if (fastforward_after_frames == 6)
{
if (fastforward_after_frames == 1)
command_event(CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE, NULL);
fastforward_after_frames++;
if (fastforward_after_frames == 6)
{
command_event(CMD_EVENT_AUDIO_SET_BLOCKING_STATE, NULL);
fastforward_after_frames = 0;
}
command_event(CMD_EVENT_AUDIO_SET_BLOCKING_STATE, NULL);
fastforward_after_frames = 0;
}
/* Fast Forward for max speed x0.0 */
if (!fastforward_ratio && runloop_fastmotion)
return 0;
frame_limit_minimum_time =
(retro_time_t)roundf(1000000.0f / (av_info->timing.fps *
(runloop_fastmotion ? fastforward_ratio : 1.0f)));
}
to_sleep_ms = (
/* Fast Forward for max speed x0.0 */
if (!fastforward_ratio && runloop_fastmotion)
return 0;
frame_limit_minimum_time =
(retro_time_t)roundf(1000000.0f / (av_info->timing.fps *
(runloop_fastmotion ? fastforward_ratio : 1.0f)));
}
{
retro_time_t to_sleep_ms = (
(frame_limit_last_time + frame_limit_minimum_time)
- cpu_features_get_time_usec()) / 1000;
@ -4651,10 +4651,10 @@ int runloop_iterate(unsigned *sleep_ms)
frame_limit_last_time += frame_limit_minimum_time;
return 1;
}
frame_limit_last_time = cpu_features_get_time_usec();
}
frame_limit_last_time = cpu_features_get_time_usec();
return 0;
}