From 438bc477d1070c29a5d61bc5243cb2950ed75c18 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Sun, 13 Mar 2016 14:52:07 +0100 Subject: [PATCH] Removed low CPU mode --- src/app/app.cpp | 17 ----------------- src/app/app.h | 9 --------- src/level/robotmain.cpp | 4 ---- 3 files changed, 30 deletions(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index 99eb797b..d2dba1c6 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -162,8 +162,6 @@ CApplication::CApplication(CSystemUtils* systemUtils) m_resolutionOverride = false; m_language = LANGUAGE_ENV; - - m_lowCPU = true; } CApplication::~CApplication() @@ -1102,11 +1100,6 @@ int CApplication::Run() StopPerformanceCounter(PCNT_ALL); UpdatePerformanceCountersData(); - - if (m_lowCPU) - { - m_systemUtils->Usleep(20000); // should still give plenty of fps - } } } @@ -1831,16 +1824,6 @@ void CApplication::SetLanguage(Language language) GetLogger()->Debug("SetLanguage: Test gettext translation: '%s'\n", gettext("Colobot rules!")); } -void CApplication::SetLowCPU(bool low) -{ - m_lowCPU = low; -} - -bool CApplication::GetLowCPU() const -{ - return m_lowCPU; -} - void CApplication::StartPerformanceCounter(PerformanceCounter counter) { m_systemUtils->GetCurrentTimeStamp(m_performanceCounters[counter][0]); diff --git a/src/app/app.h b/src/app/app.h index 3550b56f..0edb5032 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -292,12 +292,6 @@ public: void SetLanguage(Language language); //@} - //! Management of sleep in main loop (lowers CPU usage) - //@{ - void SetLowCPU(bool low); - bool GetLowCPU() const; - //@} - //! Management of performance counters //@{ void StartPerformanceCounter(PerformanceCounter counter); @@ -444,9 +438,6 @@ protected: //! Application language Language m_language; - //! Low cpu mode - bool m_lowCPU; - //! Screen resoultion overriden by commandline bool m_resolutionOverride; diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 57918012..16747f89 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -415,8 +415,6 @@ void CRobotMain::ChangePhase(Phase phase) m_ui->NextMission(); // passes to the next mission } - m_app->SetLowCPU(true); // doesn't use much CPU in interface phases - DeleteAllObjects(); // removes all the current 3D Scene } @@ -548,8 +546,6 @@ void CRobotMain::ChangePhase(Phase phase) if (m_phase == PHASE_SIMUL) { - m_app->SetLowCPU(false); // high CPU for simulation - bool loading = !m_sceneReadPath.empty(); m_ui->ShowLoadingScreen(true);