diff --git a/SConstruct b/SConstruct index 34bb3d892f..549085d046 100644 --- a/SConstruct +++ b/SConstruct @@ -81,7 +81,7 @@ dirs = [ 'Source/Plugins/Plugin_DSP_HLE/Src', 'Source/Plugins/Plugin_DSP_LLE/Src', 'Source/Plugins/Plugin_PadSimple/Src', - 'Source/Plugins/Plugin_nJoy_SDL/Src', + 'Source/Plugins/Plugin_GCpad', 'Source/Plugins/Plugin_Wiimote/Src', 'Source/Core/DolphinWX/Src', 'Source/Core/DebuggerWX/Src', diff --git a/Source/Plugins/Plugin_GCpad/Config.cpp b/Source/Plugins/Plugin_GCpad/Config.cpp index 1278e98f3e..6e5c22e49f 100644 --- a/Source/Plugins/Plugin_GCpad/Config.cpp +++ b/Source/Plugins/Plugin_GCpad/Config.cpp @@ -21,7 +21,7 @@ #include "Common.h" #include "IniFile.h" #include "Config.h" -#include "GCpad.h" +#include "GCPad.h" static const char* gcControlNames[] = { diff --git a/Source/Plugins/Plugin_GCpad/ConfigBox.cpp b/Source/Plugins/Plugin_GCpad/ConfigBox.cpp index 767819447f..2c9e08d882 100644 --- a/Source/Plugins/Plugin_GCpad/ConfigBox.cpp +++ b/Source/Plugins/Plugin_GCpad/ConfigBox.cpp @@ -19,7 +19,7 @@ #include "math.h" // System #include "ConfigBox.h" #include "Config.h" -#include "GCpad.h" +#include "GCPad.h" #if defined(HAVE_X11) && HAVE_X11 #include #include @@ -363,7 +363,7 @@ void GCPadConfigDialog::UpdateGUI() } #elif defined(HAVE_X11) && HAVE_X11 char keyStr[10] = {0}; - for (int x = 0; x <= IDB_TGR_SEMI_R - IDB_BTN_A; x++) + for (int x = 0; x <= IDB_SHDR_SEMI_R - IDB_BTN_A; x++) { InputCommon::XKeyToString(GCMapping[m_Page].Button[x + EGC_A], keyStr); m_Button_GC[x][m_Page]->SetLabel(wxString::FromAscii(keyStr)); diff --git a/Source/Plugins/Plugin_GCpad/ConfigBox.h b/Source/Plugins/Plugin_GCpad/ConfigBox.h index 5715ac79e9..587203879b 100644 --- a/Source/Plugins/Plugin_GCpad/ConfigBox.h +++ b/Source/Plugins/Plugin_GCpad/ConfigBox.h @@ -29,7 +29,7 @@ #include #include -#include "GCpad.h" +#include "GCPad.h" class GCPadConfigDialog : public wxDialog { diff --git a/Source/Plugins/Plugin_GCpad/ConfigJoypad.cpp b/Source/Plugins/Plugin_GCpad/ConfigJoypad.cpp index f089c9ee9f..d77352f857 100644 --- a/Source/Plugins/Plugin_GCpad/ConfigJoypad.cpp +++ b/Source/Plugins/Plugin_GCpad/ConfigJoypad.cpp @@ -17,7 +17,7 @@ #include "Config.h" #include "ConfigBox.h" -#include "GCpad.h" +#include "GCPad.h" // Replace the harder to understand -1 with "" for the sake of user friendliness diff --git a/Source/Plugins/Plugin_GCpad/GCPad.cpp b/Source/Plugins/Plugin_GCpad/GCPad.cpp index 3ab5608310..781708d3ae 100644 --- a/Source/Plugins/Plugin_GCpad/GCPad.cpp +++ b/Source/Plugins/Plugin_GCpad/GCPad.cpp @@ -16,7 +16,7 @@ // http://code.google.com/p/dolphin-emu/ -#include "GCpad.h" +#include "GCPad.h" #include "Config.h" #include "LogManager.h" #if defined(HAVE_WX) && HAVE_WX @@ -43,6 +43,9 @@ int NumPads = 0, NumGoodPads = 0, g_ID = 0; #ifdef _WIN32 HWND m_hWnd = NULL; // Handle to window #endif +#if defined(HAVE_X11) && HAVE_X11 + Display* WMdisplay; +#endif SPADInitialize *g_PADInitialize = NULL; PLUGIN_GLOBALS* globals = NULL; @@ -179,6 +182,9 @@ void Initialize(void *init) #ifdef _WIN32 m_hWnd = (HWND)g_PADInitialize->hWnd; #endif +#if defined(HAVE_X11) && HAVE_X11 + WMdisplay = (Display*)g_PADInitialize->hWnd; +#endif if (!g_SearchDeviceDone) { @@ -452,7 +458,7 @@ bool Search_Devices(std::vector &_joyinfo, int &_N // Close opened devices first Close_Devices(); - bool Success = InputCommon::SearchDevices(_joyinfo, _NumPads, _NumGoodPads); + bool success = InputCommon::SearchDevices(_joyinfo, _NumPads, _NumGoodPads); if (_NumGoodPads == 0) return false; @@ -472,7 +478,7 @@ bool Search_Devices(std::vector &_joyinfo, int &_N } } - return Success; + return success; } void GetAxisState(CONTROLLER_MAPPING_GC &_GCMapping) diff --git a/Source/Plugins/Plugin_GCpad/GCPad.h b/Source/Plugins/Plugin_GCpad/GCPad.h index d32d19f042..4d50f6f614 100644 --- a/Source/Plugins/Plugin_GCpad/GCPad.h +++ b/Source/Plugins/Plugin_GCpad/GCPad.h @@ -23,7 +23,17 @@ #include // System #include #include "../../Core/InputCommon/Src/SDL.h" // Core -#include "../../Core/InputCommon/Src/XInput.h" +#ifdef _WIN32 + #include "../../Core/InputCommon/Src/XInput.h" +#elif defined(HAVE_X11) && HAVE_X11 + #include + #include + #include + #include +//no need for Cocoa yet, but I guess ayuanx isn't done yet. +//#elif defined(HAVE_COCOA) && HAVE_COCOA +// #include +#endif #include "pluginspecs_pad.h" @@ -137,6 +147,9 @@ extern std::vector joyinfo; #ifdef _WIN32 extern HWND m_hWnd; // Handle to window #endif +#if defined(HAVE_X11) && HAVE_X11 +extern Display* WMdisplay; +#endif // Custom Functions diff --git a/Source/Plugins/Plugin_GCpad/ReRecording.cpp b/Source/Plugins/Plugin_GCpad/ReRecording.cpp index eb083c005d..d18a2349be 100644 --- a/Source/Plugins/Plugin_GCpad/ReRecording.cpp +++ b/Source/Plugins/Plugin_GCpad/ReRecording.cpp @@ -16,7 +16,7 @@ // http://code.google.com/p/dolphin-emu/ -#include "GCpad.h" +#include "GCPad.h" #include "FileUtil.h" #include "ChunkFile.h" diff --git a/Source/Plugins/Plugin_GCpad/Rumble.cpp b/Source/Plugins/Plugin_GCpad/Rumble.cpp index 4118f4b5d5..926285175b 100644 --- a/Source/Plugins/Plugin_GCpad/Rumble.cpp +++ b/Source/Plugins/Plugin_GCpad/Rumble.cpp @@ -16,7 +16,7 @@ // http://code.google.com/p/dolphin-emu/ -#include "GCpad.h" +#include "GCPad.h" #ifdef _WIN32 #include "XInput.h"