Преглед изворни кода

Extract fps counter drawing

AlexVinS пре 10 година
родитељ
комит
32c15a8266
3 измењених фајлова са 3 додато и 6 уклоњено
  1. 0 3
      client/CPlayerInterface.cpp
  2. 0 3
      client/CPreGame.cpp
  3. 3 0
      client/gui/CGuiHandler.cpp

+ 0 - 3
client/CPlayerInterface.cpp

@@ -1617,9 +1617,6 @@ void CPlayerInterface::update()
 		GH.totalRedraw();
 	else
 		GH.simpleRedraw();
-
-	if (settings["general"]["showfps"].Bool())
-		GH.drawFPSCounter();
 }
 
 int CPlayerInterface::getLastIndex( std::string namePrefix)

+ 0 - 3
client/CPreGame.cpp

@@ -537,9 +537,6 @@ void CGPreGame::update()
 	// /FIXME: find out why GH.listInt is empty to begin with
 	if (GH.topInt() != nullptr)
 		GH.topInt()->show(screen);
-
-	if (settings["general"]["showfps"].Bool())
-		GH.drawFPSCounter();
 }
 
 void CGPreGame::openCampaignScreen(std::string name)

+ 3 - 0
client/gui/CGuiHandler.cpp

@@ -414,6 +414,9 @@ void CGuiHandler::renderFrame()
 
 		if(nullptr != curInt)
 			curInt->update();
+		
+		if (settings["general"]["showfps"].Bool())
+			drawFPSCounter();		
 			
 		// draw the mouse cursor and update the screen
 		CCS->curh->render();