Default to 8 if invalid uservalue is entered, add a check so it won't be set to 2x if limiting is disabled and clean up settings interface more.

This commit is contained in:
Jules.A 2018-10-17 21:18:58 +08:00
parent d818155e8e
commit c65ec323ef
3 changed files with 16 additions and 14 deletions

View File

@ -1496,7 +1496,7 @@ GLsizei OpenGLRenderer::GetLimitedMultisampleSize() const
{
maxMultisamples = OGLMaxMultisamples_Tier3;
}
else if (CommonSettings.GFX3D_Renderer_AntiAliasingSamples == 2)
else if (CommonSettings.GFX3D_Renderer_AntiAliasingLimit && CommonSettings.GFX3D_Renderer_AntiAliasingSamples == 2)
{
maxMultisamples = 2; // Only used when manually limiting.
}

View File

@ -2373,10 +2373,12 @@ int _main()
CommonSettings.GFX3D_Fog = GetPrivateProfileBool("3D", "EnableFog", 1, IniName);
CommonSettings.GFX3D_Texture = GetPrivateProfileBool("3D", "EnableTexture", 1, IniName);
CommonSettings.GFX3D_LineHack = GetPrivateProfileBool("3D", "EnableLineHack", 1, IniName);
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);
CommonSettings.GFX3D_Renderer_AntiAliasingSamples = GetPrivateProfileInt("3D", "AntiAliasingSamples", 8, IniName);
CommonSettings.GFX3D_TXTHack = GetPrivateProfileBool("3D", "EnableTXTHack", 0, IniName); //default is off.
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;
Change3DCoreWithFallbackAndSave(cur3DCore);

View File

@ -118,18 +118,18 @@ BEGIN
COMBOBOX IDC_3DCORE,15,23,163,138,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Unrealistically High-Precision Color Interpolation",IDC_INTERPOLATECOLOR,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,62,165,10
CONTROL "Enable Edge Marking",IDC_3DSETTINGS_EDGEMARK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,119,84,10
CONTROL "Enable Fog",IDC_3DSETTINGS_FOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,130,52,10
CONTROL "Enable Textures",IDC_3DSETTINGS_TEXTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,140,67,10
CONTROL "Enable Edge Marking",IDC_3DSETTINGS_EDGEMARK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,118,84,10
CONTROL "Enable Fog",IDC_3DSETTINGS_FOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,128,52,10
CONTROL "Enable Textures",IDC_3DSETTINGS_TEXTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,138,67,10
CONTROL "Enable Multisample Antialiasing",IDC_3DSETTINGS_ANTIALIASING,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,151,114,10
CONTROL "Limit MSAA Samples",IDC_MSAA_LIMIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,90,10
CONTROL "8x Samples",IDC_MSAA_SAMPLES_8,"Button",BS_AUTORADIOBUTTON,13,171,74,10
CONTROL "4x Samples",IDC_MSAA_SAMPLES_4,"Button",BS_AUTORADIOBUTTON,13,180,74,10
CONTROL "2x Samples",IDC_MSAA_SAMPLES_2,"Button",BS_AUTORADIOBUTTON,13,190,74,10
CONTROL "8x Samples",IDC_MSAA_SAMPLES_8,"Button",BS_AUTORADIOBUTTON,13,172,74,10
CONTROL "4x Samples",IDC_MSAA_SAMPLES_4,"Button",BS_AUTORADIOBUTTON,13,182,74,10
CONTROL "2x Samples",IDC_MSAA_SAMPLES_2,"Button",BS_AUTORADIOBUTTON,13,192,74,10
EDITTEXT IDC_TEXT_PRESCALEHD,267,16,20,14,ES_AUTOHSCROLL
CONTROL "",IDC_NUD_PRESCALEHD,"msctls_updown32",UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS,286,16,11,14
PUSHBUTTON "Default",IDC_DEFAULT,194,165,50,14
PUSHBUTTON "Default",IDC_DEFAULT,194,163,50,14
DEFPUSHBUTTON "OK",IDOK,194,194,50,14
PUSHBUTTON "Cancel",IDCANCEL,253,194,50,14
GROUPBOX "Renderer:",IDC_STATIC,7,7,180,39
@ -138,14 +138,14 @@ BEGIN
CONTROL "Enable Line Hack",IDC_3DSETTINGS_LINEHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,102,73,10
LTEXT "Fixes text bugs in some games.(e.g. Etrian Odyssey)",ID_LABEL_TXTHACK1,14,83,167,11
CONTROL "Enable TXT Hack",IDC_TXTHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,73,10
GROUPBOX "OpenGL Renderer Options",IDC_STATIC,7,137,180,77
GROUPBOX "General Options",IDC_STATIC,194,6,109,148
GROUPBOX "OpenGL Renderer Options",IDC_STATIC,7,137,180,78
GROUPBOX "General Options",IDC_STATIC,194,6,109,146
LTEXT "GPU Scaling Factor",IDC_STATIC,200,19,64,8
CONTROL "Texture Scaling 1x",IDC_TEXSCALE_1,"Button",BS_AUTORADIOBUTTON,200,81,77,10
CONTROL "Texture Scaling 2x",IDC_TEXSCALE_2,"Button",BS_AUTORADIOBUTTON,200,91,79,10
CONTROL "Texture Scaling 4x",IDC_TEXSCALE_4,"Button",BS_AUTORADIOBUTTON,200,102,72,10
CONTROL "Texture Scaling 4x",IDC_TEXSCALE_4,"Button",BS_AUTORADIOBUTTON,200,101,72,10
CONTROL "Deposterize Textures",IDC_TEX_DEPOSTERIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,70,79,10
CONTROL "Smooth Textures",IDC_TEX_SMOOTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,201,75,10
CONTROL "Smooth Textures",IDC_TEX_SMOOTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,202,75,10
LTEXT "You may need to toggle off && on by scene.",ID_LABEL_TXTHACK2,14,91,165,11
CONTROL "GPU Color Depth 24 bit",IDC_GPU_24BPP,"Button",BS_AUTORADIOBUTTON,200,33,98,10
CONTROL "GPU Color Depth 18 bit",IDC_GPU_18BPP,"Button",BS_AUTORADIOBUTTON,200,43,98,10