From 70ace4bb83d26dce13f7997799658a6d2f6242a2 Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 26 Oct 2019 22:02:53 +0300 Subject: [PATCH] Fix cellAudioCreateNotifyEventQueue queue depth TODO: global sdk value used is set in cellAudioInit, which means sdk var value is 0 before it's initialization, currently safely set queue size to 8 in this case. --- rpcs3/Emu/Cell/Modules/cellAudio.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/cellAudio.cpp b/rpcs3/Emu/Cell/Modules/cellAudio.cpp index fcb6e05851..555585e43b 100644 --- a/rpcs3/Emu/Cell/Modules/cellAudio.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAudio.cpp @@ -1334,7 +1334,11 @@ static error_code AudioCreateNotifyEventQueue(vm::ptr id, vm::ptr key, // Create an event queue "bruteforcing" an available key const u64 key_value = 0x80004d494f323221ull + i; - if (CellError res{sys_event_queue_create(id, attr, key_value, 32) + 0u}) + // This originally reads from a global sdk value set by cellAudioInit + // So check initialization as well + const u32 queue_depth = g_fxo->get()->init && g_ps3_process_info.sdk_ver <= 0x35FFFF ? 2 : 8; + + if (CellError res{sys_event_queue_create(id, attr, key_value, queue_depth) + 0u}) { if (res != CELL_EEXIST) {