mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 09:35:40 +00:00
Settings: Fix mismatches between default and fallback values
This commit is contained in:
parent
3e792651d4
commit
28b8cb5bc6
|
@ -498,6 +498,9 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
|
||||||
si.SetFloatValue("Main", "RunaheadFrameCount", 0);
|
si.SetFloatValue("Main", "RunaheadFrameCount", 0);
|
||||||
|
|
||||||
si.SetStringValue("CPU", "ExecutionMode", Settings::GetCPUExecutionModeName(Settings::DEFAULT_CPU_EXECUTION_MODE));
|
si.SetStringValue("CPU", "ExecutionMode", Settings::GetCPUExecutionModeName(Settings::DEFAULT_CPU_EXECUTION_MODE));
|
||||||
|
si.SetIntValue("CPU", "OverclockNumerator", 1);
|
||||||
|
si.SetIntValue("CPU", "OverclockDenominator", 1);
|
||||||
|
si.SetBoolValue("CPU", "OverclockEnable", false);
|
||||||
si.SetBoolValue("CPU", "RecompilerMemoryExceptions", false);
|
si.SetBoolValue("CPU", "RecompilerMemoryExceptions", false);
|
||||||
si.SetBoolValue("CPU", "ICache", false);
|
si.SetBoolValue("CPU", "ICache", false);
|
||||||
si.SetBoolValue("CPU", "FastmemMode", Settings::GetCPUFastmemModeName(Settings::DEFAULT_CPU_FASTMEM_MODE));
|
si.SetBoolValue("CPU", "FastmemMode", Settings::GetCPUFastmemModeName(Settings::DEFAULT_CPU_FASTMEM_MODE));
|
||||||
|
@ -548,10 +551,10 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
|
||||||
si.SetBoolValue("Display", "ShowSpeed", false);
|
si.SetBoolValue("Display", "ShowSpeed", false);
|
||||||
si.SetBoolValue("Display", "ShowResolution", false);
|
si.SetBoolValue("Display", "ShowResolution", false);
|
||||||
si.SetBoolValue("Display", "Fullscreen", false);
|
si.SetBoolValue("Display", "Fullscreen", false);
|
||||||
si.SetBoolValue("Display", "VSync", true);
|
si.SetBoolValue("Display", "VSync", Settings::DEFAULT_VSYNC_VALUE);
|
||||||
si.SetBoolValue("Display", "DisplayAllFrames", false);
|
si.SetBoolValue("Display", "DisplayAllFrames", false);
|
||||||
si.SetStringValue("Display", "PostProcessChain", "");
|
si.SetStringValue("Display", "PostProcessChain", "");
|
||||||
si.SetFloatValue("Display", "MaxFPS", 0.0f);
|
si.SetFloatValue("Display", "MaxFPS", Settings::DEFAULT_DISPLAY_MAX_FPS);
|
||||||
|
|
||||||
si.SetBoolValue("CDROM", "ReadThread", true);
|
si.SetBoolValue("CDROM", "ReadThread", true);
|
||||||
si.SetBoolValue("CDROM", "RegionCheck", false);
|
si.SetBoolValue("CDROM", "RegionCheck", false);
|
||||||
|
@ -574,7 +577,7 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
|
||||||
si.SetStringValue("BIOS", "PathNTSCJ", "");
|
si.SetStringValue("BIOS", "PathNTSCJ", "");
|
||||||
si.SetStringValue("BIOS", "PathPAL", "");
|
si.SetStringValue("BIOS", "PathPAL", "");
|
||||||
si.SetBoolValue("BIOS", "PatchTTYEnable", false);
|
si.SetBoolValue("BIOS", "PatchTTYEnable", false);
|
||||||
si.SetBoolValue("BIOS", "PatchFastBoot", false);
|
si.SetBoolValue("BIOS", "PatchFastBoot", Settings::DEFAULT_FAST_BOOT_VALUE);
|
||||||
|
|
||||||
si.SetStringValue("Controller1", "Type", Settings::GetControllerTypeName(Settings::DEFAULT_CONTROLLER_1_TYPE));
|
si.SetStringValue("Controller1", "Type", Settings::GetControllerTypeName(Settings::DEFAULT_CONTROLLER_1_TYPE));
|
||||||
|
|
||||||
|
|
|
@ -136,19 +136,10 @@ void Settings::UpdateOverclockActive()
|
||||||
|
|
||||||
void Settings::Load(SettingsInterface& si)
|
void Settings::Load(SettingsInterface& si)
|
||||||
{
|
{
|
||||||
// Android doesn't create settings until they're first opened, so we have to override the defaults here.
|
|
||||||
#ifndef __ANDROID__
|
|
||||||
static constexpr bool DEFAULT_VSYNC_VALUE = false;
|
|
||||||
static constexpr bool DEFAULT_FAST_BOOT_VALUE = false;
|
|
||||||
static constexpr float DEFAULT_DISPLAY_MAX_FPS = 0.0f;
|
|
||||||
#else
|
|
||||||
static constexpr bool DEFAULT_VSYNC_VALUE = true;
|
|
||||||
static constexpr bool DEFAULT_FAST_BOOT_VALUE = true;
|
|
||||||
static constexpr float DEFAULT_DISPLAY_MAX_FPS = 60.0f;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
region =
|
region =
|
||||||
ParseConsoleRegionName(si.GetStringValue("Console", "Region", "NTSC-U").c_str()).value_or(DEFAULT_CONSOLE_REGION);
|
ParseConsoleRegionName(
|
||||||
|
si.GetStringValue("Console", "Region", Settings::GetConsoleRegionName(Settings::DEFAULT_CONSOLE_REGION)).c_str())
|
||||||
|
.value_or(DEFAULT_CONSOLE_REGION);
|
||||||
enable_8mb_ram = si.GetBoolValue("Console", "Enable8MBRAM", false);
|
enable_8mb_ram = si.GetBoolValue("Console", "Enable8MBRAM", false);
|
||||||
|
|
||||||
emulation_speed = si.GetFloatValue("Main", "EmulationSpeed", 1.0f);
|
emulation_speed = si.GetFloatValue("Main", "EmulationSpeed", 1.0f);
|
||||||
|
@ -195,7 +186,7 @@ void Settings::Load(SettingsInterface& si)
|
||||||
gpu_use_thread = si.GetBoolValue("GPU", "UseThread", true);
|
gpu_use_thread = si.GetBoolValue("GPU", "UseThread", true);
|
||||||
gpu_use_software_renderer_for_readbacks = si.GetBoolValue("GPU", "UseSoftwareRendererForReadbacks", false);
|
gpu_use_software_renderer_for_readbacks = si.GetBoolValue("GPU", "UseSoftwareRendererForReadbacks", false);
|
||||||
gpu_threaded_presentation = si.GetBoolValue("GPU", "ThreadedPresentation", true);
|
gpu_threaded_presentation = si.GetBoolValue("GPU", "ThreadedPresentation", true);
|
||||||
gpu_true_color = si.GetBoolValue("GPU", "TrueColor", true);
|
gpu_true_color = si.GetBoolValue("GPU", "TrueColor", false);
|
||||||
gpu_scaled_dithering = si.GetBoolValue("GPU", "ScaledDithering", false);
|
gpu_scaled_dithering = si.GetBoolValue("GPU", "ScaledDithering", false);
|
||||||
gpu_texture_filter =
|
gpu_texture_filter =
|
||||||
ParseTextureFilterName(
|
ParseTextureFilterName(
|
||||||
|
@ -251,7 +242,7 @@ void Settings::Load(SettingsInterface& si)
|
||||||
display_max_fps = si.GetFloatValue("Display", "MaxFPS", DEFAULT_DISPLAY_MAX_FPS);
|
display_max_fps = si.GetFloatValue("Display", "MaxFPS", DEFAULT_DISPLAY_MAX_FPS);
|
||||||
|
|
||||||
cdrom_read_thread = si.GetBoolValue("CDROM", "ReadThread", true);
|
cdrom_read_thread = si.GetBoolValue("CDROM", "ReadThread", true);
|
||||||
cdrom_region_check = si.GetBoolValue("CDROM", "RegionCheck", true);
|
cdrom_region_check = si.GetBoolValue("CDROM", "RegionCheck", false);
|
||||||
cdrom_load_image_to_ram = si.GetBoolValue("CDROM", "LoadImageToRAM", false);
|
cdrom_load_image_to_ram = si.GetBoolValue("CDROM", "LoadImageToRAM", false);
|
||||||
cdrom_mute_cd_audio = si.GetBoolValue("CDROM", "MuteCDAudio", false);
|
cdrom_mute_cd_audio = si.GetBoolValue("CDROM", "MuteCDAudio", false);
|
||||||
cdrom_read_speedup = si.GetIntValue("CDROM", "ReadSpeedup", 1);
|
cdrom_read_speedup = si.GetIntValue("CDROM", "ReadSpeedup", 1);
|
||||||
|
|
|
@ -112,11 +112,11 @@ struct Settings
|
||||||
bool gpu_threaded_presentation = true;
|
bool gpu_threaded_presentation = true;
|
||||||
bool gpu_use_debug_device = false;
|
bool gpu_use_debug_device = false;
|
||||||
bool gpu_per_sample_shading = false;
|
bool gpu_per_sample_shading = false;
|
||||||
bool gpu_true_color = true;
|
bool gpu_true_color = false;
|
||||||
bool gpu_scaled_dithering = false;
|
bool gpu_scaled_dithering = false;
|
||||||
GPUTextureFilter gpu_texture_filter = GPUTextureFilter::Nearest;
|
GPUTextureFilter gpu_texture_filter = GPUTextureFilter::Nearest;
|
||||||
GPUDownsampleMode gpu_downsample_mode = GPUDownsampleMode::Disabled;
|
GPUDownsampleMode gpu_downsample_mode = GPUDownsampleMode::Disabled;
|
||||||
bool gpu_disable_interlacing = false;
|
bool gpu_disable_interlacing = true;
|
||||||
bool gpu_force_ntsc_timings = false;
|
bool gpu_force_ntsc_timings = false;
|
||||||
bool gpu_widescreen_hack = false;
|
bool gpu_widescreen_hack = false;
|
||||||
bool gpu_pgxp_enable = false;
|
bool gpu_pgxp_enable = false;
|
||||||
|
@ -140,19 +140,19 @@ struct Settings
|
||||||
bool display_integer_scaling = false;
|
bool display_integer_scaling = false;
|
||||||
bool display_stretch = false;
|
bool display_stretch = false;
|
||||||
bool display_post_processing = false;
|
bool display_post_processing = false;
|
||||||
bool display_show_osd_messages = false;
|
bool display_show_osd_messages = true;
|
||||||
bool display_show_fps = false;
|
bool display_show_fps = false;
|
||||||
bool display_show_vps = false;
|
bool display_show_vps = false;
|
||||||
bool display_show_speed = false;
|
bool display_show_speed = false;
|
||||||
bool display_show_resolution = false;
|
bool display_show_resolution = false;
|
||||||
bool display_all_frames = false;
|
bool display_all_frames = false;
|
||||||
bool video_sync_enabled = true;
|
bool video_sync_enabled = DEFAULT_VSYNC_VALUE;
|
||||||
float display_max_fps = 0.0f;
|
float display_max_fps = DEFAULT_DISPLAY_MAX_FPS;
|
||||||
float gpu_pgxp_tolerance = -1.0f;
|
float gpu_pgxp_tolerance = -1.0f;
|
||||||
float gpu_pgxp_depth_clear_threshold = 300.0f / 4096.0f;
|
float gpu_pgxp_depth_clear_threshold = 300.0f / 4096.0f;
|
||||||
|
|
||||||
bool cdrom_read_thread = true;
|
bool cdrom_read_thread = true;
|
||||||
bool cdrom_region_check = true;
|
bool cdrom_region_check = false;
|
||||||
bool cdrom_load_image_to_ram = false;
|
bool cdrom_load_image_to_ram = false;
|
||||||
bool cdrom_mute_cd_audio = false;
|
bool cdrom_mute_cd_audio = false;
|
||||||
u32 cdrom_read_speedup = 1;
|
u32 cdrom_read_speedup = 1;
|
||||||
|
@ -346,7 +346,7 @@ struct Settings
|
||||||
static const char* GetMultitapModeDisplayName(MultitapMode mode);
|
static const char* GetMultitapModeDisplayName(MultitapMode mode);
|
||||||
|
|
||||||
// Default to D3D11 on Windows as it's more performant and at this point, less buggy.
|
// Default to D3D11 on Windows as it's more performant and at this point, less buggy.
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareD3D11;
|
static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareD3D11;
|
||||||
#else
|
#else
|
||||||
static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareOpenGL;
|
static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareOpenGL;
|
||||||
|
@ -368,7 +368,7 @@ struct Settings
|
||||||
static constexpr CPUFastmemMode DEFAULT_CPU_FASTMEM_MODE = CPUFastmemMode::Disabled;
|
static constexpr CPUFastmemMode DEFAULT_CPU_FASTMEM_MODE = CPUFastmemMode::Disabled;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ANDROID
|
#ifndef __ANDROID__
|
||||||
static constexpr AudioBackend DEFAULT_AUDIO_BACKEND = AudioBackend::Cubeb;
|
static constexpr AudioBackend DEFAULT_AUDIO_BACKEND = AudioBackend::Cubeb;
|
||||||
#else
|
#else
|
||||||
static constexpr AudioBackend DEFAULT_AUDIO_BACKEND = AudioBackend::OpenSLES;
|
static constexpr AudioBackend DEFAULT_AUDIO_BACKEND = AudioBackend::OpenSLES;
|
||||||
|
@ -390,6 +390,17 @@ struct Settings
|
||||||
#else
|
#else
|
||||||
static constexpr bool DEFAULT_LOG_TO_CONSOLE = false;
|
static constexpr bool DEFAULT_LOG_TO_CONSOLE = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Android doesn't create settings until they're first opened, so we have to override the defaults here.
|
||||||
|
#ifndef __ANDROID__
|
||||||
|
static constexpr bool DEFAULT_VSYNC_VALUE = false;
|
||||||
|
static constexpr bool DEFAULT_FAST_BOOT_VALUE = false;
|
||||||
|
static constexpr float DEFAULT_DISPLAY_MAX_FPS = 0.0f;
|
||||||
|
#else
|
||||||
|
static constexpr bool DEFAULT_VSYNC_VALUE = true;
|
||||||
|
static constexpr bool DEFAULT_FAST_BOOT_VALUE = true;
|
||||||
|
static constexpr float DEFAULT_DISPLAY_MAX_FPS = 60.0f;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Settings g_settings;
|
extern Settings g_settings;
|
||||||
|
|
Loading…
Reference in a new issue