Add default 1280x720 resolution in case irrlicht don't report it (#3405)

This commit is contained in:
Alayan-stk-2 2018-08-28 01:31:21 +02:00 committed by auriamg
parent ed8b1fc185
commit 8e17965465

View File

@ -250,6 +250,7 @@ void OptionsScreenVideo::init()
// old standard resolutions
// those are always useful for windowed mode
bool found_1024_768 = false;
bool found_1280_720 = false;
for (int n=0; n<amount; n++)
{
@ -267,6 +268,10 @@ void OptionsScreenVideo::init()
{
found_1024_768 = true;
}
if (r.width == 1280 && r.height == 720)
{
found_1280_720 = true;
}
}
#ifndef ANDROID
@ -280,6 +285,10 @@ void OptionsScreenVideo::init()
{
found_1024_768 = true;
}
if (r.width == 1280 && r.height == 720)
{
found_1280_720 = true;
}
} // next found resolution
// Add default resolutions that were not found by irrlicht
@ -289,6 +298,13 @@ void OptionsScreenVideo::init()
r.height = 768;
resolutions.push_back(r);
}
if (!found_1280_720)
{
r.width = 1280;
r.height = 720;
resolutions.push_back(r);
}
#endif
// Sort resolutions by size
@ -601,4 +617,3 @@ void OptionsScreenVideo::unloaded()
} // unloaded
// ----------------------------------------------------------------------------