Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8245 for code/trunk


Ignore:
Timestamp:
Apr 16, 2011, 11:19:06 AM (14 years ago)
Author:
landauf
Message:

keep it DRY

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/Game.cc

    r8215 r8245  
    209209
    210210            // Limit frame rate
    211             if(GameMode::showsGraphics())
    212             {
    213                 static bool hasVSync = GraphicsManager::getInstance().hasVSyncEnabled(); // can be static since changes of VSync currently require a restart
    214                 if (this->fpsLimit_ > 0 && !hasVSync)
    215                     this->updateFPSLimiter();
    216             }
    217             else
    218             {
    219                 if (this->fpsLimit_ > 0)
    220                     this->updateFPSLimiter();
    221             }
     211            static bool hasVSync = GameMode::showsGraphics() && GraphicsManager::getInstance().hasVSyncEnabled(); // can be static since changes of VSync currently require a restart
     212            if (this->fpsLimit_ > 0 && !hasVSync)
     213                this->updateFPSLimiter();
    222214        }
    223215
Note: See TracChangeset for help on using the changeset viewer.