diff --git a/Source/Core/Core/HW/GCPad.cpp b/Source/Core/Core/HW/GCPad.cpp index 6b6b968f57..605f48597e 100644 --- a/Source/Core/Core/HW/GCPad.cpp +++ b/Source/Core/Core/HW/GCPad.cpp @@ -47,7 +47,7 @@ void Initialize(void* const hwnd) g_plugin.LoadConfig(true); } -void GetStatus(u8 _numPAD, SPADStatus* _pPADStatus) +void GetStatus(u8 _numPAD, GCPadStatus* _pPADStatus) { memset(_pPADStatus, 0, sizeof(*_pPADStatus)); _pPADStatus->err = PAD_ERR_NONE; diff --git a/Source/Core/Core/HW/GCPad.h b/Source/Core/Core/HW/GCPad.h index ee03c3cd51..ccbfeb77f5 100644 --- a/Source/Core/Core/HW/GCPad.h +++ b/Source/Core/Core/HW/GCPad.h @@ -16,7 +16,7 @@ void Initialize(void* const hwnd); InputPlugin *GetPlugin(); -void GetStatus(u8 _numPAD, SPADStatus* _pPADStatus); +void GetStatus(u8 _numPAD, GCPadStatus* _pPADStatus); void Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength); void Motor(u8 _numPAD, unsigned int _uType, unsigned int _uStrength); diff --git a/Source/Core/Core/HW/GCPadEmu.cpp b/Source/Core/Core/HW/GCPadEmu.cpp index 0a36c725b9..c79e6c057a 100644 --- a/Source/Core/Core/HW/GCPadEmu.cpp +++ b/Source/Core/Core/HW/GCPadEmu.cpp @@ -87,7 +87,7 @@ std::string GCPad::GetName() const return std::string("GCPad") + char('1'+m_index); } -void GCPad::GetInput(SPADStatus* const pad) +void GCPad::GetInput(GCPadStatus* const pad) { // if window has focus or background input enabled if (Host_RendererHasFocus() || m_options[0].settings[0]->value) diff --git a/Source/Core/Core/HW/GCPadEmu.h b/Source/Core/Core/HW/GCPadEmu.h index 150ef15a27..acc687e237 100644 --- a/Source/Core/Core/HW/GCPadEmu.h +++ b/Source/Core/Core/HW/GCPadEmu.h @@ -13,7 +13,7 @@ class GCPad : public ControllerEmu public: GCPad(const unsigned int index); - void GetInput(SPADStatus* const pad); + void GetInput(GCPadStatus* const pad); void SetOutput(const u8 on); void SetMotor(const u8 on); diff --git a/Source/Core/Core/HW/SI_DeviceAMBaseboard.cpp b/Source/Core/Core/HW/SI_DeviceAMBaseboard.cpp index 456c7653d1..8b3b6aff2b 100644 --- a/Source/Core/Core/HW/SI_DeviceAMBaseboard.cpp +++ b/Source/Core/Core/HW/SI_DeviceAMBaseboard.cpp @@ -134,7 +134,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength) case 0x10: { DEBUG_LOG(AMBASEBOARDDEBUG, "GC-AM: Command 10, %02x (READ STATUS&SWITCHES)", ptr(1)); - SPADStatus PadStatus; + GCPadStatus PadStatus; memset(&PadStatus, 0 ,sizeof(PadStatus)); Pad::GetStatus(ISIDevice::m_iDeviceNumber, &PadStatus); res[resp++] = 0x10; @@ -299,7 +299,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength) msg.addData(0); // tilt for (i=0; ibutton & PAD_BUTTON_A) != 0); g_padState.B = ((PadStatus->button & PAD_BUTTON_B) != 0); @@ -635,7 +635,7 @@ void CheckPadStatus(SPADStatus *PadStatus, int controllerID) SetInputDisplayString(g_padState, controllerID); } -void RecordInput(SPADStatus *PadStatus, int controllerID) +void RecordInput(GCPadStatus* PadStatus, int controllerID) { if (!IsRecordingInput() || !IsUsingPad(controllerID)) return; @@ -934,7 +934,7 @@ static void CheckInputEnd() } } -void PlayController(SPADStatus *PadStatus, int controllerID) +void PlayController(GCPadStatus* PadStatus, int controllerID) { // Correct playback is entirely dependent on the emulator polling the controllers // in the same order done during recording @@ -950,7 +950,7 @@ void PlayController(SPADStatus *PadStatus, int controllerID) // dtm files don't save the mic button or error bit. not sure if they're actually used, but better safe than sorry signed char e = PadStatus->err; - memset(PadStatus, 0, sizeof(SPADStatus)); + memset(PadStatus, 0, sizeof(GCPadStatus)); PadStatus->err = e; @@ -1172,7 +1172,7 @@ void SetInputManip(ManipFunction func) mfunc = func; } -void CallInputManip(SPADStatus *PadStatus, int controllerID) +void CallInputManip(GCPadStatus* PadStatus, int controllerID) { if (mfunc) (*mfunc)(PadStatus, controllerID); diff --git a/Source/Core/Core/Movie.h b/Source/Core/Core/Movie.h index c2177e4afa..2610769e75 100644 --- a/Source/Core/Core/Movie.h +++ b/Source/Core/Core/Movie.h @@ -166,13 +166,13 @@ void SetFrameSkipping(unsigned int framesToSkip); void FrameSkipping(); bool BeginRecordingInput(int controllers); -void RecordInput(SPADStatus *PadStatus, int controllerID); +void RecordInput(GCPadStatus* PadStatus, int controllerID); void RecordWiimote(int wiimote, u8 *data, u8 size); bool PlayInput(const std::string& filename); void LoadInput(const std::string& filename); void ReadHeader(); -void PlayController(SPADStatus *PadStatus, int controllerID); +void PlayController(GCPadStatus* PadStatus, int controllerID); bool PlayWiimote(int wiimote, u8* data, const struct WiimoteEmu::ReportFeatures& rptf, int irMode); void EndPlayInput(bool cont); void SaveRecording(const std::string& filename); @@ -180,14 +180,14 @@ void DoState(PointerWrap &p); void CheckMD5(); void GetMD5(); void Shutdown(); -void CheckPadStatus(SPADStatus *PadStatus, int controllerID); +void CheckPadStatus(GCPadStatus* PadStatus, int controllerID); void CheckWiimoteStatus(int wiimote, u8* data, const struct WiimoteEmu::ReportFeatures& rptf, int irMode); std::string GetInputDisplay(); // Done this way to avoid mixing of core and gui code -typedef void(*ManipFunction)(SPADStatus *, int); +typedef void(*ManipFunction)(GCPadStatus*, int); void SetInputManip(ManipFunction); -void CallInputManip(SPADStatus *PadStatus, int controllerID); +void CallInputManip(GCPadStatus* PadStatus, int controllerID); }; diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index f15837116d..84eeb72565 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -29,7 +29,7 @@ NetPad::NetPad() nLo = 0x80800000; } -NetPad::NetPad(const SPADStatus* const pad_status) +NetPad::NetPad(const GCPadStatus* const pad_status) { nHi = (u32)((u8)pad_status->stickY); nHi |= (u32)((u8)pad_status->stickX << 8); @@ -558,7 +558,7 @@ void NetPlayClient::ClearBuffers() } // called from ---CPU--- thread -bool NetPlayClient::GetNetPads(const u8 pad_nb, const SPADStatus* const pad_status, NetPad* const netvalues) +bool NetPlayClient::GetNetPads(const u8 pad_nb, const GCPadStatus* const pad_status, NetPad* const netvalues) { // The interface for this is extremely silly. // @@ -618,7 +618,7 @@ bool NetPlayClient::GetNetPads(const u8 pad_nb, const SPADStatus* const pad_stat Common::SleepCurrentThread(1); } - SPADStatus tmp; + GCPadStatus tmp; tmp.stickY = ((u8*)&netvalues->nHi)[0]; tmp.stickX = ((u8*)&netvalues->nHi)[1]; tmp.button = ((u16*)&netvalues->nHi)[1]; @@ -846,7 +846,7 @@ u8 NetPlayClient::LocalWiimoteToInGameWiimote(u8 local_pad) // called from ---CPU--- thread // Actual Core function which is called on every frame -bool CSIDevice_GCController::NetPlay_GetInput(u8 numPAD, SPADStatus PadStatus, u32 *PADStatus) +bool CSIDevice_GCController::NetPlay_GetInput(u8 numPAD, GCPadStatus PadStatus, u32 *PADStatus) { std::lock_guard lk(crit_netplay_client); @@ -866,12 +866,12 @@ bool WiimoteEmu::Wiimote::NetPlay_GetWiimoteData(int wiimote, u8* data, u8 size) return false; } -bool CSIDevice_GCSteeringWheel::NetPlay_GetInput(u8 numPAD, SPADStatus PadStatus, u32 *PADStatus) +bool CSIDevice_GCSteeringWheel::NetPlay_GetInput(u8 numPAD, GCPadStatus PadStatus, u32 *PADStatus) { return CSIDevice_GCController::NetPlay_GetInput(numPAD, PadStatus, PADStatus); } -bool CSIDevice_DanceMat::NetPlay_GetInput(u8 numPAD, SPADStatus PadStatus, u32 *PADStatus) +bool CSIDevice_DanceMat::NetPlay_GetInput(u8 numPAD, GCPadStatus PadStatus, u32 *PADStatus) { return CSIDevice_GCController::NetPlay_GetInput(numPAD, PadStatus, PADStatus); } diff --git a/Source/Core/Core/NetPlayClient.h b/Source/Core/Core/NetPlayClient.h index 81562dea4d..8a56ae983c 100644 --- a/Source/Core/Core/NetPlayClient.h +++ b/Source/Core/Core/NetPlayClient.h @@ -25,7 +25,7 @@ class NetPad { public: NetPad(); - NetPad(const SPADStatus* const); + NetPad(const GCPadStatus* const); u32 nHi; u32 nLo; @@ -78,7 +78,7 @@ public: // Send and receive pads values bool WiimoteUpdate(int _number, u8* data, const u8 size); - bool GetNetPads(const u8 pad_nb, const SPADStatus* const, NetPad* const netvalues); + bool GetNetPads(const u8 pad_nb, const GCPadStatus* const, NetPad* const netvalues); u8 LocalPadToInGamePad(u8 localPad); u8 InGamePadToLocalPad(u8 localPad); diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 32fa469034..5ef06153c8 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -922,7 +922,7 @@ void OnStoppedCallback() } } -void TASManipFunction(SPADStatus *PadStatus, int controllerID) +void TASManipFunction(GCPadStatus* PadStatus, int controllerID) { if (main_frame) main_frame->g_TASInputDlg[controllerID]->GetValues(PadStatus, controllerID); diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h index 27f88690c9..9811e43148 100644 --- a/Source/Core/DolphinWX/Frame.h +++ b/Source/Core/DolphinWX/Frame.h @@ -358,5 +358,5 @@ void OnAfterLoadCallback(); void OnStoppedCallback(); // For TASInputDlg -void TASManipFunction(SPADStatus *PadStatus, int controllerID); +void TASManipFunction(GCPadStatus* PadStatus, int controllerID); bool TASInputHasFocus(); diff --git a/Source/Core/DolphinWX/TASInputDlg.cpp b/Source/Core/DolphinWX/TASInputDlg.cpp index fdd7635e4a..7db1c55822 100644 --- a/Source/Core/DolphinWX/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/TASInputDlg.cpp @@ -242,7 +242,7 @@ void TASInputDlg::ResetValues() wx_start_button->SetValue(false); } -void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus) +void TASInputDlg::GetKeyBoardInput(GCPadStatus* PadStatus) { if (PadStatus->stickX != 128) { @@ -471,7 +471,7 @@ void TASInputDlg::SetLandRTriggers() rTrig = wx_r_s->GetValue(); } -void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID) +void TASInputDlg::GetValues(GCPadStatus* PadStatus, int controllerID) { if (!IsShown()) return; diff --git a/Source/Core/DolphinWX/TASInputDlg.h b/Source/Core/DolphinWX/TASInputDlg.h index d06c3ecab7..5ac3b290d9 100644 --- a/Source/Core/DolphinWX/TASInputDlg.h +++ b/Source/Core/DolphinWX/TASInputDlg.h @@ -39,11 +39,11 @@ class TASInputDlg : public wxDialog void OnMouseDownL(wxMouseEvent& event); void OnMouseUpR(wxMouseEvent& event); void ResetValues(); - void GetValues(SPADStatus *PadStatus, int controllerID); + void GetValues(GCPadStatus* PadStatus, int controllerID); void SetTurbo(wxMouseEvent& event); void SetTurboFalse(wxMouseEvent& event); void ButtonTurbo(); - void GetKeyBoardInput(SPADStatus *PadStatus); + void GetKeyBoardInput(GCPadStatus* PadStatus); bool TextBoxHasFocus(); void SetLandRTriggers(); bool TASHasFocus(); diff --git a/Source/Core/InputCommon/GCPadStatus.h b/Source/Core/InputCommon/GCPadStatus.h index 73d63a902f..29a3f02937 100644 --- a/Source/Core/InputCommon/GCPadStatus.h +++ b/Source/Core/InputCommon/GCPadStatus.h @@ -24,7 +24,7 @@ #define PAD_BUTTON_Y 0x0800 #define PAD_BUTTON_START 0x1000 -typedef struct +struct GCPadStatus { unsigned short button; // Or-ed PAD_BUTTON_* and PAD_TRIGGER_* bits unsigned char stickX; // 0 <= stickX <= 255 @@ -36,4 +36,4 @@ typedef struct unsigned char analogA; // 0 <= analogA <= 255 unsigned char analogB; // 0 <= analogB <= 255 signed char err; // one of PAD_ERR_* number -} SPADStatus; +};