mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 05:38:50 +00:00
Rewrite NetPlayClient input wait logic to use std::condition_variable's
Instead of sleeping in NetPlayClient::GetNetPads and NetPlayClient::WiimoteUpdate, now use std::condition_variable. This allows for finer control over these blocking areas.
This commit is contained in:
parent
d7de39ebbe
commit
1760b3bdad
2 changed files with 39 additions and 14 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <thread>
|
||||
#include <vector>
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/FifoQueue.h"
|
||||
#include "Common/TraversalClient.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
|
@ -175,6 +176,8 @@ private:
|
|||
TraversalClient* m_traversal_client = nullptr;
|
||||
std::thread m_MD5_thread;
|
||||
bool m_should_compute_MD5 = false;
|
||||
Common::Event m_gc_pad_event;
|
||||
Common::Event m_wii_pad_event;
|
||||
|
||||
u32 m_timebase_frame = 0;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue