From 81f8ece236a67e2ba9e2fc0ce73e8144dbbb379b Mon Sep 17 00:00:00 2001 From: Megamouse Date: Wed, 6 Apr 2022 23:15:23 +0200 Subject: [PATCH] cellSysutilAvc2InitParam: remove overzealous code. The function is intended as a constructor, so it doesn't make sense to check struct members --- rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp | 41 +++------------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp b/rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp index 1d5e116ddf..e3bad96060 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysutilAvc2.cpp @@ -424,6 +424,9 @@ error_code cellSysutilAvc2InitParam(u16 version, vm::ptravc_init_param_version = version; + switch (version) { case 100: @@ -431,45 +434,9 @@ error_code cellSysutilAvc2InitParam(u16 version, vm::ptravc_init_param_version = version; - - if (option->media_type == CELL_SYSUTIL_AVC2_VOICE_CHAT) - { - option->max_players = 16; - } - else if (option->media_type == CELL_SYSUTIL_AVC2_VIDEO_CHAT) - { - if (option->video_param.frame_mode == CELL_SYSUTIL_AVC2_FRAME_MODE_NORMAL) - { - option->max_players = 6; - } - else if (option->video_param.frame_mode == CELL_SYSUTIL_AVC2_FRAME_MODE_INTRA_ONLY) - { - option->max_players = 16; - } - else - { - cellSysutilAvc2.error("Unknown frame mode 0x%x", option->video_param.frame_mode); - } - } - else - { - cellSysutilAvc2.error("Unknown media type 0x%x", option->media_type); - } break; - } default: - { - return { CELL_AVC2_ERROR_INVALID_ARGUMENT, version }; - } + return CELL_AVC2_ERROR_INVALID_ARGUMENT; } return CELL_OK;