mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-05 09:52:39 +00:00
addded the setdllglobals function to the specs
(no failure maybe warning on symbols git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1825 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c4993bf036
commit
3a9eeeb144
10 changed files with 92 additions and 66 deletions
|
@ -34,6 +34,7 @@ DynamicLibrary CPlugin::m_hInstLib;
|
||||||
void(__cdecl * CPlugin::m_GetDllInfo) (PLUGIN_INFO * _PluginInfo) = 0;
|
void(__cdecl * CPlugin::m_GetDllInfo) (PLUGIN_INFO * _PluginInfo) = 0;
|
||||||
void(__cdecl * CPlugin::m_DllConfig) (HWND _hParent) = 0;
|
void(__cdecl * CPlugin::m_DllConfig) (HWND _hParent) = 0;
|
||||||
void(__cdecl * CPlugin::m_DllDebugger) (HWND _hParent, bool Show) = 0;
|
void(__cdecl * CPlugin::m_DllDebugger) (HWND _hParent, bool Show) = 0;
|
||||||
|
void(__cdecl * CPlugin::m_SetDllGlobals) (PLUGIN_GLOBALS* _PluginGlobals) = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
CPlugin::Release(void)
|
CPlugin::Release(void)
|
||||||
|
@ -41,6 +42,7 @@ CPlugin::Release(void)
|
||||||
m_GetDllInfo = 0;
|
m_GetDllInfo = 0;
|
||||||
m_DllConfig = 0;
|
m_DllConfig = 0;
|
||||||
m_DllDebugger = 0;
|
m_DllDebugger = 0;
|
||||||
|
m_SetDllGlobals = 0;
|
||||||
|
|
||||||
m_hInstLib.Unload();
|
m_hInstLib.Unload();
|
||||||
}
|
}
|
||||||
|
@ -53,6 +55,7 @@ CPlugin::Load(const char* _szName)
|
||||||
m_GetDllInfo = (void (__cdecl*)(PLUGIN_INFO*)) m_hInstLib.Get("GetDllInfo");
|
m_GetDllInfo = (void (__cdecl*)(PLUGIN_INFO*)) m_hInstLib.Get("GetDllInfo");
|
||||||
m_DllConfig = (void (__cdecl*)(HWND)) m_hInstLib.Get("DllConfig");
|
m_DllConfig = (void (__cdecl*)(HWND)) m_hInstLib.Get("DllConfig");
|
||||||
m_DllDebugger = (void (__cdecl*)(HWND, bool)) m_hInstLib.Get("DllDebugger");
|
m_DllDebugger = (void (__cdecl*)(HWND, bool)) m_hInstLib.Get("DllDebugger");
|
||||||
|
m_SetDllGlobals = (void (__cdecl*)(PLUGIN_GLOBALS*)) m_hInstLib.Get("SetDllGlobals");
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,4 +90,13 @@ void CPlugin::Debug(HWND _hwnd, bool Show)
|
||||||
m_DllDebugger(_hwnd, Show);
|
m_DllDebugger(_hwnd, Show);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CPlugin::SetGlobals(PLUGIN_GLOBALS& _pluginGlobals)
|
||||||
|
{
|
||||||
|
if (m_SetDllGlobals != 0)
|
||||||
|
{
|
||||||
|
m_SetDllGlobals(&_pluginGlobals);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // end of namespace Common
|
} // end of namespace Common
|
||||||
|
|
|
@ -32,6 +32,7 @@ class CPlugin
|
||||||
static bool Load(const char* _szName);
|
static bool Load(const char* _szName);
|
||||||
|
|
||||||
static bool GetInfo(PLUGIN_INFO& _pluginInfo);
|
static bool GetInfo(PLUGIN_INFO& _pluginInfo);
|
||||||
|
static void SetGlobals(PLUGIN_GLOBALS& _PluginGlobals);
|
||||||
|
|
||||||
static void Config(HWND _hwnd);
|
static void Config(HWND _hwnd);
|
||||||
static void About(HWND _hwnd);
|
static void About(HWND _hwnd);
|
||||||
|
@ -45,6 +46,8 @@ class CPlugin
|
||||||
static void (__cdecl * m_GetDllInfo)(PLUGIN_INFO* _PluginInfo);
|
static void (__cdecl * m_GetDllInfo)(PLUGIN_INFO* _PluginInfo);
|
||||||
static void (__cdecl * m_DllConfig)(HWND _hParent);
|
static void (__cdecl * m_DllConfig)(HWND _hParent);
|
||||||
static void (__cdecl * m_DllDebugger)(HWND _hParent, bool Show);
|
static void (__cdecl * m_DllDebugger)(HWND _hParent, bool Show);
|
||||||
|
static void (__cdecl * m_SetDllGlobals)(PLUGIN_GLOBALS* _PluginGlobals);
|
||||||
|
|
||||||
};
|
};
|
||||||
} // end of namespace Common
|
} // end of namespace Common
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace PluginDSP
|
||||||
|
|
||||||
// Function Pointer
|
// Function Pointer
|
||||||
TGetDllInfo GetDllInfo = 0;
|
TGetDllInfo GetDllInfo = 0;
|
||||||
|
TSetDllGlobals SetDllGlobals = 0;
|
||||||
TDllConfig DllConfig = 0;
|
TDllConfig DllConfig = 0;
|
||||||
TDllDebugger DllDebugger = 0;
|
TDllDebugger DllDebugger = 0;
|
||||||
TDSP_Initialize DSP_Initialize = 0;
|
TDSP_Initialize DSP_Initialize = 0;
|
||||||
|
@ -57,6 +58,7 @@ void UnloadPlugin()
|
||||||
|
|
||||||
// Set Functions to NULL
|
// Set Functions to NULL
|
||||||
GetDllInfo = 0;
|
GetDllInfo = 0;
|
||||||
|
SetDllGlobals = 0;
|
||||||
DllConfig = 0;
|
DllConfig = 0;
|
||||||
DllDebugger = 0;
|
DllDebugger = 0;
|
||||||
DSP_Initialize = 0;
|
DSP_Initialize = 0;
|
||||||
|
@ -79,6 +81,7 @@ bool LoadPlugin(const char *_Filename)
|
||||||
if (ret == 1)
|
if (ret == 1)
|
||||||
{
|
{
|
||||||
GetDllInfo = reinterpret_cast<TGetDllInfo> (plugin.Get("GetDllInfo"));
|
GetDllInfo = reinterpret_cast<TGetDllInfo> (plugin.Get("GetDllInfo"));
|
||||||
|
SetDllGlobals = reinterpret_cast<TSetDllGlobals> (plugin.Get("SetDllGlobals"));
|
||||||
DllConfig = reinterpret_cast<TDllConfig> (plugin.Get("DllConfig"));
|
DllConfig = reinterpret_cast<TDllConfig> (plugin.Get("DllConfig"));
|
||||||
DllDebugger = reinterpret_cast<TDllDebugger> (plugin.Get("DllDebugger"));
|
DllDebugger = reinterpret_cast<TDllDebugger> (plugin.Get("DllDebugger"));
|
||||||
DSP_Initialize = reinterpret_cast<TDSP_Initialize> (plugin.Get("DSP_Initialize"));
|
DSP_Initialize = reinterpret_cast<TDSP_Initialize> (plugin.Get("DSP_Initialize"));
|
||||||
|
|
|
@ -28,6 +28,7 @@ void UnloadPlugin();
|
||||||
|
|
||||||
// Function Types
|
// Function Types
|
||||||
typedef void (__cdecl* TGetDllInfo)(PLUGIN_INFO*);
|
typedef void (__cdecl* TGetDllInfo)(PLUGIN_INFO*);
|
||||||
|
typedef void (__cdecl* TSetDllGlobals)(PLUGIN_GLOBALS*);
|
||||||
typedef void (__cdecl* TDllConfig)(HWND);
|
typedef void (__cdecl* TDllConfig)(HWND);
|
||||||
typedef void (__cdecl* TDllDebugger)(HWND, bool);
|
typedef void (__cdecl* TDllDebugger)(HWND, bool);
|
||||||
typedef void (__cdecl* TDSP_Initialize)(DSPInitialize);
|
typedef void (__cdecl* TDSP_Initialize)(DSPInitialize);
|
||||||
|
@ -42,6 +43,7 @@ typedef void (__cdecl* TDSP_DoState)(unsigned char **ptr, int mode);
|
||||||
|
|
||||||
// Function Pointers
|
// Function Pointers
|
||||||
extern TGetDllInfo GetDllInfo;
|
extern TGetDllInfo GetDllInfo;
|
||||||
|
extern TSetDllGlobals SetDllGlobals;
|
||||||
extern TDllConfig DllConfig;
|
extern TDllConfig DllConfig;
|
||||||
extern TDllDebugger DllDebugger;
|
extern TDllDebugger DllDebugger;
|
||||||
extern TDSP_Initialize DSP_Initialize;
|
extern TDSP_Initialize DSP_Initialize;
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace PluginPAD
|
||||||
|
|
||||||
// Function Pointers
|
// Function Pointers
|
||||||
TGetDllInfo GetDllInfo = 0;
|
TGetDllInfo GetDllInfo = 0;
|
||||||
|
TSetDllGlobals SetDllGlobals = 0;
|
||||||
TPAD_Shutdown PAD_Shutdown = 0;
|
TPAD_Shutdown PAD_Shutdown = 0;
|
||||||
TDllConfig DllConfig = 0;
|
TDllConfig DllConfig = 0;
|
||||||
TPAD_Initialize PAD_Initialize = 0;
|
TPAD_Initialize PAD_Initialize = 0;
|
||||||
|
@ -44,6 +45,7 @@ void UnloadPlugin()
|
||||||
plugin.Unload();
|
plugin.Unload();
|
||||||
// Set Functions to 0
|
// Set Functions to 0
|
||||||
GetDllInfo = 0;
|
GetDllInfo = 0;
|
||||||
|
SetDllGlobals = 0;
|
||||||
PAD_Shutdown = 0;
|
PAD_Shutdown = 0;
|
||||||
DllConfig = 0;
|
DllConfig = 0;
|
||||||
PAD_Initialize = 0;
|
PAD_Initialize = 0;
|
||||||
|
@ -57,6 +59,7 @@ bool LoadPlugin(const char *_Filename)
|
||||||
if (plugin.Load(_Filename))
|
if (plugin.Load(_Filename))
|
||||||
{
|
{
|
||||||
GetDllInfo = reinterpret_cast<TGetDllInfo> (plugin.Get("GetDllInfo"));
|
GetDllInfo = reinterpret_cast<TGetDllInfo> (plugin.Get("GetDllInfo"));
|
||||||
|
SetDllGlobals = reinterpret_cast<TSetDllGlobals> (plugin.Get("SetDllGlobals"));
|
||||||
DllConfig = reinterpret_cast<TDllConfig> (plugin.Get("DllConfig"));
|
DllConfig = reinterpret_cast<TDllConfig> (plugin.Get("DllConfig"));
|
||||||
PAD_Initialize = reinterpret_cast<TPAD_Initialize> (plugin.Get("PAD_Initialize"));
|
PAD_Initialize = reinterpret_cast<TPAD_Initialize> (plugin.Get("PAD_Initialize"));
|
||||||
PAD_Shutdown = reinterpret_cast<TPAD_Shutdown> (plugin.Get("PAD_Shutdown"));
|
PAD_Shutdown = reinterpret_cast<TPAD_Shutdown> (plugin.Get("PAD_Shutdown"));
|
||||||
|
|
|
@ -29,6 +29,7 @@ void UnloadPlugin();
|
||||||
|
|
||||||
// Function Types
|
// Function Types
|
||||||
typedef void (__cdecl* TGetDllInfo)(PLUGIN_INFO*);
|
typedef void (__cdecl* TGetDllInfo)(PLUGIN_INFO*);
|
||||||
|
typedef void (__cdecl* TSetDllGlobals)(PLUGIN_GLOBALS*);
|
||||||
typedef void (__cdecl* TDllConfig)(HWND);
|
typedef void (__cdecl* TDllConfig)(HWND);
|
||||||
typedef void (__cdecl* TPAD_Initialize)(SPADInitialize);
|
typedef void (__cdecl* TPAD_Initialize)(SPADInitialize);
|
||||||
typedef void (__cdecl* TPAD_Shutdown)();
|
typedef void (__cdecl* TPAD_Shutdown)();
|
||||||
|
@ -39,6 +40,7 @@ typedef unsigned int (__cdecl* TPAD_GetAttachedPads)();
|
||||||
|
|
||||||
// Function Pointers
|
// Function Pointers
|
||||||
extern TGetDllInfo GetDllInfo;
|
extern TGetDllInfo GetDllInfo;
|
||||||
|
extern TSetDllGlobals SetDllGlobals;
|
||||||
extern TPAD_Shutdown PAD_Shutdown;
|
extern TPAD_Shutdown PAD_Shutdown;
|
||||||
extern TDllConfig DllConfig;
|
extern TDllConfig DllConfig;
|
||||||
extern TPAD_Initialize PAD_Initialize;
|
extern TPAD_Initialize PAD_Initialize;
|
||||||
|
|
|
@ -27,6 +27,7 @@ namespace PluginVideo
|
||||||
|
|
||||||
// Function Pointer
|
// Function Pointer
|
||||||
TGetDllInfo GetDllInfo = 0;
|
TGetDllInfo GetDllInfo = 0;
|
||||||
|
TSetDllGlobals SetDllGlobals = 0;
|
||||||
TDllConfig DllConfig = 0;
|
TDllConfig DllConfig = 0;
|
||||||
TDllDebugger DllDebugger = 0;
|
TDllDebugger DllDebugger = 0;
|
||||||
TVideo_Initialize Video_Initialize = 0;
|
TVideo_Initialize Video_Initialize = 0;
|
||||||
|
@ -59,6 +60,7 @@ void UnloadPlugin()
|
||||||
|
|
||||||
// set Functions to 0
|
// set Functions to 0
|
||||||
GetDllInfo = 0;
|
GetDllInfo = 0;
|
||||||
|
SetDllGlobals = 0;
|
||||||
DllConfig = 0;
|
DllConfig = 0;
|
||||||
DllDebugger = 0;
|
DllDebugger = 0;
|
||||||
Video_Initialize = 0;
|
Video_Initialize = 0;
|
||||||
|
@ -89,6 +91,7 @@ bool LoadPlugin(const char *_Filename)
|
||||||
if (ret == 1)
|
if (ret == 1)
|
||||||
{
|
{
|
||||||
GetDllInfo = reinterpret_cast<TGetDllInfo> (plugin.Get("GetDllInfo"));
|
GetDllInfo = reinterpret_cast<TGetDllInfo> (plugin.Get("GetDllInfo"));
|
||||||
|
SetDllGlobals = reinterpret_cast<TSetDllGlobals> (plugin.Get("SetDllGlobals"));
|
||||||
DllConfig = reinterpret_cast<TDllConfig> (plugin.Get("DllConfig"));
|
DllConfig = reinterpret_cast<TDllConfig> (plugin.Get("DllConfig"));
|
||||||
DllDebugger = reinterpret_cast<TDllDebugger> (plugin.Get("DllDebugger"));
|
DllDebugger = reinterpret_cast<TDllDebugger> (plugin.Get("DllDebugger"));
|
||||||
Video_Initialize = reinterpret_cast<TVideo_Initialize> (plugin.Get("Video_Initialize"));
|
Video_Initialize = reinterpret_cast<TVideo_Initialize> (plugin.Get("Video_Initialize"));
|
||||||
|
|
|
@ -32,6 +32,7 @@ void UnloadPlugin();
|
||||||
|
|
||||||
// Function Types
|
// Function Types
|
||||||
typedef void (__cdecl* TGetDllInfo)(PLUGIN_INFO*);
|
typedef void (__cdecl* TGetDllInfo)(PLUGIN_INFO*);
|
||||||
|
typedef void (__cdecl* TSetDllGlobals)(PLUGIN_GLOBALS*);
|
||||||
typedef void (__cdecl* TDllConfig)(HWND);
|
typedef void (__cdecl* TDllConfig)(HWND);
|
||||||
typedef void (__cdecl* TDllDebugger)(HWND, bool);
|
typedef void (__cdecl* TDllDebugger)(HWND, bool);
|
||||||
typedef void (__cdecl* TVideo_Initialize)(SVideoInitialize*);
|
typedef void (__cdecl* TVideo_Initialize)(SVideoInitialize*);
|
||||||
|
@ -47,6 +48,7 @@ typedef void (__cdecl* TVideo_Stop)();
|
||||||
|
|
||||||
// Function Pointers
|
// Function Pointers
|
||||||
extern TGetDllInfo GetDllInfo;
|
extern TGetDllInfo GetDllInfo;
|
||||||
|
extern TSetDllGlobals SetDllGlobals;
|
||||||
extern TDllConfig DllConfig;
|
extern TDllConfig DllConfig;
|
||||||
extern TDllDebugger DllDebugger;
|
extern TDllDebugger DllDebugger;
|
||||||
extern TVideo_Initialize Video_Initialize;
|
extern TVideo_Initialize Video_Initialize;
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace PluginWiimote
|
||||||
|
|
||||||
// Function Pointer
|
// Function Pointer
|
||||||
TGetDllInfo GetDllInfo = 0;
|
TGetDllInfo GetDllInfo = 0;
|
||||||
|
TSetDllGlobals SetDllGlobals = 0;
|
||||||
TDllConfig DllConfig = 0;
|
TDllConfig DllConfig = 0;
|
||||||
TWiimote_Initialize Wiimote_Initialize = 0;
|
TWiimote_Initialize Wiimote_Initialize = 0;
|
||||||
TWiimote_Shutdown Wiimote_Shutdown = 0;
|
TWiimote_Shutdown Wiimote_Shutdown = 0;
|
||||||
|
@ -47,6 +48,7 @@ namespace PluginWiimote
|
||||||
|
|
||||||
// Set Functions to NULL
|
// Set Functions to NULL
|
||||||
GetDllInfo = 0;
|
GetDllInfo = 0;
|
||||||
|
SetDllGlobals = 0;
|
||||||
DllConfig = 0;
|
DllConfig = 0;
|
||||||
Wiimote_Initialize = 0;
|
Wiimote_Initialize = 0;
|
||||||
Wiimote_Shutdown = 0;
|
Wiimote_Shutdown = 0;
|
||||||
|
@ -61,8 +63,8 @@ namespace PluginWiimote
|
||||||
{
|
{
|
||||||
if (plugin.Load(_Filename))
|
if (plugin.Load(_Filename))
|
||||||
{
|
{
|
||||||
LOG(MASTER_LOG, "getting Wiimote Plugin function pointers...");
|
|
||||||
GetDllInfo = reinterpret_cast<TGetDllInfo> (plugin.Get("GetDllInfo"));
|
GetDllInfo = reinterpret_cast<TGetDllInfo> (plugin.Get("GetDllInfo"));
|
||||||
|
SetDllGlobals = reinterpret_cast<TSetDllGlobals> (plugin.Get("SetDllGlobals"));
|
||||||
DllConfig = reinterpret_cast<TDllConfig> (plugin.Get("DllConfig"));
|
DllConfig = reinterpret_cast<TDllConfig> (plugin.Get("DllConfig"));
|
||||||
Wiimote_Initialize = reinterpret_cast<TWiimote_Initialize> (plugin.Get("Wiimote_Initialize"));
|
Wiimote_Initialize = reinterpret_cast<TWiimote_Initialize> (plugin.Get("Wiimote_Initialize"));
|
||||||
Wiimote_Shutdown = reinterpret_cast<TWiimote_Shutdown> (plugin.Get("Wiimote_Shutdown"));
|
Wiimote_Shutdown = reinterpret_cast<TWiimote_Shutdown> (plugin.Get("Wiimote_Shutdown"));
|
||||||
|
@ -72,15 +74,7 @@ namespace PluginWiimote
|
||||||
Wiimote_GetAttachedControllers = reinterpret_cast<TWiimote_GetAttachedControllers> (plugin.Get("Wiimote_GetAttachedControllers"));
|
Wiimote_GetAttachedControllers = reinterpret_cast<TWiimote_GetAttachedControllers> (plugin.Get("Wiimote_GetAttachedControllers"));
|
||||||
Wiimote_DoState = reinterpret_cast<TWiimote_DoState> (plugin.Get("Wiimote_DoState"));
|
Wiimote_DoState = reinterpret_cast<TWiimote_DoState> (plugin.Get("Wiimote_DoState"));
|
||||||
|
|
||||||
LOG(MASTER_LOG, "%s: 0x%p", "GetDllInfo", GetDllInfo);
|
|
||||||
LOG(MASTER_LOG, "%s: 0x%p", "DllConfig", DllConfig);
|
|
||||||
LOG(MASTER_LOG, "%s: 0x%p", "Wiimote_Initialize", Wiimote_Initialize);
|
|
||||||
LOG(MASTER_LOG, "%s: 0x%p", "Wiimote_Shutdown", Wiimote_Shutdown);
|
|
||||||
LOG(MASTER_LOG, "%s: 0x%p", "Wiimote_ControlChannel", Wiimote_ControlChannel);
|
|
||||||
LOG(MASTER_LOG, "%s: 0x%p", "Wiimote_InterruptChannel", Wiimote_InterruptChannel);
|
|
||||||
LOG(MASTER_LOG, "%s: 0x%p", "Wiimote_Update", Wiimote_Update);
|
|
||||||
LOG(MASTER_LOG, "%s: 0x%p", "Wiimote_GetAttachedControllers", Wiimote_GetAttachedControllers);
|
|
||||||
LOG(MASTER_LOG, "%s: 0x%p", "Wiimote_DoState", Wiimote_DoState);
|
|
||||||
if ((GetDllInfo != 0) &&
|
if ((GetDllInfo != 0) &&
|
||||||
(Wiimote_Initialize != 0) &&
|
(Wiimote_Initialize != 0) &&
|
||||||
(Wiimote_Shutdown != 0) &&
|
(Wiimote_Shutdown != 0) &&
|
||||||
|
|
|
@ -28,6 +28,7 @@ void UnloadPlugin();
|
||||||
|
|
||||||
// Function Types
|
// Function Types
|
||||||
typedef void (__cdecl* TGetDllInfo)(PLUGIN_INFO*);
|
typedef void (__cdecl* TGetDllInfo)(PLUGIN_INFO*);
|
||||||
|
typedef void (__cdecl* TSetDllGlobals)(PLUGIN_GLOBALS*);
|
||||||
typedef void (__cdecl* TDllConfig)(HWND);
|
typedef void (__cdecl* TDllConfig)(HWND);
|
||||||
typedef bool (__cdecl* TWiimote_Initialize)(SWiimoteInitialize);
|
typedef bool (__cdecl* TWiimote_Initialize)(SWiimoteInitialize);
|
||||||
typedef void (__cdecl* TWiimote_Shutdown)();
|
typedef void (__cdecl* TWiimote_Shutdown)();
|
||||||
|
@ -39,6 +40,7 @@ typedef void (__cdecl* TWiimote_DoState)(void *ptr, int mode);
|
||||||
|
|
||||||
// Function Pointers
|
// Function Pointers
|
||||||
extern TGetDllInfo GetDllInfo;
|
extern TGetDllInfo GetDllInfo;
|
||||||
|
extern TSetDllGlobals SetDllGlobals;
|
||||||
extern TDllConfig DllConfig;
|
extern TDllConfig DllConfig;
|
||||||
extern TWiimote_Initialize Wiimote_Initialize;
|
extern TWiimote_Initialize Wiimote_Initialize;
|
||||||
extern TWiimote_Shutdown Wiimote_Shutdown;
|
extern TWiimote_Shutdown Wiimote_Shutdown;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue