From 8c0a786918ea5c78bd3bf0aa0ff3e2a949d85aed Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 4 Jun 2022 12:04:57 +0200 Subject: [PATCH] cellAudioOutConfigure: don't return error on unsupported config Apparently the config simply isn't changed --- rpcs3/Emu/Cell/Modules/cellAudioOut.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellAudioOut.cpp b/rpcs3/Emu/Cell/Modules/cellAudioOut.cpp index 4e0d4b7019..a9cd0cbb32 100644 --- a/rpcs3/Emu/Cell/Modules/cellAudioOut.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAudioOut.cpp @@ -331,15 +331,12 @@ error_code cellAudioOutConfigure(u32 audioOut, vm::ptrchannel && mode.type == config->encoder && config->downMixer <= CELL_AUDIO_OUT_DOWNMIXER_TYPE_B; - })) + const bool found_mode = (out.sound_modes.cend() != std::find_if(out.sound_modes.cbegin(), out.sound_modes.cend(), [&config](const CellAudioOutSoundMode& mode) { - return CELL_AUDIO_OUT_ERROR_ILLEGAL_CONFIGURATION; // TODO: confirm - } + return mode.channel == config->channel && mode.type == config->encoder && config->downMixer <= CELL_AUDIO_OUT_DOWNMIXER_TYPE_B; + })); - if (out.channels != config->channel || out.encoder != config->encoder || out.downmixer != config->downMixer) + if (found_mode && (out.channels != config->channel || out.encoder != config->encoder || out.downmixer != config->downMixer)) { out.channels = config->channel; out.encoder = config->encoder;