SI_DeviceGCController: In-class initialize variables
This commit is contained in:
parent
ef931d5339
commit
890f799fdd
|
@ -19,13 +19,8 @@
|
||||||
|
|
||||||
// --- standard GameCube controller ---
|
// --- standard GameCube controller ---
|
||||||
CSIDevice_GCController::CSIDevice_GCController(SIDevices device, int _iDeviceNumber)
|
CSIDevice_GCController::CSIDevice_GCController(SIDevices device, int _iDeviceNumber)
|
||||||
: ISIDevice(device, _iDeviceNumber), m_TButtonComboStart(0), m_TButtonCombo(0),
|
: ISIDevice(device, _iDeviceNumber)
|
||||||
m_LastButtonCombo(COMBO_NONE)
|
|
||||||
{
|
{
|
||||||
// Dunno if we need to do this, game/lib should set it?
|
|
||||||
m_Mode = 0x03;
|
|
||||||
|
|
||||||
m_Calibrated = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSIDevice_GCController::Calibrate()
|
void CSIDevice_GCController::Calibrate()
|
||||||
|
|
|
@ -43,7 +43,7 @@ protected:
|
||||||
|
|
||||||
union UCommand
|
union UCommand
|
||||||
{
|
{
|
||||||
u32 Hex;
|
u32 Hex = 0;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
u32 Parameter1 : 8;
|
u32 Parameter1 : 8;
|
||||||
|
@ -51,7 +51,7 @@ protected:
|
||||||
u32 Command : 8;
|
u32 Command : 8;
|
||||||
u32 : 8;
|
u32 : 8;
|
||||||
};
|
};
|
||||||
UCommand() { Hex = 0; }
|
UCommand() = default;
|
||||||
UCommand(u32 _iValue) { Hex = _iValue; }
|
UCommand(u32 _iValue) { Hex = _iValue; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,18 +66,20 @@ protected:
|
||||||
// Set on connection and (standard pad only) on button combo
|
// Set on connection and (standard pad only) on button combo
|
||||||
SOrigin m_Origin;
|
SOrigin m_Origin;
|
||||||
|
|
||||||
bool m_Calibrated;
|
bool m_Calibrated = false;
|
||||||
|
|
||||||
// PADAnalogMode
|
// 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:
|
// Timer to track special button combos:
|
||||||
// y, X, start for 3 seconds updates origin with current status
|
// 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
|
// 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)
|
// 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
|
// 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
|
// Set this if we want to simulate the "TaruKonga" DK Bongo controller
|
||||||
bool m_simulate_konga = false;
|
bool m_simulate_konga = false;
|
||||||
|
|
Loading…
Reference in New Issue