mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
nJoy: Readded some fixes to nJoy (Notice: these changes have nothing to do with the argument earlier. These are only for fixing nJoy (point one and three in the 1991 revision)). Now opening the Wiimote plugin doesn't crash either (it was just a typo in GetWiimote()).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2000 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -64,6 +64,8 @@ CPlugin::CPlugin(const char* _szName) : valid(false)
|
||||
m_DoState != 0)
|
||||
valid = true;
|
||||
|
||||
// Save the filename for this plugin
|
||||
Filename = _szName;
|
||||
}
|
||||
|
||||
void *CPlugin::LoadSymbol(const char *sym) {
|
||||
|
@ -40,6 +40,7 @@ class CPlugin
|
||||
~CPlugin();
|
||||
|
||||
virtual bool IsValid() {return valid;};
|
||||
virtual std::string GetFilename() {return Filename;};
|
||||
|
||||
bool GetInfo(PLUGIN_INFO& _pluginInfo);
|
||||
void SetGlobals(PLUGIN_GLOBALS* _PluginGlobals);
|
||||
@ -56,6 +57,7 @@ class CPlugin
|
||||
|
||||
DynamicLibrary m_hInstLib;
|
||||
bool valid;
|
||||
std::string Filename;
|
||||
|
||||
// Functions
|
||||
TGetDllInfo m_GetDllInfo;
|
||||
|
@ -1,24 +1,24 @@
|
||||
#include "PluginPAD.h"
|
||||
|
||||
namespace Common {
|
||||
PluginPAD::PluginPAD(const char *_Filename) : CPlugin(_Filename), validPAD(false) {
|
||||
|
||||
PAD_GetStatus = reinterpret_cast<TPAD_GetStatus>
|
||||
(LoadSymbol("PAD_GetStatus"));
|
||||
PAD_Input = reinterpret_cast<TPAD_Input>
|
||||
(LoadSymbol("PAD_Input"));
|
||||
PAD_Rumble = reinterpret_cast<TPAD_Rumble>
|
||||
(LoadSymbol("PAD_Rumble"));
|
||||
PAD_GetAttachedPads = reinterpret_cast<TPAD_GetAttachedPads>
|
||||
(LoadSymbol("PAD_GetAttachedPads"));
|
||||
namespace Common
|
||||
{
|
||||
PluginPAD::PluginPAD(const char *_Filename) : CPlugin(_Filename), validPAD(false)
|
||||
{
|
||||
PAD_GetStatus = reinterpret_cast<TPAD_GetStatus>
|
||||
(LoadSymbol("PAD_GetStatus"));
|
||||
PAD_Input = reinterpret_cast<TPAD_Input>
|
||||
(LoadSymbol("PAD_Input"));
|
||||
PAD_Rumble = reinterpret_cast<TPAD_Rumble>
|
||||
(LoadSymbol("PAD_Rumble"));
|
||||
PAD_GetAttachedPads = reinterpret_cast<TPAD_GetAttachedPads>
|
||||
(LoadSymbol("PAD_GetAttachedPads"));
|
||||
|
||||
if ((PAD_GetStatus != 0) &&
|
||||
(PAD_Input != 0) &&
|
||||
(PAD_Rumble != 0) &&
|
||||
(PAD_GetAttachedPads != 0))
|
||||
validPAD = true;
|
||||
if ((PAD_GetStatus != 0) &&
|
||||
(PAD_Input != 0) &&
|
||||
(PAD_Rumble != 0) &&
|
||||
(PAD_GetAttachedPads != 0))
|
||||
validPAD = true;
|
||||
}
|
||||
|
||||
PluginPAD::~PluginPAD() {
|
||||
}
|
||||
PluginPAD::~PluginPAD() {}
|
||||
}
|
||||
|
@ -13,22 +13,23 @@ namespace Common {
|
||||
typedef void (__cdecl* TVideo_AddMessage)(const char* pstr, unsigned int milliseconds);
|
||||
typedef void (__cdecl* TVideo_Stop)();
|
||||
|
||||
class PluginVideo : public CPlugin {
|
||||
class PluginVideo : public CPlugin
|
||||
{
|
||||
public:
|
||||
PluginVideo(const char *_Filename);
|
||||
~PluginVideo();
|
||||
virtual bool IsValid() {return validVideo;};
|
||||
PluginVideo(const char *_Filename);
|
||||
~PluginVideo();
|
||||
virtual bool IsValid() {return validVideo;};
|
||||
|
||||
TVideo_Prepare Video_Prepare;
|
||||
TVideo_SendFifoData Video_SendFifoData;
|
||||
TVideo_UpdateXFB Video_UpdateXFB;
|
||||
TVideo_Screenshot Video_Screenshot;
|
||||
TVideo_EnterLoop Video_EnterLoop;
|
||||
TVideo_AddMessage Video_AddMessage;
|
||||
TVideo_Stop Video_Stop;
|
||||
TVideo_Prepare Video_Prepare;
|
||||
TVideo_SendFifoData Video_SendFifoData;
|
||||
TVideo_UpdateXFB Video_UpdateXFB;
|
||||
TVideo_Screenshot Video_Screenshot;
|
||||
TVideo_EnterLoop Video_EnterLoop;
|
||||
TVideo_AddMessage Video_AddMessage;
|
||||
TVideo_Stop Video_Stop;
|
||||
|
||||
private:
|
||||
bool validVideo;
|
||||
bool validVideo;
|
||||
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user