Skip to content

Commit

Permalink
Allow to disable popup messages about too old drivers in config.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
deveee committed Mar 25, 2015
1 parent e9c72f8 commit 5828ddd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
3 changes: 3 additions & 0 deletions src/config/user_config.hpp
Expand Up @@ -482,6 +482,9 @@ namespace UserConfigParams
PARAM_PREFIX BoolUserConfigParam m_esm
PARAM_DEFAULT(BoolUserConfigParam(false, "enable_esm",
&m_video_group, "Enable Exponential Shadow Map (better but slower)"));
PARAM_PREFIX BoolUserConfigParam m_old_driver_popup
PARAM_DEFAULT(BoolUserConfigParam(true, "old_driver_popup",
&m_video_group, "Determines if popup message about too old drivers should be displayed."));

// ---- Debug - not saved to config file
/** If gamepad debugging is enabled. */
Expand Down
31 changes: 17 additions & 14 deletions src/main.cpp
Expand Up @@ -1361,21 +1361,24 @@ 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);
}
else if (!CVS->isGLSL())
{
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 OpenGL 3.1 or better."),
/*from queue*/ true);
GUIEngine::DialogQueue::get()->pushDialog(dialog);
if (!ProfileWorld::isNoGraphics() && GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_DRIVER_RECENT_ENOUGH))
{
MessageDialog *dialog =
new MessageDialog(_("Your driver version is too old. Please install "
"the latest video drivers."),
/*from queue*/ true);
GUIEngine::DialogQueue::get()->pushDialog(dialog);
}
else if (!CVS->isGLSL())
{
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 OpenGL 3.1 or better."),
/*from queue*/ true);
GUIEngine::DialogQueue::get()->pushDialog(dialog);
}
}

// Note that on the very first run of STK internet status is set to
Expand Down

0 comments on commit 5828ddd

Please sign in to comment.