diff --git a/src/core/video_thread.cpp b/src/core/video_thread.cpp index 242a47a4d..0a86e3dba 100644 --- a/src/core/video_thread.cpp +++ b/src/core/video_thread.cpp @@ -1151,6 +1151,8 @@ void VideoThread::UpdateSettingsOnThread(GPUSettings&& new_settings) void VideoThread::RunOnThread(AsyncCallType func) { + DebugAssert(!VideoThread::IsOnThread()); + if (!s_state.use_thread) [[unlikely]] { func(); @@ -1164,6 +1166,8 @@ void VideoThread::RunOnThread(AsyncCallType func) void VideoThread::RunOnThreadAndSync(AsyncCallType func) { + DebugAssert(!VideoThread::IsOnThread()); + if (!s_state.use_thread) [[unlikely]] { func(); @@ -1177,6 +1181,8 @@ void VideoThread::RunOnThreadAndSync(AsyncCallType func) std::pair VideoThread::BeginASyncBufferCall(AsyncBufferCallType func, u32 buffer_size) { + DebugAssert(!VideoThread::IsOnThread()); + // this is less than optimal, but it's only used for input osd updates currently, so whatever VideoThreadAsyncBufferCallCommand* const cmd = AllocateCommand( sizeof(VideoThreadAsyncBufferCallCommand) + buffer_size, VideoThreadCommandType::AsyncBufferCall, func); @@ -1186,6 +1192,8 @@ std::pair VideoThread::BeginASyncBufferCall(AsyncBuf void VideoThread::EndASyncBufferCall(VideoThreadCommand* cmd) { + DebugAssert(!VideoThread::IsOnThread()); + if (!s_state.use_thread) [[unlikely]] { VideoThreadAsyncBufferCallCommand* const acmd = static_cast(cmd);