diff options
Diffstat (limited to 'Source/Core/Common/Src/Plugin.cpp')
| -rw-r--r-- | Source/Core/Common/Src/Plugin.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Core/Common/Src/Plugin.cpp b/Source/Core/Common/Src/Plugin.cpp index 36283be7a6..8cadbdbad6 100644 --- a/Source/Core/Common/Src/Plugin.cpp +++ b/Source/Core/Common/Src/Plugin.cpp @@ -40,6 +40,7 @@ CPlugin::CPlugin(const char* _szName) : valid(false) m_Initialize = NULL; m_Shutdown = NULL; m_DoState = NULL; + m_EmuStateChange = NULL; if (m_hInstLib.Load(_szName)) { @@ -57,6 +58,8 @@ CPlugin::CPlugin(const char* _szName) : valid(false) (m_hInstLib.Get("Shutdown")); m_DoState = reinterpret_cast<TDoState> (m_hInstLib.Get("DoState")); + m_EmuStateChange = reinterpret_cast<TEmuStateChange> + (m_hInstLib.Get("EmuStateChange")); // Check if the plugin has all the functions it shold have if (m_GetDllInfo != 0 && @@ -65,7 +68,8 @@ CPlugin::CPlugin(const char* _szName) : valid(false) m_SetDllGlobals != 0 && m_Initialize != 0 && m_Shutdown != 0 && - m_DoState != 0) + m_DoState != 0 && + m_EmuStateChange != 0) valid = true; } @@ -112,6 +116,11 @@ void CPlugin::DoState(unsigned char **ptr, int mode) { m_DoState(ptr, mode); } +void CPlugin::EmuStateChange(PLUGIN_EMUSTATE newState) { + if (m_EmuStateChange != NULL) + m_EmuStateChange(newState); +} + void CPlugin::Initialize(void *init) { if (m_Initialize != NULL) |
