SdkServer: Fix compilation
Former-commit-id: ec1f6310e42086c20589190f5bce7760a3df38ce [formerly 72c0b397681e524e782cf3ab177a16b93d34dba3] [formerly 91f72f2b87fa8b03d9a86b0dcaef1705402b0004 [formerly cdc0851e924c2246c4ed62240b105571c8d9630a]] Former-commit-id: a31774c45bfad37c84bb9a15a974930d9687f310 [formerly dfcf84977f23cad5687abd42a6ca120353b0961f] Former-commit-id: 578ec85861ca025f70efa04187a24b6fb27cdfd4
This commit is contained in:
parent
6872616ca4
commit
22914f38e8
|
|
@ -74,7 +74,6 @@ namespace Ndk
|
||||||
*
|
*
|
||||||
* \param args Arguments used to create the window
|
* \param args Arguments used to create the window
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NDK_SERVER
|
#ifndef NDK_SERVER
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
T& Application::AddWindow(Args&&... args)
|
T& Application::AddWindow(Args&&... args)
|
||||||
|
|
@ -125,6 +124,7 @@ namespace Ndk
|
||||||
*
|
*
|
||||||
* \param enable Should the console overlay be enabled
|
* \param enable Should the console overlay be enabled
|
||||||
*/
|
*/
|
||||||
|
#ifndef NDK_SERVER
|
||||||
inline void Application::EnableConsole(bool enable)
|
inline void Application::EnableConsole(bool enable)
|
||||||
{
|
{
|
||||||
if (enable != ((m_overlayFlags & OverlayFlags_Console) != 0))
|
if (enable != ((m_overlayFlags & OverlayFlags_Console) != 0))
|
||||||
|
|
@ -157,12 +157,14 @@ namespace Ndk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Enable/disable debug FPS counter
|
* \brief Enable/disable debug FPS counter
|
||||||
*
|
*
|
||||||
* \param enable Should the FPS counter be displayed
|
* \param enable Should the FPS counter be displayed
|
||||||
*/
|
*/
|
||||||
|
#ifndef NDK_SERVER
|
||||||
inline void Application::EnableFPSCounter(bool enable)
|
inline void Application::EnableFPSCounter(bool enable)
|
||||||
{
|
{
|
||||||
if (enable != ((m_overlayFlags & OverlayFlags_FPSCounter) != 0))
|
if (enable != ((m_overlayFlags & OverlayFlags_FPSCounter) != 0))
|
||||||
|
|
@ -195,6 +197,7 @@ namespace Ndk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Gets the console overlay for a specific window
|
* \brief Gets the console overlay for a specific window
|
||||||
|
|
@ -207,6 +210,7 @@ namespace Ndk
|
||||||
*
|
*
|
||||||
* \see IsConsoleOverlayEnabled
|
* \see IsConsoleOverlayEnabled
|
||||||
*/
|
*/
|
||||||
|
#ifndef NDK_SERVER
|
||||||
inline Application::ConsoleOverlay& Application::GetConsoleOverlay(std::size_t windowIndex)
|
inline Application::ConsoleOverlay& Application::GetConsoleOverlay(std::size_t windowIndex)
|
||||||
{
|
{
|
||||||
NazaraAssert(m_overlayFlags & OverlayFlags_Console, "Console overlay is not enabled");
|
NazaraAssert(m_overlayFlags & OverlayFlags_Console, "Console overlay is not enabled");
|
||||||
|
|
@ -214,6 +218,7 @@ namespace Ndk
|
||||||
|
|
||||||
return *m_windows[windowIndex].console;
|
return *m_windows[windowIndex].console;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Gets the console overlay for a specific window
|
* \brief Gets the console overlay for a specific window
|
||||||
|
|
@ -226,6 +231,7 @@ namespace Ndk
|
||||||
*
|
*
|
||||||
* \see IsFPSCounterEnabled
|
* \see IsFPSCounterEnabled
|
||||||
*/
|
*/
|
||||||
|
#ifndef NDK_SERVER
|
||||||
inline Application::FPSCounterOverlay& Application::GetFPSCounterOverlay(std::size_t windowIndex)
|
inline Application::FPSCounterOverlay& Application::GetFPSCounterOverlay(std::size_t windowIndex)
|
||||||
{
|
{
|
||||||
NazaraAssert(m_overlayFlags & OverlayFlags_FPSCounter, "FPS counter overlay is not enabled");
|
NazaraAssert(m_overlayFlags & OverlayFlags_FPSCounter, "FPS counter overlay is not enabled");
|
||||||
|
|
@ -233,6 +239,7 @@ namespace Ndk
|
||||||
|
|
||||||
return *m_windows[windowIndex].fpsCounter;
|
return *m_windows[windowIndex].fpsCounter;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Gets the update time of the application
|
* \brief Gets the update time of the application
|
||||||
|
|
@ -252,10 +259,12 @@ namespace Ndk
|
||||||
*
|
*
|
||||||
* \see GetConsoleOverlay
|
* \see GetConsoleOverlay
|
||||||
*/
|
*/
|
||||||
|
#ifndef NDK_SERVER
|
||||||
inline bool Application::IsConsoleEnabled() const
|
inline bool Application::IsConsoleEnabled() const
|
||||||
{
|
{
|
||||||
return (m_overlayFlags & OverlayFlags_Console) != 0;
|
return (m_overlayFlags & OverlayFlags_Console) != 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Checks if the FPS counter overlay is enabled
|
* \brief Checks if the FPS counter overlay is enabled
|
||||||
|
|
@ -263,10 +272,12 @@ namespace Ndk
|
||||||
*
|
*
|
||||||
* \see GetFPSCounterOverlay
|
* \see GetFPSCounterOverlay
|
||||||
*/
|
*/
|
||||||
|
#ifndef NDK_SERVER
|
||||||
inline bool Application::IsFPSCounterEnabled() const
|
inline bool Application::IsFPSCounterEnabled() const
|
||||||
{
|
{
|
||||||
return (m_overlayFlags & OverlayFlags_FPSCounter) != 0;
|
return (m_overlayFlags & OverlayFlags_FPSCounter) != 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Makes the application exit when there's no more open window
|
* \brief Makes the application exit when there's no more open window
|
||||||
|
|
@ -299,9 +310,11 @@ namespace Ndk
|
||||||
return s_application;
|
return s_application;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDK_SERVER
|
||||||
inline Application::WindowInfo::WindowInfo(std::unique_ptr<Nz::Window>&& window) :
|
inline Application::WindowInfo::WindowInfo(std::unique_ptr<Nz::Window>&& window) :
|
||||||
window(std::move(window)),
|
window(std::move(window)),
|
||||||
renderTarget(nullptr)
|
renderTarget(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ namespace Ndk
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDK_SERVER
|
||||||
void Application::SetupConsole(WindowInfo& info)
|
void Application::SetupConsole(WindowInfo& info)
|
||||||
{
|
{
|
||||||
std::unique_ptr<ConsoleOverlay> overlay = std::make_unique<ConsoleOverlay>();
|
std::unique_ptr<ConsoleOverlay> overlay = std::make_unique<ConsoleOverlay>();
|
||||||
|
|
@ -184,6 +185,7 @@ namespace Ndk
|
||||||
camComponent.SetProjectionType(Nz::ProjectionType_Orthogonal);
|
camComponent.SetProjectionType(Nz::ProjectionType_Orthogonal);
|
||||||
camComponent.SetTarget(info.renderTarget);
|
camComponent.SetTarget(info.renderTarget);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
Application* Application::s_application = nullptr;
|
Application* Application::s_application = nullptr;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue