DolphinQt: Reduce latency of TAS input's controller input passthrough

Fixes https://bugs.dolphin-emu.org/issues/12676.

Needs testing to see if this impacts performance when controller
inputs are changing.
This commit is contained in:
JosJuice
2021-09-19 17:08:10 +02:00
parent ca064b55fe
commit 1a5e0c2084
2 changed files with 16 additions and 4 deletions

View File

@ -17,3 +17,11 @@ static void QueueOnObject(T* obj, F&& func)
QObject src;
QObject::connect(&src, &QObject::destroyed, obj, std::forward<F>(func), Qt::QueuedConnection);
}
template <typename T, typename F>
static void QueueOnObjectBlocking(T* obj, F&& func)
{
QObject src;
QObject::connect(&src, &QObject::destroyed, obj, std::forward<F>(func),
Qt::BlockingQueuedConnection);
}