diff --git a/Source/Core/Core/Src/HW/SerialInterface.cpp b/Source/Core/Core/Src/HW/SerialInterface.cpp index 5b86763ed1..fac98a1ba8 100644 --- a/Source/Core/Core/Src/HW/SerialInterface.cpp +++ b/Source/Core/Core/Src/HW/SerialInterface.cpp @@ -227,9 +227,10 @@ void Init() g_Channel[i].m_InLo.Hex = 0; } + unsigned int AttachedPasMask = PluginPAD::PAD_GetAttachedPads(); for (int i=0; i<4; i++) { - if (PluginPAD::PAD_GetNumberOfPads() & (1< (plugin.Get("PAD_Shutdown")); g_PAD_GetStatus = reinterpret_cast (plugin.Get("PAD_GetStatus")); g_PAD_Rumble = reinterpret_cast (plugin.Get("PAD_Rumble")); - g_PAD_GetNumberOfPads = reinterpret_cast(plugin.Get("PAD_GetNumberOfPads")); + g_PAD_GetAttachedPads = reinterpret_cast(plugin.Get("PAD_GetAttachedPads")); if ((g_GetDllInfo != 0) && (g_DllAbout != 0) && @@ -136,10 +136,10 @@ void PAD_Rumble(BYTE _numPAD, unsigned int _iType, unsigned int _iStrength) g_PAD_Rumble(_numPAD, _iType, _iStrength); } -unsigned int PAD_GetNumberOfPads() +unsigned int PAD_GetAttachedPads() { - if (g_PAD_GetNumberOfPads) - return g_PAD_GetNumberOfPads(); + if (g_PAD_GetAttachedPads) + return g_PAD_GetAttachedPads(); return 1; } diff --git a/Source/Core/Core/Src/Plugins/Plugin_PAD.h b/Source/Core/Core/Src/Plugins/Plugin_PAD.h index 1eb11a954f..ee6c1340b1 100644 --- a/Source/Core/Core/Src/Plugins/Plugin_PAD.h +++ b/Source/Core/Core/Src/Plugins/Plugin_PAD.h @@ -38,7 +38,7 @@ void PAD_Initialize(SPADInitialize _PADInitialize); void PAD_Shutdown(); void PAD_GetStatus(BYTE _numPAD, SPADStatus* _pPADStatus); void PAD_Rumble(BYTE _numPAD, unsigned int _uType, unsigned int _uStrength); -unsigned int PAD_GetNumberOfPads(); +unsigned int PAD_GetAttachedPads(); unsigned int SaveLoadState(char* _ptr, BOOL save); } // end of namespace PluginPAD diff --git a/Source/PluginSpecs/pluginspecs_pad.h b/Source/PluginSpecs/pluginspecs_pad.h index 402c8d243d..1ebaeae406 100644 --- a/Source/PluginSpecs/pluginspecs_pad.h +++ b/Source/PluginSpecs/pluginspecs_pad.h @@ -126,12 +126,12 @@ EXPORT void CALL PAD_GetStatus(BYTE _numPAD, SPADStatus* _pPADStatus); EXPORT void CALL PAD_Rumble(BYTE _numPAD, unsigned int _uType, unsigned int _uStrength); // __________________________________________________________________________________________________ -// Function: PAD_GetNumberOfPads -// Purpose: Get number of pads (it is flag eg: controller 1 & 4 -> 5) +// Function: PAD_GetAttachedPads +// Purpose: Get mask of attached pads (eg: controller 1 & 4 -> 0x9) // input: none // output: number of pads // -EXPORT unsigned int CALL PAD_GetNumberOfPads(); +EXPORT unsigned int CALL PAD_GetAttachedPads(); // __________________________________________________________________________________________________ // Function: SaveLoadState