From fc2ef5529d1381e1239332ab5ee4c9cedfcbf6f2 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sun, 24 Dec 2017 15:47:36 +0100 Subject: [PATCH] Fix cellPadSetPortSetting (#3980) * Don't skip setting port settings when no controller is connected * DS4: fix error message --- rpcs3/Emu/Cell/Modules/cellPad.cpp | 5 +++-- rpcs3/ds4_pad_handler.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellPad.cpp b/rpcs3/Emu/Cell/Modules/cellPad.cpp index 000ec8f969..4c280113fb 100644 --- a/rpcs3/Emu/Cell/Modules/cellPad.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPad.cpp @@ -524,12 +524,13 @@ s32 cellPadSetPortSetting(u32 port_no, u32 port_setting) if (port_no >= rinfo.max_connect) return CELL_PAD_ERROR_INVALID_PARAMETER; - if (port_no >= rinfo.now_connect) - return CELL_PAD_ERROR_NO_DEVICE; auto& pads = handler->GetPads(); pads[port_no]->m_port_setting = port_setting; + if (port_no >= rinfo.now_connect) + return CELL_PAD_ERROR_NO_DEVICE; + return CELL_OK; } diff --git a/rpcs3/ds4_pad_handler.cpp b/rpcs3/ds4_pad_handler.cpp index 17cad5b5dc..95fcd0c440 100644 --- a/rpcs3/ds4_pad_handler.cpp +++ b/rpcs3/ds4_pad_handler.cpp @@ -723,7 +723,7 @@ bool ds4_pad_handler::Init() if (dev) CheckAddDevice(dev, devInfo); else - LOG_ERROR(HLE, "[DS4] hid_open_path failed! Reason: %S", hid_error(dev)); + LOG_ERROR(HLE, "[DS4] hid_open_path failed! Reason: %s", hid_error(dev)); devInfo = devInfo->next; } hid_free_enumeration(head);