Skip to content
Permalink
Browse files

HW/Wiimote: Don't reconnect wiimotes on ChangeWiimoteSource when the …

…source hasn't actually changed.
  • Loading branch information...
jordan-woyak committed Jan 29, 2019
1 parent 0e1669e commit 159d2b1cc332a3f2383efc4502289ff407362bf5
Showing with 8 additions and 1 deletion.
  1. +8 −1 Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp
@@ -768,6 +768,13 @@ void Pause()
void ChangeWiimoteSource(unsigned int index, int source)
{
const int previous_source = g_wiimote_sources[index];

if (previous_source == source)
{
// No change. Do nothing.
return;
}

g_wiimote_sources[index] = source;
{
// kill real connection (or swap to different slot)
@@ -919,4 +926,4 @@ bool IsNewWiimote(const std::string& identifier)
return s_known_ids.count(identifier) == 0;
}

}; // end of namespace
}; // namespace WiimoteReal

0 comments on commit 159d2b1

Please sign in to comment.
You can’t perform that action at this time.