diff --git a/Keishiki/Keishiki.cpp b/Keishiki/Keishiki.cpp index 1873a02..fc5377a 100644 --- a/Keishiki/Keishiki.cpp +++ b/Keishiki/Keishiki.cpp @@ -2,7 +2,10 @@ #include "Graphics.h" #include "UI.h" +#if BX_PLATFORM_LINUX && WL_EGL_PLATFORM #include +#endif + #include #include @@ -107,10 +110,11 @@ namespace K { const bgfx::Caps *caps = bgfx::getCaps(); bgfx::dbgTextClear(); bgfx::dbgTextPrintf(0, app_state.window_height/16 - 8, 0xf8, - " lachrymal.net :: %s Renderer :: Max Views %u :: Max FBs %u :: Max Texture Samplers %u :: Blitting %s :: %u FPS", + " lachrymal.net :: %s Renderer :: %u/%u Views :: %u FBs :: %u Samplers :: Blit %s :: %s :: %u FPS", caps->supported & BGFX_CAPS_RENDERER_MULTITHREADED ? "Multithreaded" : "Singlethreaded", - caps->limits.maxViews, caps->limits.maxFrameBuffers, + app_state.n_views, caps->limits.maxViews, caps->limits.maxFrameBuffers, caps->limits.maxTextureSamplers, caps->supported & BGFX_CAPS_TEXTURE_BLIT ? "OK" : "NO", + SDL_GetCurrentVideoDriver(), stat->cpuTimerFreq / stat->cpuTimeFrame); bgfx::dbgTextPrintf(0, app_state.window_height/16 - 7, 0xf8, " Project Keishiki :: %s :: Build %s %s :: SDL %i.%i.%i :: bgfx 1.%i :: Dear ImGui %s :: %s", @@ -147,7 +151,11 @@ namespace K { K::UI::Shutdown(state); K::Resource::Shutdown(); bgfx::shutdown(); - SDL_DestroyWindow(app_state.window); + +#if !(BX_PLATFORM_LINUX && WL_EGL_PLATFORM) + SDL_DestroyWindow(app_state.window); +#endif + SDL_Quit(); } } diff --git a/Keishiki/UI.cpp b/Keishiki/UI.cpp index 3e49d5f..511a23c 100644 --- a/Keishiki/UI.cpp +++ b/Keishiki/UI.cpp @@ -401,6 +401,8 @@ namespace K::UI { } ImGui::EndDisabled(); + app_state.n_views = Graphics::K_VIEW_COMP_COMPOSITE + view_count; + ImGui::SetNextItemWidth(50.0f); ImGui::DragFloat("FPS", &s.fps, 1.0f, 1.0f, 120.0f); diff --git a/Keishiki/include/Keishiki.h b/Keishiki/include/Keishiki.h index 61ae1b9..75015b0 100644 --- a/Keishiki/include/Keishiki.h +++ b/Keishiki/include/Keishiki.h @@ -41,6 +41,7 @@ namespace K { u64 init_time{}, last_time{}, current_time{}, delta_t{}; u32 bgfx_frame{}; + u32 n_views{}; std::atomic_bool running {true}; } app_state; // global ! }