Don't include resolutions over 8K in settings list

This commit is contained in:
Cameron Gutman 2020-04-04 12:46:42 -07:00
parent 70de75ae3d
commit d36d5936da

View File

@ -77,7 +77,14 @@ void SystemProperties::querySdlVideoInfo()
err = SDL_GetDesktopDisplayMode(displayIndex, &desktopMode); err = SDL_GetDesktopDisplayMode(displayIndex, &desktopMode);
if (err == 0) { if (err == 0) {
monitorDesktopResolutions.insert(displayIndex, QRect(0, 0, desktopMode.w, desktopMode.h)); if (desktopMode.w <= 8192 && desktopMode.h <= 8192) {
monitorDesktopResolutions.insert(displayIndex, QRect(0, 0, desktopMode.w, desktopMode.h));
}
else {
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
"Skipping resolution over 8K: %dx%d",
desktopMode.w, desktopMode.h);
}
} }
else { else {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
@ -86,7 +93,14 @@ void SystemProperties::querySdlVideoInfo()
} }
if (StreamUtils::getRealDesktopMode(displayIndex, &desktopMode)) { if (StreamUtils::getRealDesktopMode(displayIndex, &desktopMode)) {
monitorNativeResolutions.insert(displayIndex, QRect(0, 0, desktopMode.w, desktopMode.h)); if (desktopMode.w <= 8192 && desktopMode.h <= 8192) {
monitorNativeResolutions.insert(displayIndex, QRect(0, 0, desktopMode.w, desktopMode.h));
}
else {
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
"Skipping resolution over 8K: %dx%d",
desktopMode.w, desktopMode.h);
}
// Start at desktop mode and work our way up // Start at desktop mode and work our way up
bestMode = desktopMode; bestMode = desktopMode;