Core: Let any thread call previously host-thread-only functions
By letting threads other than the host thread use things like CPUThreadGuard, we can do a significant cleanup in AchievementsManager in a later commit of this pull request. Note: Some functions still can't be called from the CPU thread (or threads the CPU thread might block on, like the GPU thread), but can be called from any other thread.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <QAbstractEventDispatcher>
|
||||
#include <QApplication>
|
||||
#include <QLocale>
|
||||
#include <QThread>
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
@@ -245,7 +246,8 @@ bool Host_TASInputHasFocus()
|
||||
|
||||
void Host_YieldToUI()
|
||||
{
|
||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
if (qApp->thread() == QThread::currentThread())
|
||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
}
|
||||
|
||||
void Host_UpdateDisasmDialog()
|
||||
|
||||
Reference in New Issue
Block a user