SdkServer: Fix compilation
Former-commit-id: ea7163d5af56b3e08b865d0fb6ac5aacc5ec9ab4 [formerly 3fcbe74d2738776bc3f92f59a572931f82aacf5a] [formerly 1f83d4bc4e639999892376bd7328536878b36ff4 [formerly d1617dde160d6b1415758f57759581b537f241ff]] Former-commit-id: b44ee9651c91d2362e61cb661479849d03a09e82 [formerly 34a3c0fb2093a9de6130b5d0d784e6dd76ae22c8] Former-commit-id: 6a87eec688dd737da6ec80ef882c9ce1fd168933
This commit is contained in:
parent
07fe2f560e
commit
11baa02ec3
|
|
@ -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