Add a warning for very low screen resolutions.
There are some android devices that are 320x240, 400x240 etc... Bare minimum to run STK is 640x480. Otherwise some important gui elements are not displayed and it may crash in guiengine.
This commit is contained in:
parent
76257f68c5
commit
8462c552d1
74
src/main.cpp
74
src/main.cpp
@ -1640,37 +1640,57 @@ int main(int argc, char *argv[] )
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!ProfileWorld::isNoGraphics() &&
|
||||
GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_DRIVER_RECENT_ENOUGH))
|
||||
{
|
||||
if (UserConfigParams::m_old_driver_popup)
|
||||
{
|
||||
MessageDialog *dialog =
|
||||
new MessageDialog(_("Your driver version is too old. Please install "
|
||||
"the latest video drivers."),
|
||||
/*from queue*/ true);
|
||||
GUIEngine::DialogQueue::get()->pushDialog(dialog);
|
||||
}
|
||||
Log::warn("OpenGL", "Driver is too old!");
|
||||
}
|
||||
#ifndef SERVER_ONLY
|
||||
else if (!CVS->isGLSL())
|
||||
if (!ProfileWorld::isNoGraphics())
|
||||
{
|
||||
if (UserConfigParams::m_old_driver_popup)
|
||||
// Some Android devices have only 320x240 and height >= 480 is bare
|
||||
// minimum to make the GUI working as expected.
|
||||
if (irr_driver->getActualScreenSize().Height < 480)
|
||||
{
|
||||
#ifdef USE_GLES2
|
||||
irr::core::stringw version = "OpenGL ES 3.0";
|
||||
#else
|
||||
irr::core::stringw version = "OpenGL 3.1";
|
||||
#endif
|
||||
MessageDialog *dialog =
|
||||
new MessageDialog(_("Your OpenGL version appears to be too old. Please verify "
|
||||
"if an update for your video driver is available. SuperTuxKart requires %s or better.",
|
||||
version),
|
||||
/*from queue*/ true);
|
||||
GUIEngine::DialogQueue::get()->pushDialog(dialog);
|
||||
if (UserConfigParams::m_old_driver_popup)
|
||||
{
|
||||
MessageDialog *dialog =
|
||||
new MessageDialog(_("Your screen resolution is too "
|
||||
"small to run STK."),
|
||||
/*from queue*/ true);
|
||||
GUIEngine::DialogQueue::get()->pushDialog(dialog);
|
||||
}
|
||||
Log::warn("main", "Screen size is too small!");
|
||||
}
|
||||
|
||||
if (GraphicsRestrictions::isDisabled(
|
||||
GraphicsRestrictions::GR_DRIVER_RECENT_ENOUGH))
|
||||
{
|
||||
if (UserConfigParams::m_old_driver_popup)
|
||||
{
|
||||
MessageDialog *dialog =
|
||||
new MessageDialog(_("Your driver version is too old. "
|
||||
"Please install the latest video "
|
||||
"drivers."), /*from queue*/ true);
|
||||
GUIEngine::DialogQueue::get()->pushDialog(dialog);
|
||||
}
|
||||
Log::warn("OpenGL", "Driver is too old!");
|
||||
}
|
||||
else if (!CVS->isGLSL())
|
||||
{
|
||||
if (UserConfigParams::m_old_driver_popup)
|
||||
{
|
||||
#ifdef USE_GLES2
|
||||
irr::core::stringw version = "OpenGL ES 3.0";
|
||||
#else
|
||||
irr::core::stringw version = "OpenGL 3.1";
|
||||
#endif
|
||||
MessageDialog *dialog =
|
||||
new MessageDialog(_("Your OpenGL version appears to be "
|
||||
"too old. Please verify if an "
|
||||
"update for your video driver is "
|
||||
"available. SuperTuxKart requires "
|
||||
"%s or better.", version),
|
||||
/*from queue*/ true);
|
||||
GUIEngine::DialogQueue::get()->pushDialog(dialog);
|
||||
}
|
||||
Log::warn("OpenGL", "OpenGL version is too old!");
|
||||
}
|
||||
Log::warn("OpenGL", "OpenGL version is too old!");
|
||||
}
|
||||
#endif
|
||||
// Note that on the very first run of STK internet status is set to
|
||||
|
Loading…
x
Reference in New Issue
Block a user