Fixed #2151 (by disabling 800x600 resolution, except in artist debug mode).

This commit is contained in:
hiker 2015-08-20 11:03:46 +10:00
parent aff41a25b5
commit 309097b0db
2 changed files with 6 additions and 48 deletions

View File

@ -94,8 +94,8 @@ IrrDriver *irr_driver = NULL;
GPUTimer m_perf_query[Q_LAST];
const int MIN_SUPPORTED_HEIGHT = 600;
const int MIN_SUPPORTED_WIDTH = 800;
const int MIN_SUPPORTED_HEIGHT = 768;
const int MIN_SUPPORTED_WIDTH = 1024;
// ----------------------------------------------------------------------------
/** The constructor creates the irrlicht device. It first creates a NULL
@ -324,7 +324,8 @@ void IrrDriver::createListOfVideoModes()
{
const int w = modes->getVideoModeResolution(i).Width;
const int h = modes->getVideoModeResolution(i).Height;
if (h < MIN_SUPPORTED_HEIGHT || w < MIN_SUPPORTED_WIDTH)
if ( (h < MIN_SUPPORTED_HEIGHT || w < MIN_SUPPORTED_WIDTH) &&
( ! (h==600 && w==800 && UserConfigParams::m_artist_debug_mode) ) )
continue;
VideoMode mode(w, h);

View File

@ -219,11 +219,6 @@ void OptionsScreenVideo::init()
// for some odd reason, irrlicht sometimes fails to report the good
// old standard resolutions
// those are always useful for windowed mode
// allow 800x600 only for debug mode
#ifdef DEBUG
bool found_800_600 = false;
#endif
bool found_1024_640 = false;
bool found_1024_768 = false;
for (int n=0; n<amount; n++)
@ -238,19 +233,7 @@ void OptionsScreenVideo::init()
found_config_res = true;
}
#ifdef DEBUG
if (r.width == 800 && r.height == 600)
{
found_800_600 = true;
}
else
#endif
if (r.width == 1024 && r.height == 640)
// This becomes an 'else if' when DEBUG is defined
{
found_1024_640 = true;
}
else if (r.width == 1024 && r.height == 768)
if (r.width == 1024 && r.height == 768)
{
found_1024_768 = true;
}
@ -262,39 +245,13 @@ void OptionsScreenVideo::init()
r.height = UserConfigParams::m_height;
resolutions.push_back(r);
#ifdef DEBUG
if (r.width == 800 && r.height == 600)
{
found_800_600 = true;
}
else
#endif
if (r.width == 1024 && r.height == 640)
// This becomes an 'else if' when DEBUG is defined
{
found_1024_640 = true;
}
else if (r.width == 1024 && r.height == 768)
if (r.width == 1024 && r.height == 768)
{
found_1024_768 = true;
}
} // next found resolution
// Add default resolutions that were not found by irrlicht
#ifdef DEBUG
if (!found_800_600)
{
r.width = 800;
r.height = 600;
resolutions.push_back(r);
}
#endif
if (!found_1024_640)
{
r.width = 1024;
r.height = 640;
resolutions.push_back(r);
}
if (!found_1024_768)
{
r.width = 1024;