diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-03-14 03:34:52 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-03-14 03:34:52 -0400 |
| commit | 890f799fdde651f3fbfc08568a968352e180e729 (patch) | |
| tree | 03f9f299ee14a5cfd256b3d1cfee26716946c32b /Source | |
| parent | ef931d5339e63463111699e90047b082497fb56b (diff) | |
SI_DeviceGCController: In-class initialize variables
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/HW/SI/SI_DeviceGCController.cpp | 7 | ||||
| -rw-r--r-- | Source/Core/Core/HW/SI/SI_DeviceGCController.h | 14 |
2 files changed, 9 insertions, 12 deletions
diff --git a/Source/Core/Core/HW/SI/SI_DeviceGCController.cpp b/Source/Core/Core/HW/SI/SI_DeviceGCController.cpp index 40f1dad790..33436845b0 100644 --- a/Source/Core/Core/HW/SI/SI_DeviceGCController.cpp +++ b/Source/Core/Core/HW/SI/SI_DeviceGCController.cpp @@ -19,13 +19,8 @@ // --- standard GameCube controller --- CSIDevice_GCController::CSIDevice_GCController(SIDevices device, int _iDeviceNumber) - : ISIDevice(device, _iDeviceNumber), m_TButtonComboStart(0), m_TButtonCombo(0), - m_LastButtonCombo(COMBO_NONE) + : ISIDevice(device, _iDeviceNumber) { - // Dunno if we need to do this, game/lib should set it? - m_Mode = 0x03; - - m_Calibrated = false; } void CSIDevice_GCController::Calibrate() diff --git a/Source/Core/Core/HW/SI/SI_DeviceGCController.h b/Source/Core/Core/HW/SI/SI_DeviceGCController.h index 7e87bca51b..0a73031a7e 100644 --- a/Source/Core/Core/HW/SI/SI_DeviceGCController.h +++ b/Source/Core/Core/HW/SI/SI_DeviceGCController.h @@ -43,7 +43,7 @@ protected: union UCommand { - u32 Hex; + u32 Hex = 0; struct { u32 Parameter1 : 8; @@ -51,7 +51,7 @@ protected: u32 Command : 8; u32 : 8; }; - UCommand() { Hex = 0; } + UCommand() = default; UCommand(u32 _iValue) { Hex = _iValue; } }; @@ -66,18 +66,20 @@ protected: // Set on connection and (standard pad only) on button combo SOrigin m_Origin; - bool m_Calibrated; + bool m_Calibrated = false; // PADAnalogMode - u8 m_Mode; + // Dunno if we need to do this, game/lib should set it? + u8 m_Mode = 0x3; // Timer to track special button combos: // y, X, start for 3 seconds updates origin with current status // Technically, the above is only on standard pad, wavebird does not support it for example // b, x, start for 3 seconds triggers reset (PI reset button interrupt) - u64 m_TButtonComboStart, m_TButtonCombo; + u64 m_TButtonComboStart = 0; + u64 m_TButtonCombo = 0; // Type of button combo from the last/current poll - EButtonCombo m_LastButtonCombo; + EButtonCombo m_LastButtonCombo = COMBO_NONE; // Set this if we want to simulate the "TaruKonga" DK Bongo controller bool m_simulate_konga = false; |
