From 11baa02ec32affb96e1f27a7f46264da52de2fe8 Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 28 Aug 2016 18:16:35 +0200 Subject: [PATCH] SdkServer: Fix compilation Former-commit-id: ea7163d5af56b3e08b865d0fb6ac5aacc5ec9ab4 [formerly 3fcbe74d2738776bc3f92f59a572931f82aacf5a] [formerly 1f83d4bc4e639999892376bd7328536878b36ff4 [formerly d1617dde160d6b1415758f57759581b537f241ff]] Former-commit-id: b44ee9651c91d2362e61cb661479849d03a09e82 [formerly 34a3c0fb2093a9de6130b5d0d784e6dd76ae22c8] Former-commit-id: 6a87eec688dd737da6ec80ef882c9ce1fd168933 --- SDK/include/NDK/Application.inl | 15 ++++++++++++++- SDK/src/NDK/Application.cpp | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/SDK/include/NDK/Application.inl b/SDK/include/NDK/Application.inl index 19013c778..d7e0325d9 100644 --- a/SDK/include/NDK/Application.inl +++ b/SDK/include/NDK/Application.inl @@ -74,7 +74,6 @@ namespace Ndk * * \param args Arguments used to create the window */ - #ifndef NDK_SERVER template T& Application::AddWindow(Args&&... args) @@ -125,6 +124,7 @@ namespace Ndk * * \param enable Should the console overlay be enabled */ + #ifndef NDK_SERVER inline void Application::EnableConsole(bool enable) { if (enable != ((m_overlayFlags & OverlayFlags_Console) != 0)) @@ -157,12 +157,14 @@ namespace Ndk } } } + #endif /*! * \brief Enable/disable debug FPS counter * * \param enable Should the FPS counter be displayed */ + #ifndef NDK_SERVER inline void Application::EnableFPSCounter(bool enable) { if (enable != ((m_overlayFlags & OverlayFlags_FPSCounter) != 0)) @@ -195,6 +197,7 @@ namespace Ndk } } } + #endif /*! * \brief Gets the console overlay for a specific window @@ -207,6 +210,7 @@ namespace Ndk * * \see IsConsoleOverlayEnabled */ + #ifndef NDK_SERVER inline Application::ConsoleOverlay& Application::GetConsoleOverlay(std::size_t windowIndex) { NazaraAssert(m_overlayFlags & OverlayFlags_Console, "Console overlay is not enabled"); @@ -214,6 +218,7 @@ namespace Ndk return *m_windows[windowIndex].console; } + #endif /*! * \brief Gets the console overlay for a specific window @@ -226,6 +231,7 @@ namespace Ndk * * \see IsFPSCounterEnabled */ + #ifndef NDK_SERVER inline Application::FPSCounterOverlay& Application::GetFPSCounterOverlay(std::size_t windowIndex) { NazaraAssert(m_overlayFlags & OverlayFlags_FPSCounter, "FPS counter overlay is not enabled"); @@ -233,6 +239,7 @@ namespace Ndk return *m_windows[windowIndex].fpsCounter; } + #endif /*! * \brief Gets the update time of the application @@ -252,10 +259,12 @@ namespace Ndk * * \see GetConsoleOverlay */ + #ifndef NDK_SERVER inline bool Application::IsConsoleEnabled() const { return (m_overlayFlags & OverlayFlags_Console) != 0; } + #endif /*! * \brief Checks if the FPS counter overlay is enabled @@ -263,10 +272,12 @@ namespace Ndk * * \see GetFPSCounterOverlay */ + #ifndef NDK_SERVER inline bool Application::IsFPSCounterEnabled() const { return (m_overlayFlags & OverlayFlags_FPSCounter) != 0; } + #endif /*! * \brief Makes the application exit when there's no more open window @@ -299,9 +310,11 @@ namespace Ndk return s_application; } + #ifndef NDK_SERVER inline Application::WindowInfo::WindowInfo(std::unique_ptr&& window) : window(std::move(window)), renderTarget(nullptr) { } + #endif } diff --git a/SDK/src/NDK/Application.cpp b/SDK/src/NDK/Application.cpp index c4492eb0f..bce62093a 100644 --- a/SDK/src/NDK/Application.cpp +++ b/SDK/src/NDK/Application.cpp @@ -87,6 +87,7 @@ namespace Ndk return true; } + #ifndef NDK_SERVER void Application::SetupConsole(WindowInfo& info) { std::unique_ptr overlay = std::make_unique(); @@ -184,6 +185,7 @@ namespace Ndk camComponent.SetProjectionType(Nz::ProjectionType_Orthogonal); camComponent.SetTarget(info.renderTarget); } + #endif Application* Application::s_application = nullptr; } \ No newline at end of file