This commit is contained in:
DeaTh-G 2026-02-02 17:43:04 +01:00
parent 892fd5a570
commit f56d90018d
2 changed files with 4 additions and 4 deletions

View file

@ -536,7 +536,7 @@ std::vector<SDL_DisplayMode> GameWindow::GetDisplayModes(bool ignoreInvalidModes
int GameWindow::FindNearestDisplayMode()
{
auto result = -1;
auto displayModes = std::vector<SDL_DisplayMode>();
auto displayModes = GetDisplayModes();
auto currentDiff = std::numeric_limits<int>::max();
for (int i = 0; i < displayModes.size(); i++)

View file

@ -753,9 +753,9 @@ void Config::CreateCallbacks()
{
Config::WindowSize.LockCallback = [](ConfigDef<int32_t>* def)
{
// Try matching the current window size with a known configuration.
if (def->Value < 0)
def->Value = GameWindow::FindNearestDisplayMode();
// // Try matching the current window size with a known configuration.
// if (def->Value < 0)
// def->Value = GameWindow::FindNearestDisplayMode();
};
Config::WindowSize.ApplyCallback = [](ConfigDef<int32_t>* def)