Own Web fallback services and trim Win32 session state
This commit is contained in:
@@ -17,7 +17,6 @@ namespace pp::platform::windows {
|
||||
namespace {
|
||||
|
||||
struct RetainedMainWindowSessionState final {
|
||||
HINSTANCE instance{};
|
||||
HWND handle{};
|
||||
wchar_t title[512]{};
|
||||
bool sandboxed = false;
|
||||
@@ -175,8 +174,8 @@ void set_main_window_sandboxed(bool sandboxed) noexcept
|
||||
|
||||
int run_main_application(int argc, char** argv)
|
||||
{
|
||||
const auto instance = GetModuleHandle(NULL);
|
||||
auto& main_window_state = retained_main_window_session_state();
|
||||
main_window_state.instance = GetModuleHandle(NULL);
|
||||
|
||||
auto& runtime_state = retained_runtime_state();
|
||||
runtime_state.owned_app = std::make_unique<App>();
|
||||
@@ -193,7 +192,7 @@ int run_main_application(int argc, char** argv)
|
||||
|
||||
pp::platform::windows::ensure_runtime_data_directory();
|
||||
|
||||
pp::platform::windows::SplashScreen splash(main_window_state.instance);
|
||||
pp::platform::windows::SplashScreen splash(instance);
|
||||
|
||||
pp::platform::windows::initialize_retained_input_state();
|
||||
|
||||
@@ -208,7 +207,7 @@ int run_main_application(int argc, char** argv)
|
||||
switch (pp::platform::windows::initialize_main_window_and_gl(
|
||||
startup,
|
||||
main_window_state.handle,
|
||||
main_window_state.instance,
|
||||
instance,
|
||||
main_window_state.title,
|
||||
context))
|
||||
{
|
||||
@@ -242,12 +241,12 @@ int run_main_application(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
pp::platform::windows::run_main_window_runtime(startup, start_in_vr, splash);
|
||||
pp::platform::windows::run_main_window_runtime(startup, start_in_vr, instance, splash);
|
||||
release_bound_app();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void run_main_window_runtime(const MainWindowStartupState& startup, bool start_in_vr, SplashScreen& splash)
|
||||
void run_main_window_runtime(const MainWindowStartupState& startup, bool start_in_vr, HINSTANCE instance, SplashScreen& splash)
|
||||
{
|
||||
auto& main_window_state = retained_main_window_session_state();
|
||||
auto* app = bound_app();
|
||||
@@ -272,7 +271,7 @@ void run_main_window_runtime(const MainWindowStartupState& startup, bool start_i
|
||||
splash.dismiss();
|
||||
|
||||
run_main_message_loop();
|
||||
shutdown_main_window_runtime(startup, main_window_state.instance);
|
||||
shutdown_main_window_runtime(startup, instance);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ class WacomTablet;
|
||||
namespace pp::platform::windows {
|
||||
|
||||
int run_main_application(int argc, char** argv);
|
||||
void run_main_window_runtime(const MainWindowStartupState& startup, bool start_in_vr, SplashScreen& splash);
|
||||
void run_main_window_runtime(const MainWindowStartupState& startup, bool start_in_vr, HINSTANCE instance, SplashScreen& splash);
|
||||
void bind_app(App* app) noexcept;
|
||||
[[nodiscard]] App* bound_app() noexcept;
|
||||
void release_bound_app() noexcept;
|
||||
|
||||
Reference in New Issue
Block a user