Merge pull request #13594 from jordan-woyak/state-cleanups

State: Simplify interthread communication and general cleanups.
This commit is contained in:
Jordan Woyak
2026-02-03 16:50:52 -06:00
committed by GitHub
14 changed files with 581 additions and 373 deletions
+12
View File
@@ -60,6 +60,7 @@
namespace UICommon
{
static Config::ConfigChangedCallbackID s_config_changed_callback_id;
static Common::HookableEvent<> s_flush_unsaved_data_event_hook;
static void CreateDumpPath(std::string path)
{
@@ -157,6 +158,17 @@ void Shutdown()
Config::Shutdown();
}
[[nodiscard]] Common::EventHook AddFlushUnsavedDataCallback(std::function<void()> callback)
{
return s_flush_unsaved_data_event_hook.Register(std::move(callback));
}
void FlushUnsavedData()
{
INFO_LOG_FMT(CORE, "Flushing unsaved data...");
s_flush_unsaved_data_event_hook.Trigger();
}
void InitControllers(const WindowSystemInfo& wsi)
{
if (g_controller_interface.IsInit())