Bind Win32 main-thread queue to runtime state
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user