Input: UDP Client to provide motion and touch controls

An implementation of the cemuhook motion/touch protocol, this adds the
ability for users to connect several different devices to citra to send
direct motion and touch data to citra.

Co-Authored-By: jroweboy <jroweboy@gmail.com>
This commit is contained in:
fearlessTobi 2019-08-24 15:57:49 +02:00 committed by FearlessTobi
parent a167da4278
commit ac3690f205
14 changed files with 904 additions and 4 deletions

View file

@ -28,6 +28,15 @@ public:
is_set = false;
}
template <class Duration>
bool WaitFor(const std::chrono::duration<Duration>& time) {
std::unique_lock<std::mutex> lk(mutex);
if (!condvar.wait_for(lk, time, [this] { return is_set; }))
return false;
is_set = false;
return true;
}
template <class Clock, class Duration>
bool WaitUntil(const std::chrono::time_point<Clock, Duration>& time) {
std::unique_lock lk{mutex};