Qt: Fix ClearBindStateFromSource() executing on wrong thread

This commit is contained in:
Stenzek
2023-06-01 23:18:35 +10:00
parent af5f1c711c
commit 72f7225ec2
3 changed files with 13 additions and 1 deletions

View File

@ -1065,6 +1065,17 @@ void EmuThread::reloadPostProcessingShaders()
System::ReloadPostProcessingShaders();
}
void EmuThread::clearInputBindStateFromSource(InputBindingKey key)
{
if (!isOnThread())
{
QMetaObject::invokeMethod(this, "clearInputBindStateFromSource", Qt::QueuedConnection, Q_ARG(InputBindingKey, key));
return;
}
InputManager::ClearBindStateFromSource(key);
}
void EmuThread::runOnEmuThread(std::function<void()> callback)
{
callback();