From 1d8e3ec4ab93453e0d8a69f74a8b4da0cfb6993e Mon Sep 17 00:00:00 2001 From: InvoxiPlayGames Date: Wed, 28 Aug 2024 10:51:30 +0100 Subject: [PATCH] return proper error code for scePadOpen failure --- src/core/libraries/pad/pad.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index c4735c9ae..c75e71dfe 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -249,10 +249,10 @@ int PS4_SYSV_ABI scePadOpen(s32 userId, s32 type, s32 index, const OrbisPadOpenP LOG_INFO(Lib_Pad, "(DUMMY) called user_id = {} type = {} index = {}", userId, type, index); if (Config::getUseSpecialPad()) { if (type != ORBIS_PAD_PORT_TYPE_SPECIAL) - return -1; + return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED; } else { if (type != ORBIS_PAD_PORT_TYPE_STANDARD) - return -1; + return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED; } return 1; // dummy } @@ -261,10 +261,10 @@ int PS4_SYSV_ABI scePadOpenExt(s32 userId, s32 type, s32 index, const OrbisPadOp LOG_ERROR(Lib_Pad, "(STUBBED) called"); if (Config::getUseSpecialPad()) { if (type != ORBIS_PAD_PORT_TYPE_SPECIAL) - return -1; + return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED; } else { if (type != ORBIS_PAD_PORT_TYPE_STANDARD) - return -1; + return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED; } return 1; // dummy }