summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-01-23 21:28:55 +0000
committerhrydgard <hrydgard@gmail.com>2009-01-23 21:28:55 +0000
commit70bc8167f8af6aa053b9335209c80f554d8fb597 (patch)
tree275f4138c1f0441be64ec0676d01fc365f8ffcb3 /Source/Core/Common
parent7ecf884f9ae9b3cb8632b858999bf45d97211523 (diff)
Warp back to 1983!!! (rev 1983, that is, not the year :P)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1997 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Src/Common.h1
-rw-r--r--Source/Core/Common/Src/Plugin.cpp24
-rw-r--r--Source/Core/Common/Src/Plugin.h48
-rw-r--r--Source/Core/Common/Src/PluginPAD.h22
-rw-r--r--Source/Core/Common/Src/PluginVideo.cpp8
-rw-r--r--Source/Core/Common/Src/PluginVideo.h27
6 files changed, 57 insertions, 73 deletions
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h
index 712006c1d2..7df31f7cb7 100644
--- a/Source/Core/Common/Src/Common.h
+++ b/Source/Core/Common/Src/Common.h
@@ -38,7 +38,6 @@
#include "../../../PluginSpecs/CommonTypes.h"
#define HAVE_WIIUSE 1
- #define HAVE_SDL 1
#define HAVE_WX 1
#else
#include "CommonTypes.h"
diff --git a/Source/Core/Common/Src/Plugin.cpp b/Source/Core/Common/Src/Plugin.cpp
index dd67c76b3b..15bd184bcf 100644
--- a/Source/Core/Common/Src/Plugin.cpp
+++ b/Source/Core/Common/Src/Plugin.cpp
@@ -37,10 +37,8 @@ CPlugin::~CPlugin()
CPlugin::CPlugin(const char* _szName) : valid(false)
{
- if (m_hInstLib.Load(_szName))
- {
+ if (m_hInstLib.Load(_szName)) {
- // Create pointers to the DLL functions
m_GetDllInfo = reinterpret_cast<TGetDllInfo>
(m_hInstLib.Get("GetDllInfo"));
m_DllConfig = reinterpret_cast<TDllConfig>
@@ -58,28 +56,24 @@ CPlugin::CPlugin(const char* _szName) : valid(false)
}
if (m_GetDllInfo != 0 &&
- m_DllConfig != 0 &&
- m_DllDebugger != 0 &&
- m_SetDllGlobals != 0 &&
- m_Initialize != 0 &&
- m_Shutdown != 0 &&
- m_DoState != 0)
+ m_DllConfig != 0 &&
+ m_DllDebugger != 0 &&
+ m_SetDllGlobals != 0 &&
+ m_Initialize != 0 &&
+ m_Shutdown != 0 &&
+ m_DoState != 0)
valid = true;
- // Save the filename for this plugin
- Filename = _szName;
}
-void *CPlugin::LoadSymbol(const char *sym)
-{
+void *CPlugin::LoadSymbol(const char *sym) {
return m_hInstLib.Get(sym);
}
// ______________________________________________________________________________________
// GetInfo: Get DLL info
-bool CPlugin::GetInfo(PLUGIN_INFO& _pluginInfo)
-{
+bool CPlugin::GetInfo(PLUGIN_INFO& _pluginInfo) {
if (m_GetDllInfo != 0)
{
m_GetDllInfo(&_pluginInfo);
diff --git a/Source/Core/Common/Src/Plugin.h b/Source/Core/Common/Src/Plugin.h
index 553b2419ed..0be36eeb24 100644
--- a/Source/Core/Common/Src/Plugin.h
+++ b/Source/Core/Common/Src/Plugin.h
@@ -36,37 +36,35 @@ class CPlugin
{
public:
- CPlugin(const char* _szName);
- ~CPlugin();
+ CPlugin(const char* _szName);
+ ~CPlugin();
- virtual bool IsValid() {return valid;};
- virtual std::string GetFilename() {return Filename;};
+ virtual bool IsValid() {return valid;};
- bool GetInfo(PLUGIN_INFO& _pluginInfo);
- void SetGlobals(PLUGIN_GLOBALS* _PluginGlobals);
- void *LoadSymbol(const char *sym);
+ bool GetInfo(PLUGIN_INFO& _pluginInfo);
+ void SetGlobals(PLUGIN_GLOBALS* _PluginGlobals);
+ void *LoadSymbol(const char *sym);
- void Config(HWND _hwnd);
- void About(HWND _hwnd);
- void Debug(HWND _hwnd, bool Show);
- void DoState(unsigned char **ptr, int mode);
- void Initialize(void *init);
- void Shutdown();
+ void Config(HWND _hwnd);
+ void About(HWND _hwnd);
+ void Debug(HWND _hwnd, bool Show);
+ void DoState(unsigned char **ptr, int mode);
+ void Initialize(void *init);
+ void Shutdown();
private:
- DynamicLibrary m_hInstLib;
- bool valid;
- std::string Filename;
-
- // Functions
- TGetDllInfo m_GetDllInfo;
- TDllConfig m_DllConfig;
- TDllDebugger m_DllDebugger;
- TSetDllGlobals m_SetDllGlobals;
- TInitialize m_Initialize;
- TShutdown m_Shutdown;
- TDoState m_DoState;
+ DynamicLibrary m_hInstLib;
+ bool valid;
+
+ // Functions
+ TGetDllInfo m_GetDllInfo;
+ TDllConfig m_DllConfig;
+ TDllDebugger m_DllDebugger;
+ TSetDllGlobals m_SetDllGlobals;
+ TInitialize m_Initialize;
+ TShutdown m_Shutdown;
+ TDoState m_DoState;
};
} // end of namespace Common
diff --git a/Source/Core/Common/Src/PluginPAD.h b/Source/Core/Common/Src/PluginPAD.h
index fa779ac069..755c581011 100644
--- a/Source/Core/Common/Src/PluginPAD.h
+++ b/Source/Core/Common/Src/PluginPAD.h
@@ -4,27 +4,25 @@
#include "pluginspecs_pad.h"
#include "Plugin.h"
-namespace Common
-{
+namespace Common {
typedef void (__cdecl* TPAD_GetStatus)(u8, SPADStatus*);
typedef void (__cdecl* TPAD_Input)(u16, u8);
typedef void (__cdecl* TPAD_Rumble)(u8, unsigned int, unsigned int);
typedef unsigned int (__cdecl* TPAD_GetAttachedPads)();
- class PluginPAD : public CPlugin
- {
+ class PluginPAD : public CPlugin {
public:
- PluginPAD(const char *_Filename);
- ~PluginPAD();
- virtual bool IsValid() {return validPAD;};
+ PluginPAD(const char *_Filename);
+ ~PluginPAD();
+ virtual bool IsValid() {return validPAD;};
- TPAD_GetStatus PAD_GetStatus;
- TPAD_Input PAD_Input;
- TPAD_Rumble PAD_Rumble;
- TPAD_GetAttachedPads PAD_GetAttachedPads;
+ TPAD_GetStatus PAD_GetStatus;
+ TPAD_Input PAD_Input;
+ TPAD_Rumble PAD_Rumble;
+ TPAD_GetAttachedPads PAD_GetAttachedPads;
private:
- bool validPAD;
+ bool validPAD;
};
}
diff --git a/Source/Core/Common/Src/PluginVideo.cpp b/Source/Core/Common/Src/PluginVideo.cpp
index 9b9f3db06c..b3330a42ed 100644
--- a/Source/Core/Common/Src/PluginVideo.cpp
+++ b/Source/Core/Common/Src/PluginVideo.cpp
@@ -1,11 +1,7 @@
#include "PluginVideo.h"
-namespace Common
-{
- PluginVideo::PluginVideo(const char *_Filename) :
- CPlugin(_Filename),
- validVideo(false)
- {
+namespace Common {
+ PluginVideo::PluginVideo(const char *_Filename) : CPlugin(_Filename), validVideo(false) {
Video_Prepare = reinterpret_cast<TVideo_Prepare>
(LoadSymbol("Video_Prepare"));
diff --git a/Source/Core/Common/Src/PluginVideo.h b/Source/Core/Common/Src/PluginVideo.h
index bb3f16f691..f679191177 100644
--- a/Source/Core/Common/Src/PluginVideo.h
+++ b/Source/Core/Common/Src/PluginVideo.h
@@ -13,23 +13,22 @@ namespace Common {
typedef void (__cdecl* TVideo_AddMessage)(const char* pstr, unsigned int milliseconds);
typedef void (__cdecl* TVideo_Stop)();
- class PluginVideo : public CPlugin
- {
- public:
- PluginVideo(const char *_Filename);
- ~PluginVideo();
- virtual bool IsValid() {return validVideo;};
+ class PluginVideo : public CPlugin {
+ public:
+ 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;
};
}