GPUThread: Fix input OSD with threaded rendering off
This commit is contained in:
parent
f6f709bcc5
commit
074a8a2653
|
@ -1013,6 +1013,19 @@ std::pair<GPUThreadCommand*, void*> GPUThread::BeginASyncBufferCall(AsyncBufferC
|
|||
return std::make_pair(static_cast<GPUThreadCommand*>(cmd), buffer);
|
||||
}
|
||||
|
||||
void GPUThread::EndASyncBufferCall(GPUThreadCommand* cmd)
|
||||
{
|
||||
if (!s_state.use_gpu_thread) [[unlikely]]
|
||||
{
|
||||
GPUThreadAsyncCallCommand* const acmd = static_cast<GPUThreadAsyncCallCommand*>(cmd);
|
||||
acmd->func();
|
||||
acmd->~GPUThreadAsyncCallCommand();
|
||||
return;
|
||||
}
|
||||
|
||||
PushCommand(cmd);
|
||||
}
|
||||
|
||||
void GPUThread::UpdateSettings(bool gpu_settings_changed, bool device_settings_changed)
|
||||
{
|
||||
if (device_settings_changed)
|
||||
|
|
|
@ -73,6 +73,7 @@ bool IsUsingThread();
|
|||
void RunOnThread(AsyncCallType func);
|
||||
void RunOnBackend(AsyncBackendCallType func, bool sync, bool spin_or_wake);
|
||||
std::pair<GPUThreadCommand*, void*> BeginASyncBufferCall(AsyncBufferCallType func, u32 buffer_size);
|
||||
void EndASyncBufferCall(GPUThreadCommand* cmd);
|
||||
void SetVSync(GPUVSyncMode mode, bool allow_present_throttle);
|
||||
|
||||
// Should only be called on the GPU thread.
|
||||
|
|
|
@ -729,7 +729,7 @@ void ImGuiManager::UpdateInputOverlay()
|
|||
}
|
||||
}
|
||||
|
||||
GPUThread::PushCommand(cmd);
|
||||
GPUThread::EndASyncBufferCall(cmd);
|
||||
}
|
||||
|
||||
void ImGuiManager::UpdateInputOverlay(void* buffer)
|
||||
|
|
Loading…
Reference in New Issue