Merge pull request #8548 from jordan-woyak/wiimote-source-cleanup

Core/WiimoteReal: Wii remote connection pool and source change cleanup.
This commit is contained in:
Tilka
2020-01-25 23:04:50 +00:00
committed by GitHub
11 changed files with 181 additions and 105 deletions

View File

@ -115,6 +115,8 @@
#if defined(HAVE_XRANDR) && HAVE_XRANDR
#include "UICommon/X11Utils.h"
// This #define within X11/X.h conflicts with our WiimoteSource enum.
#undef None
#endif
#if defined(__unix__) || defined(__unix) || defined(__APPLE__)
@ -1593,7 +1595,7 @@ void MainWindow::OnStartRecording()
if (SerialInterface::SIDevice_IsGCController(SConfig::GetInstance().m_SIDevice[i]))
controllers |= (1 << i);
if (g_wiimote_sources[i] != WIIMOTE_SRC_NONE)
if (WiimoteCommon::GetSource(i) != WiimoteSource::None)
controllers |= (1 << (i + 4));
}
@ -1660,7 +1662,7 @@ void MainWindow::ShowTASInput()
for (int i = 0; i < num_wii_controllers; i++)
{
if (g_wiimote_sources[i] == WIIMOTE_SRC_EMU &&
if (WiimoteCommon::GetSource(i) == WiimoteSource::Emulated &&
(!Core::IsRunning() || SConfig::GetInstance().bWii))
{
m_wii_tas_input_windows[i]->show();