Bind Win32 main-thread queue to runtime state

This commit is contained in:
2026-06-17 11:38:43 +02:00
parent 0cf6a6ea4f
commit 9602196e99
6 changed files with 31 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
#include "platform_windows/windows_runtime_state.h"
#include "app.h"
#include "app_runtime.h"
#include "wacom.h"
namespace pp::platform::windows {
@@ -10,6 +11,7 @@ namespace {
struct RetainedWindowsRuntimeState final {
std::unique_ptr<App> owned_app;
AppRuntime* runtime = nullptr;
WacomTablet tablet;
};
@@ -31,4 +33,14 @@ WacomTablet& retained_wacom_tablet() noexcept
return retained_runtime_state().tablet;
}
AppRuntime* retained_bound_runtime() noexcept
{
return retained_runtime_state().runtime;
}
void bind_runtime(AppRuntime* runtime) noexcept
{
retained_runtime_state().runtime = runtime;
}
}