mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-07 08:39:04 +00:00
Frame: Remove callback function prototypes from header
Gets rid of more direct usages of the main_frame global, keeping the callbacks internal to the frame itself.
This commit is contained in:
parent
ee0e6fa09c
commit
c457ee4995
6 changed files with 27 additions and 38 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue