Fix server only build

This commit is contained in:
Benau 2018-02-11 02:03:09 +08:00
parent b42c540eed
commit 7ebc33bcaa
2 changed files with 7 additions and 3 deletions

View File

@ -172,7 +172,7 @@ IrrDriver::IrrDriver()
#ifndef SERVER_ONLY #ifndef SERVER_ONLY
for (unsigned i = 0; i < Q_LAST; i++) for (unsigned i = 0; i < Q_LAST; i++)
{ {
m_perf_query[i] = new GPUTimer(m_perf_query_phase[i]); m_perf_query[i] = new GPUTimer(m_perf_query_phase[i]);
} }
#endif #endif
} // IrrDriver } // IrrDriver
@ -191,7 +191,7 @@ IrrDriver::~IrrDriver()
#ifndef SERVER_ONLY #ifndef SERVER_ONLY
for (unsigned i = 0; i < Q_LAST; i++) for (unsigned i = 0; i < Q_LAST; i++)
{ {
delete m_perf_query[i]; delete m_perf_query[i];
} }
#endif #endif
assert(m_device != NULL); assert(m_device != NULL);
@ -203,8 +203,12 @@ IrrDriver::~IrrDriver()
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
const char* IrrDriver::getGPUQueryPhaseName(unsigned q) const char* IrrDriver::getGPUQueryPhaseName(unsigned q)
{ {
#ifndef SERVER_ONLY
assert(q < Q_LAST); assert(q < Q_LAST);
return m_perf_query_phase[q]; return m_perf_query_phase[q];
#else
return "";
#endif
} // getGPUQueryPhaseName } // getGPUQueryPhaseName
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -712,7 +712,7 @@ int handleCmdLinePreliminary()
UserConfigParams::m_verbosity |= UserConfigParams::LOG_ALL; UserConfigParams::m_verbosity |= UserConfigParams::LOG_ALL;
if(CommandLine::has("--online")) if(CommandLine::has("--online"))
MainMenuScreen::m_enable_online=true; MainMenuScreen::m_enable_online=true;
#ifndef ANDROID #if !(defined(SERVER_ONLY) || defined(ANDROID))
if(CommandLine::has("--apitrace")) if(CommandLine::has("--apitrace"))
{ {
SP::sp_apitrace = true; SP::sp_apitrace = true;