mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-28 12:58:05 +03:00
Core: Add a HookableEvent for UICommon::FlushUnsavedData to use.
This commit is contained in:
parent
30b88a69cf
commit
ba6331723b
2 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <string_view>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/HookableEvent.h"
|
||||
|
||||
struct BootParameters;
|
||||
struct WindowSystemInfo;
|
||||
|
@ -193,4 +194,8 @@ void UpdateInputGate(bool require_focus, bool require_full_focus = false);
|
|||
|
||||
void UpdateTitle(Core::System& system);
|
||||
|
||||
// Android triggers this before a potential process termination.
|
||||
// Core is expected to be paused when this happens.
|
||||
using FlushUnsavedDataEvent = Common::HookableEvent<"FlushUnsavedData">;
|
||||
|
||||
} // namespace Core
|
||||
|
|
|
@ -161,6 +161,7 @@ void Shutdown()
|
|||
void FlushUnsavedData()
|
||||
{
|
||||
INFO_LOG_FMT(CORE, "Flushing unsaved data...");
|
||||
Core::FlushUnsavedDataEvent::Trigger();
|
||||
}
|
||||
|
||||
void InitControllers(const WindowSystemInfo& wsi)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue