Fine you win

This commit is contained in:
kalaposfos13 2025-04-25 18:14:34 +02:00
parent 01d8f85bc8
commit c962e70fd8

View File

@ -290,6 +290,9 @@ int PS4_SYSV_ABI scePadOutputReport() {
int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num) { int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num) {
LOG_TRACE(Lib_Pad, "handle: {}", handle); LOG_TRACE(Lib_Pad, "handle: {}", handle);
if (handle == ORBIS_PAD_ERROR_DEVICE_NO_HANDLE || handle != std::clamp(handle, 1, 4)) {
return ORBIS_PAD_ERROR_INVALID_HANDLE;
}
int connected_count = 0; int connected_count = 0;
bool connected = false; bool connected = false;
Input::State states[64]; Input::State states[64];
@ -356,7 +359,7 @@ int PS4_SYSV_ABI scePadReadHistory() {
int PS4_SYSV_ABI scePadReadState(s32 handle, OrbisPadData* pData) { int PS4_SYSV_ABI scePadReadState(s32 handle, OrbisPadData* pData) {
LOG_TRACE(Lib_Pad, "handle: {}", handle); LOG_TRACE(Lib_Pad, "handle: {}", handle);
if (handle == ORBIS_PAD_ERROR_DEVICE_NO_HANDLE) { if (handle == ORBIS_PAD_ERROR_DEVICE_NO_HANDLE || handle != std::clamp(handle, 1, 4)) {
return ORBIS_PAD_ERROR_INVALID_HANDLE; return ORBIS_PAD_ERROR_INVALID_HANDLE;
} }
auto controllers = *Common::Singleton<Input::GameControllers>::Instance(); auto controllers = *Common::Singleton<Input::GameControllers>::Instance();