Fixed AA settings not updating correctly after screen resolution change

This commit is contained in:
Lwmte 2025-03-13 12:57:12 +01:00
parent 1d60524269
commit f0ddc22da8

View file

@ -616,12 +616,16 @@ namespace TEN::Gui
{
// Save the configuration.
auto screenResolution = g_Configuration.SupportedScreenResolutions[CurrentSettings.SelectedScreenResolution];
bool screenResolutionChanged = CurrentSettings.Configuration.ScreenWidth != screenResolution.x ||
CurrentSettings.Configuration.ScreenHeight != screenResolution.y;
CurrentSettings.Configuration.ScreenWidth = screenResolution.x;
CurrentSettings.Configuration.ScreenHeight = screenResolution.y;
// Determine whether we should update AA shaders.
bool shouldRecompileAAShaders = g_Configuration.AntialiasingMode != CurrentSettings.Configuration.AntialiasingMode &&
CurrentSettings.Configuration.AntialiasingMode != AntialiasingMode::Low;
bool shouldRecompileAAShaders = CurrentSettings.Configuration.AntialiasingMode != AntialiasingMode::Low &&
(screenResolutionChanged || g_Configuration.AntialiasingMode != CurrentSettings.Configuration.AntialiasingMode);
g_Configuration = CurrentSettings.Configuration;
SaveConfiguration();