diff --git a/core/hw/pvr/Renderer_if.cpp b/core/hw/pvr/Renderer_if.cpp index 223fe4027..5af14df8c 100644 --- a/core/hw/pvr/Renderer_if.cpp +++ b/core/hw/pvr/Renderer_if.cpp @@ -506,6 +506,10 @@ void rend_term() if (fLogFrames) fclose(fLogFrames); + +#if !defined(TARGET_NO_THREADS) + rthd.WaitToEnd(); +#endif } void rend_vblank() diff --git a/core/rec-x86/rec_lin86_asm.S b/core/rec-x86/rec_lin86_asm.S index 2a2df3479..d57ce3c5b 100644 --- a/core/rec-x86/rec_lin86_asm.S +++ b/core/rec-x86/rec_lin86_asm.S @@ -120,8 +120,10 @@ do_iter: pop ecx call rdv_DoInterrupts mov ecx,eax -# cmp byte ptr [sh4_int_bCpuRun],0 -# jz cleanup + mov edx,[p_sh4rcb]; + add edx,[cpurun_offset]; + cmp dword ptr [edx],0; + jz cleanup; jmp no_update cleanup: diff --git a/core/rec-x86/rec_x86_asm.cpp b/core/rec-x86/rec_x86_asm.cpp index d2e479ef2..a780b94b4 100644 --- a/core/rec-x86/rec_x86_asm.cpp +++ b/core/rec-x86/rec_x86_asm.cpp @@ -132,6 +132,7 @@ naked void DYNACALL ngen_blockcheckfail2(u32 addr) } #else u32 gas_offs=offsetof(Sh4RCB,cntx.jdyn); + u32 cpurun_offset=offsetof(Sh4RCB,cntx.CpuRunning); void (*ngen_FailedToFindBlock)()=&ngen_FailedToFindBlock_; #endif #endif