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