From 0325e4795a86801d6ed0314047434ad16b88e3cd Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 20 Jun 2024 17:10:14 +0300 Subject: [PATCH] posix_pthread_yield , scePadGetHandle --- src/core/libraries/kernel/thread_management.cpp | 6 ++++++ src/core/libraries/pad/pad.cpp | 4 ++-- src/input/controller.cpp | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/core/libraries/kernel/thread_management.cpp b/src/core/libraries/kernel/thread_management.cpp index 07669f84..de9ec316 100644 --- a/src/core/libraries/kernel/thread_management.cpp +++ b/src/core/libraries/kernel/thread_management.cpp @@ -995,6 +995,10 @@ void PS4_SYSV_ABI scePthreadYield() { sched_yield(); } +void PS4_SYSV_ABI posix_pthread_yield() { + sched_yield(); +} + int PS4_SYSV_ABI scePthreadAttrGetstack(ScePthreadAttr* attr, void** addr, size_t* size) { int result = pthread_attr_getstack(&(*attr)->pth_attr, addr, size); @@ -1308,6 +1312,8 @@ void pthreadSymbolsRegister(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("bt3CTBKmGyI", "libkernel", 1, "libkernel", 1, 1, scePthreadSetaffinity); LIB_FUNCTION("6UgtwV+0zb4", "libkernel", 1, "libkernel", 1, 1, scePthreadCreate); LIB_FUNCTION("T72hz6ffq08", "libkernel", 1, "libkernel", 1, 1, scePthreadYield); + LIB_FUNCTION("B5GmVDKwpn0", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_yield); + LIB_FUNCTION("-quPa4SEJUw", "libkernel", 1, "libkernel", 1, 1, scePthreadAttrGetstack); LIB_FUNCTION("Ru36fiTtJzA", "libkernel", 1, "libkernel", 1, 1, scePthreadAttrGetstackaddr); LIB_FUNCTION("-fA+7ZlGDQs", "libkernel", 1, "libkernel", 1, 1, scePthreadAttrGetstacksize); diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index 0faa01ba..949b71be 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -128,8 +128,8 @@ int PS4_SYSV_ABI scePadGetFeatureReport() { } int PS4_SYSV_ABI scePadGetHandle(s32 userId, s32 type, s32 index) { - LOG_ERROR(Lib_Pad, "(STUBBED) called"); - return ORBIS_OK; + LOG_DEBUG(Lib_Pad, "(DUMMY) called"); + return 1; } int PS4_SYSV_ABI scePadGetIdleCount() { diff --git a/src/input/controller.cpp b/src/input/controller.cpp index fd66c98a..7bfecadc 100644 --- a/src/input/controller.cpp +++ b/src/input/controller.cpp @@ -2,8 +2,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "core/libraries/kernel/time_management.h" -#include "input/controller.h" #include "core/libraries/pad/pad.h" +#include "input/controller.h" namespace Input { GameController::GameController() {