WiimoteEmu: Don't check extension button press for wii remote reconnection. A real remote doesn't. We won't either.
This commit is contained in:
parent
b5d97561be
commit
bdfb320b3d
|
@ -153,16 +153,6 @@ void Classic::Update()
|
||||||
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = classic_data;
|
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = classic_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Classic::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
u16 buttons = 0;
|
|
||||||
std::array<ControlState, 2> trigs{};
|
|
||||||
m_buttons->GetState(&buttons, classic_button_bitmasks.data());
|
|
||||||
m_dpad->GetState(&buttons, classic_dpad_bitmasks.data());
|
|
||||||
m_triggers->GetState(&buttons, classic_trigger_bitmasks.data(), trigs.data());
|
|
||||||
return buttons != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Classic::Reset()
|
void Classic::Reset()
|
||||||
{
|
{
|
||||||
EncryptedExtension::Reset();
|
EncryptedExtension::Reset();
|
||||||
|
|
|
@ -180,7 +180,6 @@ public:
|
||||||
Classic();
|
Classic();
|
||||||
|
|
||||||
void Update() override;
|
void Update() override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
|
|
||||||
ControllerEmu::ControlGroup* GetGroup(ClassicGroup group);
|
ControllerEmu::ControlGroup* GetGroup(ClassicGroup group);
|
||||||
|
|
|
@ -92,12 +92,6 @@ void DrawsomeTablet::Reset()
|
||||||
m_reg.calibration.fill(0xff);
|
m_reg.calibration.fill(0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DrawsomeTablet::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
// Device has no buttons.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ControllerEmu::ControlGroup* DrawsomeTablet::GetGroup(DrawsomeTabletGroup group)
|
ControllerEmu::ControlGroup* DrawsomeTablet::GetGroup(DrawsomeTabletGroup group)
|
||||||
{
|
{
|
||||||
switch (group)
|
switch (group)
|
||||||
|
|
|
@ -29,7 +29,6 @@ public:
|
||||||
DrawsomeTablet();
|
DrawsomeTablet();
|
||||||
|
|
||||||
void Update() override;
|
void Update() override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
|
|
||||||
ControllerEmu::ControlGroup* GetGroup(DrawsomeTabletGroup group);
|
ControllerEmu::ControlGroup* GetGroup(DrawsomeTabletGroup group);
|
||||||
|
|
|
@ -165,17 +165,6 @@ void Drums::Update()
|
||||||
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = drum_data;
|
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = drum_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Drums::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
u8 buttons = 0;
|
|
||||||
m_buttons->GetState(&buttons, drum_button_bitmasks.data());
|
|
||||||
|
|
||||||
u8 pads = 0;
|
|
||||||
m_pads->GetState(&pads, drum_pad_bitmasks.data());
|
|
||||||
|
|
||||||
return buttons != 0 || pads != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Drums::Reset()
|
void Drums::Reset()
|
||||||
{
|
{
|
||||||
EncryptedExtension::Reset();
|
EncryptedExtension::Reset();
|
||||||
|
|
|
@ -79,7 +79,6 @@ public:
|
||||||
Drums();
|
Drums();
|
||||||
|
|
||||||
void Update() override;
|
void Update() override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
|
|
||||||
ControllerEmu::ControlGroup* GetGroup(DrumsGroup group);
|
ControllerEmu::ControlGroup* GetGroup(DrumsGroup group);
|
||||||
|
|
|
@ -49,11 +49,6 @@ void None::Update()
|
||||||
// Nothing needed.
|
// Nothing needed.
|
||||||
}
|
}
|
||||||
|
|
||||||
bool None::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void None::Reset()
|
void None::Reset()
|
||||||
{
|
{
|
||||||
// Nothing needed.
|
// Nothing needed.
|
||||||
|
|
|
@ -31,7 +31,6 @@ public:
|
||||||
// but M+ does some tricks with it during activation.
|
// but M+ does some tricks with it during activation.
|
||||||
virtual bool ReadDeviceDetectPin() const = 0;
|
virtual bool ReadDeviceDetectPin() const = 0;
|
||||||
|
|
||||||
virtual bool IsButtonPressed() const = 0;
|
|
||||||
virtual void Reset() = 0;
|
virtual void Reset() = 0;
|
||||||
virtual void DoState(PointerWrap& p) = 0;
|
virtual void DoState(PointerWrap& p) = 0;
|
||||||
virtual void Update() = 0;
|
virtual void Update() = 0;
|
||||||
|
@ -49,7 +48,6 @@ public:
|
||||||
private:
|
private:
|
||||||
bool ReadDeviceDetectPin() const override;
|
bool ReadDeviceDetectPin() const override;
|
||||||
void Update() override;
|
void Update() override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
void DoState(PointerWrap& p) override;
|
void DoState(PointerWrap& p) override;
|
||||||
|
|
||||||
|
|
|
@ -138,15 +138,6 @@ void Guitar::Update()
|
||||||
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = guitar_data;
|
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = guitar_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Guitar::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
u16 buttons = 0;
|
|
||||||
m_buttons->GetState(&buttons, guitar_button_bitmasks.data());
|
|
||||||
m_frets->GetState(&buttons, guitar_fret_bitmasks.data());
|
|
||||||
m_strum->GetState(&buttons, guitar_strum_bitmasks.data());
|
|
||||||
return buttons != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Guitar::Reset()
|
void Guitar::Reset()
|
||||||
{
|
{
|
||||||
EncryptedExtension::Reset();
|
EncryptedExtension::Reset();
|
||||||
|
|
|
@ -52,7 +52,6 @@ public:
|
||||||
Guitar();
|
Guitar();
|
||||||
|
|
||||||
void Update() override;
|
void Update() override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
|
|
||||||
ControllerEmu::ControlGroup* GetGroup(GuitarGroup group);
|
ControllerEmu::ControlGroup* GetGroup(GuitarGroup group);
|
||||||
|
|
|
@ -114,13 +114,6 @@ void Nunchuk::Update()
|
||||||
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = nc_data;
|
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = nc_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Nunchuk::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
u8 buttons = 0;
|
|
||||||
m_buttons->GetState(&buttons, nunchuk_button_bitmasks.data());
|
|
||||||
return buttons != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Nunchuk::Reset()
|
void Nunchuk::Reset()
|
||||||
{
|
{
|
||||||
EncryptedExtension::Reset();
|
EncryptedExtension::Reset();
|
||||||
|
|
|
@ -151,7 +151,6 @@ public:
|
||||||
Nunchuk();
|
Nunchuk();
|
||||||
|
|
||||||
void Update() override;
|
void Update() override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
void DoState(PointerWrap& p) override;
|
void DoState(PointerWrap& p) override;
|
||||||
|
|
||||||
|
|
|
@ -62,14 +62,6 @@ void TaTaCon::Update()
|
||||||
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = tatacon_data;
|
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = tatacon_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TaTaCon::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
u8 state = 0;
|
|
||||||
m_center->GetState(&state, center_bitmasks.data());
|
|
||||||
m_rim->GetState(&state, rim_bitmasks.data());
|
|
||||||
return state != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void TaTaCon::Reset()
|
void TaTaCon::Reset()
|
||||||
{
|
{
|
||||||
m_reg = {};
|
m_reg = {};
|
||||||
|
|
|
@ -33,7 +33,6 @@ public:
|
||||||
TaTaCon();
|
TaTaCon();
|
||||||
|
|
||||||
void Update() override;
|
void Update() override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
|
|
||||||
ControllerEmu::ControlGroup* GetGroup(TaTaConGroup group);
|
ControllerEmu::ControlGroup* GetGroup(TaTaConGroup group);
|
||||||
|
|
|
@ -137,13 +137,6 @@ void Turntable::Update()
|
||||||
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = tt_data;
|
Common::BitCastPtr<DataFormat>(&m_reg.controller_data) = tt_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Turntable::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
u16 buttons = 0;
|
|
||||||
m_buttons->GetState(&buttons, turntable_button_bitmasks.data());
|
|
||||||
return buttons != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Turntable::Reset()
|
void Turntable::Reset()
|
||||||
{
|
{
|
||||||
EncryptedExtension::Reset();
|
EncryptedExtension::Reset();
|
||||||
|
|
|
@ -58,7 +58,6 @@ public:
|
||||||
Turntable();
|
Turntable();
|
||||||
|
|
||||||
void Update() override;
|
void Update() override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
|
|
||||||
ControllerEmu::ControlGroup* GetGroup(TurntableGroup group);
|
ControllerEmu::ControlGroup* GetGroup(TurntableGroup group);
|
||||||
|
|
|
@ -119,13 +119,6 @@ void UDrawTablet::Reset()
|
||||||
m_reg.calibration.fill(0xff);
|
m_reg.calibration.fill(0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UDrawTablet::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
u8 buttons = 0;
|
|
||||||
m_buttons->GetState(&buttons, udraw_tablet_button_bitmasks.data());
|
|
||||||
return buttons != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ControllerEmu::ControlGroup* UDrawTablet::GetGroup(UDrawTabletGroup group)
|
ControllerEmu::ControlGroup* UDrawTablet::GetGroup(UDrawTabletGroup group)
|
||||||
{
|
{
|
||||||
switch (group)
|
switch (group)
|
||||||
|
|
|
@ -29,7 +29,6 @@ public:
|
||||||
UDrawTablet();
|
UDrawTablet();
|
||||||
|
|
||||||
void Update() override;
|
void Update() override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
|
|
||||||
ControllerEmu::ControlGroup* GetGroup(UDrawTabletGroup group);
|
ControllerEmu::ControlGroup* GetGroup(UDrawTabletGroup group);
|
||||||
|
|
|
@ -388,11 +388,6 @@ bool MotionPlus::ReadDeviceDetectPin() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MotionPlus::IsButtonPressed() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MotionPlus::Update()
|
void MotionPlus::Update()
|
||||||
{
|
{
|
||||||
if (m_progress_timer)
|
if (m_progress_timer)
|
||||||
|
|
|
@ -230,7 +230,6 @@ private:
|
||||||
int BusWrite(u8 slave_addr, u8 addr, int count, const u8* data_in) override;
|
int BusWrite(u8 slave_addr, u8 addr, int count, const u8* data_in) override;
|
||||||
|
|
||||||
bool ReadDeviceDetectPin() const override;
|
bool ReadDeviceDetectPin() const override;
|
||||||
bool IsButtonPressed() const override;
|
|
||||||
|
|
||||||
Register m_reg_data = {};
|
Register m_reg_data = {};
|
||||||
|
|
||||||
|
|
|
@ -673,7 +673,7 @@ bool Wiimote::CheckForButtonPress()
|
||||||
m_buttons->GetState(&buttons, button_bitmasks);
|
m_buttons->GetState(&buttons, button_bitmasks);
|
||||||
m_dpad->GetState(&buttons, dpad_bitmasks);
|
m_dpad->GetState(&buttons, dpad_bitmasks);
|
||||||
|
|
||||||
return (buttons != 0 || GetActiveExtension()->IsButtonPressed());
|
return buttons != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wiimote::LoadDefaults(const ControllerInterface& ciface)
|
void Wiimote::LoadDefaults(const ControllerInterface& ciface)
|
||||||
|
|
Loading…
Reference in New Issue