WiimoteScannerDarwin: Fix lint
This commit is contained in:
parent
b494d109d4
commit
156ffef98c
|
@ -46,8 +46,8 @@ public:
|
|||
~WiimoteScannerLinux() override;
|
||||
bool IsReady() const override;
|
||||
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
|
||||
void Update() override {} // not needed on Linux
|
||||
void RequestStopSearching() override {} // not needed on Linux
|
||||
void Update() override {} // not needed on Linux
|
||||
void RequestStopSearching() override {} // not needed on Linux
|
||||
private:
|
||||
int m_device_id;
|
||||
int m_device_sock;
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
|
||||
void Update() override {} // not needed
|
||||
void RequestStopSearching() override { m_stop_scanning = true; }
|
||||
|
||||
private:
|
||||
IOBluetoothHostController* m_host_controller;
|
||||
bool m_stop_scanning = false;
|
||||
|
|
|
@ -27,13 +27,13 @@ WiimoteScannerDarwin::WiimoteScannerDarwin()
|
|||
if (![m_host_controller addressAsString])
|
||||
{
|
||||
WARN_LOG_FMT(WIIMOTE, "No Bluetooth host controller");
|
||||
|
||||
|
||||
[m_host_controller release];
|
||||
m_host_controller = nil;
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
[m_host_controller retain];
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ WiimoteScannerDarwin::~WiimoteScannerDarwin()
|
|||
{
|
||||
[m_host_controller release];
|
||||
m_host_controller = nil;
|
||||
|
||||
|
||||
m_stop_scanning = true;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ void WiimoteScannerDarwin::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
IOBluetoothDeviceInquiry* bti;
|
||||
found_board = nullptr;
|
||||
|
||||
|
@ -66,7 +66,7 @@ void WiimoteScannerDarwin::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
|
|||
{
|
||||
ERROR_LOG_FMT(WIIMOTE, "Unable to do Bluetooth discovery");
|
||||
[sbt release];
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ void WiimoteScannerDarwin::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
|
|||
found_wiimotes.push_back(wm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[bti release];
|
||||
[sbt release];
|
||||
}
|
||||
|
|
|
@ -38,8 +38,8 @@ public:
|
|||
~WiimoteScannerHidapi();
|
||||
bool IsReady() const override;
|
||||
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
|
||||
void Update() override {} // not needed for hidapi
|
||||
void RequestStopSearching() override {} // not needed for hidapi
|
||||
void Update() override {} // not needed for hidapi
|
||||
void RequestStopSearching() override {} // not needed for hidapi
|
||||
};
|
||||
} // namespace WiimoteReal
|
||||
|
||||
|
|
|
@ -545,12 +545,12 @@ void WiimoteScanner::StopThread()
|
|||
if (m_scan_thread_running.TestAndClear())
|
||||
{
|
||||
SetScanMode(WiimoteScanMode::DO_NOT_SCAN);
|
||||
|
||||
|
||||
for (const auto& backend : m_backends)
|
||||
{
|
||||
backend->RequestStopSearching();
|
||||
}
|
||||
|
||||
|
||||
m_scan_thread.join();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue