mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-03 22:58:50 +00:00
HW/Wiimote: Don't reconnect wiimotes on ChangeWiimoteSource when the source hasn't actually changed.
This commit is contained in:
parent
0e1669e1c7
commit
159d2b1cc3
1 changed files with 8 additions and 1 deletions
|
@ -768,6 +768,13 @@ void Pause()
|
||||||
void ChangeWiimoteSource(unsigned int index, int source)
|
void ChangeWiimoteSource(unsigned int index, int source)
|
||||||
{
|
{
|
||||||
const int previous_source = g_wiimote_sources[index];
|
const int previous_source = g_wiimote_sources[index];
|
||||||
|
|
||||||
|
if (previous_source == source)
|
||||||
|
{
|
||||||
|
// No change. Do nothing.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
g_wiimote_sources[index] = source;
|
g_wiimote_sources[index] = source;
|
||||||
{
|
{
|
||||||
// kill real connection (or swap to different slot)
|
// 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;
|
return s_known_ids.count(identifier) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // end of namespace
|
}; // namespace WiimoteReal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue