mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 05:43:34 +00:00
Turn more default values into macros
This commit is contained in:
parent
d7e1099a97
commit
fdf28e5259
10
config.def.h
10
config.def.h
@ -562,15 +562,13 @@ static const float message_bgcolor_opacity = 1.0f;
|
|||||||
* If your monitor does not run at 60Hz, or something close to it,
|
* If your monitor does not run at 60Hz, or something close to it,
|
||||||
* disable VSync, and leave this at its default. */
|
* disable VSync, and leave this at its default. */
|
||||||
#ifdef _3DS
|
#ifdef _3DS
|
||||||
static const float refresh_rate = (32730.0 * 8192.0) / 4481134.0 ;
|
#define DEFAULT_REFRESH_RATE ((32730.0 * 8192.0) / 4481134.0)
|
||||||
static const float crt_refresh_rate = (32730.0 * 8192.0) / 4481134.0 ;
|
|
||||||
#elif defined(RARCH_CONSOLE)
|
#elif defined(RARCH_CONSOLE)
|
||||||
static const float refresh_rate = 60/1.001;
|
#define DEFAULT_REFRESH_RATE (60/1.001)
|
||||||
static const float crt_refresh_rate = 60/1.001;
|
|
||||||
#else
|
#else
|
||||||
static const float refresh_rate = 60;
|
#define DEFAULT_REFRESH_RATE (60)
|
||||||
static const float crt_refresh_rate = 60;
|
|
||||||
#endif
|
#endif
|
||||||
|
#define DEFAULT_CRT_REFRESH_RATE (DEFAULT_REFRESH_RATE)
|
||||||
|
|
||||||
/* Allow games to set rotation. If false, rotation requests are
|
/* Allow games to set rotation. If false, rotation requests are
|
||||||
* honored, but ignored.
|
* honored, but ignored.
|
||||||
|
@ -1638,8 +1638,8 @@ static struct config_float_setting *populate_settings_float(settings_t *settings
|
|||||||
|
|
||||||
SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, DEFAULT_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("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("crt_video_refresh_rate", &settings->floats.crt_video_refresh_rate, true, DEFAULT_CRT_REFRESH_RATE, false);
|
||||||
SETTING_FLOAT("video_refresh_rate", &settings->floats.video_refresh_rate, true, refresh_rate, false);
|
SETTING_FLOAT("video_refresh_rate", &settings->floats.video_refresh_rate, true, DEFAULT_REFRESH_RATE, 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_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_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_volume", &settings->floats.audio_volume, true, DEFAULT_AUDIO_VOLUME, false);
|
||||||
@ -2048,7 +2048,7 @@ void config_set_defaults(void)
|
|||||||
settings->floats.video_msg_color_b = ((message_color >> 0) & 0xff) / 255.0f;
|
settings->floats.video_msg_color_b = ((message_color >> 0) & 0xff) / 255.0f;
|
||||||
|
|
||||||
if (g_defaults.settings.video_refresh_rate > 0.0 &&
|
if (g_defaults.settings.video_refresh_rate > 0.0 &&
|
||||||
g_defaults.settings.video_refresh_rate != refresh_rate)
|
g_defaults.settings.video_refresh_rate != DEFAULT_REFRESH_RATE)
|
||||||
settings->floats.video_refresh_rate = g_defaults.settings.video_refresh_rate;
|
settings->floats.video_refresh_rate = g_defaults.settings.video_refresh_rate;
|
||||||
|
|
||||||
if (DEFAULT_AUDIO_DEVICE)
|
if (DEFAULT_AUDIO_DEVICE)
|
||||||
|
@ -8547,7 +8547,7 @@ static bool setting_append_list(
|
|||||||
&settings->floats.video_refresh_rate,
|
&settings->floats.video_refresh_rate,
|
||||||
MENU_ENUM_LABEL_VIDEO_REFRESH_RATE,
|
MENU_ENUM_LABEL_VIDEO_REFRESH_RATE,
|
||||||
MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE,
|
MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE,
|
||||||
refresh_rate,
|
DEFAULT_REFRESH_RATE,
|
||||||
"%.3f Hz",
|
"%.3f Hz",
|
||||||
&group_info,
|
&group_info,
|
||||||
&subgroup_info,
|
&subgroup_info,
|
||||||
@ -8562,7 +8562,7 @@ static bool setting_append_list(
|
|||||||
&settings->floats.video_refresh_rate,
|
&settings->floats.video_refresh_rate,
|
||||||
MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO,
|
MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO,
|
||||||
MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO,
|
MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO,
|
||||||
refresh_rate,
|
DEFAULT_REFRESH_RATE,
|
||||||
"%.3f Hz",
|
"%.3f Hz",
|
||||||
&group_info,
|
&group_info,
|
||||||
&subgroup_info,
|
&subgroup_info,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user