Fix small inconsistency when switching renderers during runtime & small cleanup

This commit is contained in:
DarthMew 2022-02-08 23:52:03 +01:00
commit b2afbb79db
4 changed files with 12 additions and 17 deletions

View file

@ -501,7 +501,6 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
si.SetStringValue("GPU", "Renderer", Settings::GetRendererName(Settings::DEFAULT_GPU_RENDERER));
si.SetIntValue("GPU", "ResolutionScale", 1);
si.SetIntValue("GPU", "ResolutionSoftScale", 1);
si.SetIntValue("GPU", "Multisamples", 1);
si.SetBoolValue("GPU", "UseDebugDevice", false);
si.SetBoolValue("GPU", "UseSoftwareRendererForReadbacks", false);
@ -631,7 +630,6 @@ void HostInterface::FixIncompatibleSettings(bool display_osd_messages)
g_settings.cpu_overclock_active = false;
g_settings.enable_8mb_ram = false;
g_settings.gpu_resolution_scale = 1;
g_settings.gpu_resolution_soft_scale = 1;
g_settings.gpu_multisamples = 1;
g_settings.gpu_per_sample_shading = false;
g_settings.gpu_true_color = false;
@ -768,7 +766,6 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings)
m_audio_stream->SetOutputVolume(GetAudioOutputVolume());
if (g_settings.gpu_resolution_scale != old_settings.gpu_resolution_scale ||
g_settings.gpu_resolution_soft_scale != old_settings.gpu_resolution_soft_scale ||
g_settings.gpu_multisamples != old_settings.gpu_multisamples ||
g_settings.gpu_per_sample_shading != old_settings.gpu_per_sample_shading ||
g_settings.gpu_use_thread != old_settings.gpu_use_thread ||
@ -1092,13 +1089,10 @@ void HostInterface::ModifyResolutionScale(s32 increment)
{
const u32 new_resolution_scale = std::clamp<u32>(
static_cast<u32>(static_cast<s32>(g_settings.gpu_resolution_scale) + increment), 1, GPU::MAX_RESOLUTION_SCALE);
const u32 new_resolution_soft_scale = std::clamp<u32>(
static_cast<u32>(static_cast<s32>(g_settings.gpu_resolution_soft_scale) + increment), 1, GPU::MAX_RESOLUTION_SCALE);
if (new_resolution_scale == g_settings.gpu_resolution_scale || new_resolution_soft_scale == g_settings.gpu_resolution_soft_scale)
if (new_resolution_scale == g_settings.gpu_resolution_scale)
return;
g_settings.gpu_resolution_scale = new_resolution_scale;
g_settings.gpu_resolution_soft_scale = new_resolution_soft_scale;
if (!System::IsShutdown())
{