Trim Win32 lifecycle retained state
This commit is contained in:
@@ -40,7 +40,7 @@ void update_stylus_frame(float dt)
|
||||
|
||||
void update_window_fps(HWND hWnd, const wchar_t* window_title, VrShellState& vr, int frames)
|
||||
{
|
||||
auto* title_fps = retained_window_fps_title_buffer();
|
||||
wchar_t title_fps[512]{};
|
||||
const int vr_fps = current_vr_fps(vr);
|
||||
if (read_vr_session_snapshot(vr).vr_active)
|
||||
swprintf_s(title_fps, 512, L"%s - %d fps - %d vr fps", window_title, frames, vr_fps);
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace {
|
||||
|
||||
struct RetainedWindowLifecycleState final {
|
||||
std::atomic<int> running{-1};
|
||||
wchar_t title_fps[512]{};
|
||||
};
|
||||
|
||||
[[nodiscard]] RetainedWindowLifecycleState& retained_window_lifecycle_state() noexcept
|
||||
@@ -38,9 +37,4 @@ std::atomic<int>& retained_lifecycle_running_state() noexcept
|
||||
return retained_window_lifecycle_state().running;
|
||||
}
|
||||
|
||||
wchar_t* retained_window_fps_title_buffer() noexcept
|
||||
{
|
||||
return retained_window_lifecycle_state().title_fps;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,5 @@ void mark_lifecycle_running() noexcept;
|
||||
void mark_lifecycle_stopped() noexcept;
|
||||
[[nodiscard]] bool lifecycle_is_running() noexcept;
|
||||
[[nodiscard]] std::atomic<int>& retained_lifecycle_running_state() noexcept;
|
||||
[[nodiscard]] wchar_t* retained_window_fps_title_buffer() noexcept;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user