mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 10:39:45 -06:00
Merge pull request #5200 from lioncash/frame
Frame: Remove callback function prototypes from header.
This commit is contained in:
@ -104,7 +104,7 @@ static Common::Flag s_is_booting;
|
||||
static void* s_window_handle = nullptr;
|
||||
static std::string s_state_filename;
|
||||
static std::thread s_emu_thread;
|
||||
static StoppedCallbackFunc s_on_stopped_callback = nullptr;
|
||||
static StoppedCallbackFunc s_on_stopped_callback;
|
||||
|
||||
static std::thread s_cpu_thread;
|
||||
static bool s_request_refresh_info = false;
|
||||
@ -938,7 +938,7 @@ void Shutdown()
|
||||
|
||||
void SetOnStoppedCallback(StoppedCallbackFunc callback)
|
||||
{
|
||||
s_on_stopped_callback = callback;
|
||||
s_on_stopped_callback = std::move(callback);
|
||||
}
|
||||
|
||||
void UpdateWantDeterminism(bool initial)
|
||||
|
@ -66,8 +66,6 @@ void DisplayMessage(const std::string& message, int time_in_ms);
|
||||
std::string GetStateFileName();
|
||||
void SetStateFileName(const std::string& val);
|
||||
|
||||
void SetBlockStart(u32 addr);
|
||||
|
||||
void FrameUpdateOnCPUThread();
|
||||
|
||||
bool ShouldSkipFrame(int skipped);
|
||||
@ -84,7 +82,7 @@ void UpdateTitle();
|
||||
bool PauseAndLock(bool doLock, bool unpauseOnUnlock = true);
|
||||
|
||||
// for calling back into UI code without introducing a dependency on it in core
|
||||
typedef void (*StoppedCallbackFunc)(void);
|
||||
using StoppedCallbackFunc = std::function<void()>;
|
||||
void SetOnStoppedCallback(StoppedCallbackFunc callback);
|
||||
|
||||
// Run on the Host thread when the factors change. [NOT THREADSAFE]
|
||||
|
@ -57,7 +57,7 @@ static HEAP_ALLOC(wrkmem, LZO1X_1_MEM_COMPRESS);
|
||||
|
||||
static std::string g_last_filename;
|
||||
|
||||
static CallbackFunc g_onAfterLoadCb = nullptr;
|
||||
static AfterLoadCallbackFunc s_on_after_load_callback;
|
||||
|
||||
// Temporary undo state buffer
|
||||
static std::vector<u8> g_undo_load_buffer;
|
||||
@ -607,8 +607,8 @@ void LoadAs(const std::string& filename)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_onAfterLoadCb)
|
||||
g_onAfterLoadCb();
|
||||
if (s_on_after_load_callback)
|
||||
s_on_after_load_callback();
|
||||
|
||||
g_loadDepth--;
|
||||
|
||||
@ -616,9 +616,9 @@ void LoadAs(const std::string& filename)
|
||||
Core::PauseAndLock(false, wasUnpaused);
|
||||
}
|
||||
|
||||
void SetOnAfterLoadCallback(CallbackFunc callback)
|
||||
void SetOnAfterLoadCallback(AfterLoadCallbackFunc callback)
|
||||
{
|
||||
g_onAfterLoadCb = callback;
|
||||
s_on_after_load_callback = std::move(callback);
|
||||
}
|
||||
|
||||
void VerifyAt(const std::string& filename)
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -61,6 +62,6 @@ void UndoLoadState();
|
||||
void Flush();
|
||||
|
||||
// for calling back into UI code without introducing a dependency on it in core
|
||||
typedef void (*CallbackFunc)(void);
|
||||
void SetOnAfterLoadCallback(CallbackFunc callback);
|
||||
using AfterLoadCallbackFunc = std::function<void()>;
|
||||
void SetOnAfterLoadCallback(AfterLoadCallbackFunc callback);
|
||||
}
|
||||
|
Reference in New Issue
Block a user