From 1010709de2aef5f8605c6978cd324e7c1e48f3e9 Mon Sep 17 00:00:00 2001 From: "Jules.A" Date: Wed, 17 Oct 2018 22:40:54 +0800 Subject: [PATCH] Fix #c65ec32 illogical operators (|| instead of &&), save to ini straight away to avoid wrong value being displayed there and don't bother creating another variable to try make a turd prettier. --- desmume/src/frontend/windows/main.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/desmume/src/frontend/windows/main.cpp b/desmume/src/frontend/windows/main.cpp index dfd162fce..b49c78d50 100755 --- a/desmume/src/frontend/windows/main.cpp +++ b/desmume/src/frontend/windows/main.cpp @@ -2376,9 +2376,13 @@ int _main() CommonSettings.GFX3D_TXTHack = GetPrivateProfileBool("3D", "EnableTXTHack", 0, IniName); //default is off. CommonSettings.GFX3D_Renderer_Multisample = GetPrivateProfileBool("3D", "EnableAntiAliasing", 0, IniName); CommonSettings.GFX3D_Renderer_AntiAliasingLimit = GetPrivateProfileBool("3D", "AntiAliasingLimit", 0, IniName); - int tempAA = GetPrivateProfileInt("3D", "AntiAliasingSamples", 8, IniName); //only place this user variable gets read - if(tempAA != 2 || tempAA != 4 || tempAA != 8) tempAA = 8; //so just default to 8 here if invalid is entered. - CommonSettings.GFX3D_Renderer_AntiAliasingSamples = tempAA; + CommonSettings.GFX3D_Renderer_AntiAliasingSamples = GetPrivateProfileInt("3D", "AntiAliasingSamples", 8, IniName); //only place this user variable gets read + if (CommonSettings.GFX3D_Renderer_AntiAliasingSamples != 2 && CommonSettings.GFX3D_Renderer_AntiAliasingSamples != 4 && + CommonSettings.GFX3D_Renderer_AntiAliasingSamples != 8) //so just check for invalid values here + { + CommonSettings.GFX3D_Renderer_AntiAliasingSamples = 8; + WritePrivateProfileInt("3D", "AntiAliasingSamples", CommonSettings.GFX3D_Renderer_AntiAliasingSamples, IniName); + } Change3DCoreWithFallbackAndSave(cur3DCore);