mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
Merge pull request #2835 from degasus/master
Wiimotes: Initialize all atomic<bool> globally.
This commit is contained in:
parent
d431525292
commit
6911e2470a
@ -36,8 +36,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
WiimoteScanner::WiimoteScanner()
|
WiimoteScanner::WiimoteScanner()
|
||||||
: m_want_wiimotes()
|
: device_id(-1)
|
||||||
, device_id(-1)
|
|
||||||
, device_sock(-1)
|
, device_sock(-1)
|
||||||
{
|
{
|
||||||
// Get the id of the first Bluetooth device.
|
// Get the id of the first Bluetooth device.
|
||||||
|
@ -220,8 +220,6 @@ void RemoveWiimote(BLUETOOTH_DEVICE_INFO_STRUCT&);
|
|||||||
bool ForgetWiimote(BLUETOOTH_DEVICE_INFO_STRUCT&);
|
bool ForgetWiimote(BLUETOOTH_DEVICE_INFO_STRUCT&);
|
||||||
|
|
||||||
WiimoteScanner::WiimoteScanner()
|
WiimoteScanner::WiimoteScanner()
|
||||||
: m_run_thread()
|
|
||||||
, m_want_wiimotes()
|
|
||||||
{
|
{
|
||||||
init_lib();
|
init_lib();
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
WiimoteScanner::WiimoteScanner()
|
WiimoteScanner::WiimoteScanner()
|
||||||
: m_run_thread()
|
|
||||||
, m_want_wiimotes()
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
WiimoteScanner::~WiimoteScanner()
|
WiimoteScanner::~WiimoteScanner()
|
||||||
|
@ -42,7 +42,6 @@ Wiimote::Wiimote()
|
|||||||
, m_last_input_report()
|
, m_last_input_report()
|
||||||
, m_channel(0)
|
, m_channel(0)
|
||||||
, m_rumble_state()
|
, m_rumble_state()
|
||||||
, m_need_prepare()
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void Wiimote::Shutdown()
|
void Wiimote::Shutdown()
|
||||||
|
@ -97,11 +97,11 @@ private:
|
|||||||
|
|
||||||
std::thread m_wiimote_thread;
|
std::thread m_wiimote_thread;
|
||||||
// Whether to keep running the thread.
|
// Whether to keep running the thread.
|
||||||
std::atomic<bool> m_run_thread;
|
std::atomic<bool> m_run_thread {false};
|
||||||
// Whether to call PrepareOnThread.
|
// Whether to call PrepareOnThread.
|
||||||
std::atomic<bool> m_need_prepare;
|
std::atomic<bool> m_need_prepare {false};
|
||||||
// Whether the thread has finished ConnectInternal.
|
// Whether the thread has finished ConnectInternal.
|
||||||
std::atomic<bool> m_thread_ready;
|
std::atomic<bool> m_thread_ready {false};
|
||||||
std::mutex m_thread_ready_mutex;
|
std::mutex m_thread_ready_mutex;
|
||||||
std::condition_variable m_thread_ready_cond;
|
std::condition_variable m_thread_ready_cond;
|
||||||
|
|
||||||
@ -135,9 +135,9 @@ private:
|
|||||||
|
|
||||||
std::thread m_scan_thread;
|
std::thread m_scan_thread;
|
||||||
|
|
||||||
std::atomic<bool> m_run_thread;
|
std::atomic<bool> m_run_thread {false};
|
||||||
std::atomic<bool> m_want_wiimotes;
|
std::atomic<bool> m_want_wiimotes {false};
|
||||||
std::atomic<bool> m_want_bb;
|
std::atomic<bool> m_want_bb {false};
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
void CheckDeviceType(std::basic_string<TCHAR> &devicepath, bool &real_wiimote, bool &is_bb);
|
void CheckDeviceType(std::basic_string<TCHAR> &devicepath, bool &real_wiimote, bool &is_bb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user