Skip to content

Commit

Permalink
HW/SI: GCAdapter calibration fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-woyak committed Mar 29, 2019
1 parent 9b6c925 commit a015851
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/Core/Core/HW/SI/SI_DeviceGCAdapter.cpp
Expand Up @@ -18,6 +18,9 @@ namespace SerialInterface
CSIDevice_GCAdapter::CSIDevice_GCAdapter(SIDevices device, int device_number)
: CSIDevice_GCController(device, device_number)
{
// Make sure PAD_GET_ORIGIN gets set due to a newly connected device.
GCAdapter::ResetDeviceType(m_device_number);

// get the correct pad number that should rumble locally when using netplay
const int pad_num = NetPlay_InGamePadToLocalPad(m_device_number);
if (pad_num < 4)
Expand Down
5 changes: 5 additions & 0 deletions Source/Core/InputCommon/GCAdapter.cpp
Expand Up @@ -485,6 +485,11 @@ bool DeviceConnected(int chan)
return s_controller_type[chan] != ControllerTypes::CONTROLLER_NONE;
}

void ResetDeviceType(int chan)
{
s_controller_type[chan] = ControllerTypes::CONTROLLER_NONE;
}

bool UseAdapter()
{
const auto& si_devices = SConfig::GetInstance().m_SIDevice;
Expand Down
1 change: 1 addition & 0 deletions Source/Core/InputCommon/GCAdapter.h
Expand Up @@ -29,6 +29,7 @@ void Output(int chan, u8 rumble_command);
bool IsDetected();
bool IsDriverDetected();
bool DeviceConnected(int chan);
void ResetDeviceType(int chan);
bool UseAdapter();

} // end of namespace GCAdapter
5 changes: 5 additions & 0 deletions Source/Core/InputCommon/GCAdapter_Android.cpp
Expand Up @@ -382,6 +382,11 @@ bool DeviceConnected(int chan)
return s_controller_type[chan] != ControllerTypes::CONTROLLER_NONE;
}

void ResetDeviceType(int chan)
{
s_controller_type[chan] = ControllerTypes::CONTROLLER_NONE;
}

bool UseAdapter()
{
const auto& si_devices = SConfig::GetInstance().m_SIDevice;
Expand Down

0 comments on commit a015851

Please sign in to comment.