mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-09-18 10:50:05 +00:00
Merge pull request #13594 from jordan-woyak/state-cleanups
State: Simplify interthread communication and general cleanups.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user