Ignore FPS limit set in the config file if no-graphics

is selected (this gives a HUGE speedup for non-graphics
run).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9411 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-08-03 00:41:28 +00:00
parent b33c10a369
commit 6c43457f37

View File

@ -75,7 +75,7 @@ float MainLoop::getLimitedDt()
// When in menus, reduce FPS much, it's not necessary to push to the maximum for plain menus
const int max_fps = (StateManager::get()->throttleFPS() ? 35 : UserConfigParams::m_max_fps);
const int current_fps = (int)(1000.0f/dt);
if( current_fps > max_fps )
if( current_fps > max_fps && !ProfileWorld::isNoGraphics())
{
int wait_time = 1000/max_fps - 1000/current_fps;
if(wait_time < 1) wait_time = 1;