Removed low CPU mode

dev-time-step
krzys-h 2016-03-13 14:52:07 +01:00
parent 665aad4801
commit 438bc477d1
3 changed files with 0 additions and 30 deletions

View File

@ -162,8 +162,6 @@ CApplication::CApplication(CSystemUtils* systemUtils)
m_resolutionOverride = false; m_resolutionOverride = false;
m_language = LANGUAGE_ENV; m_language = LANGUAGE_ENV;
m_lowCPU = true;
} }
CApplication::~CApplication() CApplication::~CApplication()
@ -1102,11 +1100,6 @@ int CApplication::Run()
StopPerformanceCounter(PCNT_ALL); StopPerformanceCounter(PCNT_ALL);
UpdatePerformanceCountersData(); 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!")); 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) void CApplication::StartPerformanceCounter(PerformanceCounter counter)
{ {
m_systemUtils->GetCurrentTimeStamp(m_performanceCounters[counter][0]); m_systemUtils->GetCurrentTimeStamp(m_performanceCounters[counter][0]);

View File

@ -292,12 +292,6 @@ public:
void SetLanguage(Language language); void SetLanguage(Language language);
//@} //@}
//! Management of sleep in main loop (lowers CPU usage)
//@{
void SetLowCPU(bool low);
bool GetLowCPU() const;
//@}
//! Management of performance counters //! Management of performance counters
//@{ //@{
void StartPerformanceCounter(PerformanceCounter counter); void StartPerformanceCounter(PerformanceCounter counter);
@ -444,9 +438,6 @@ protected:
//! Application language //! Application language
Language m_language; Language m_language;
//! Low cpu mode
bool m_lowCPU;
//! Screen resoultion overriden by commandline //! Screen resoultion overriden by commandline
bool m_resolutionOverride; bool m_resolutionOverride;

View File

@ -415,8 +415,6 @@ void CRobotMain::ChangePhase(Phase phase)
m_ui->NextMission(); // passes to the next mission 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 DeleteAllObjects(); // removes all the current 3D Scene
} }
@ -548,8 +546,6 @@ void CRobotMain::ChangePhase(Phase phase)
if (m_phase == PHASE_SIMUL) if (m_phase == PHASE_SIMUL)
{ {
m_app->SetLowCPU(false); // high CPU for simulation
bool loading = !m_sceneReadPath.empty(); bool loading = !m_sceneReadPath.empty();
m_ui->ShowLoadingScreen(true); m_ui->ShowLoadingScreen(true);