diff --git a/rpcs3/Emu/Cell/Modules/sys_ppu_thread_.cpp b/rpcs3/Emu/Cell/Modules/sys_ppu_thread_.cpp index a774b1fc20..f69b818eeb 100644 --- a/rpcs3/Emu/Cell/Modules/sys_ppu_thread_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_ppu_thread_.cpp @@ -4,7 +4,6 @@ #include "Emu/IdManager.h" #include "Emu/Cell/lv2/sys_ppu_thread.h" -#include "Emu/Cell/lv2/sys_event.h" #include "sysPrxForUser.h" extern logs::channel sysPrxForUser; @@ -42,22 +41,6 @@ s32 sys_ppu_thread_create(ppu_thread& ppu, vm::ptr thread_id, u32 entry, u6 return res; } - // Dirty hack for sound: confirm the creation of _mxr000 event queue - if (threadname && std::memcmp(threadname.get_ptr(), "_cellsurMixerMain", 18) == 0) - { - lv2_obj::sleep(ppu); - - while (!idm::select([](u32, lv2_event_queue& eq) - { - return eq.name == "_mxr000\0"_u64; - })) - { - thread_ctrl::wait_for(50000); - } - - ppu.test_state(); - } - return CELL_OK; } diff --git a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp index 79c7cbd01d..27585ef4df 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp @@ -6,6 +6,7 @@ #include "Emu/Cell/ErrorCodes.h" #include "Emu/Cell/PPUThread.h" #include "sys_ppu_thread.h" +#include "sys_event.h" namespace vm { using namespace ps3; } @@ -352,6 +353,22 @@ error_code sys_ppu_thread_start(ppu_thread& ppu, u32 thread_id) else { thread->notify(); + + // Dirty hack for sound: confirm the creation of _mxr000 event queue + if (thread->m_name == "_cellsurMixerMain") + { + lv2_obj::sleep(ppu); + + while (!idm::select([](u32, lv2_event_queue& eq) + { + return eq.name == "_mxr000\0"_u64; + })) + { + thread_ctrl::wait_for(50000); + } + + ppu.test_state(); + } } return CELL_OK;