added pad functions parameters
This commit is contained in:
parent
1e18efcd05
commit
95f1c14dcf
|
@ -6,7 +6,8 @@
|
||||||
namespace Emulator::HLE::Libraries::LibPad {
|
namespace Emulator::HLE::Libraries::LibPad {
|
||||||
int PS4_SYSV_ABI scePadInit() { return SCE_OK; }
|
int PS4_SYSV_ABI scePadInit() { return SCE_OK; }
|
||||||
|
|
||||||
int PS4_SYSV_ABI scePadOpen(/* SceUserServiceUserId userId, int32_t type, int32_t index, const ScePadOpenParam* pParam*/) {
|
int PS4_SYSV_ABI scePadOpen(Emulator::HLE::Libraries::LibUserService::SceUserServiceUserId userId, s32 type, s32 index,
|
||||||
|
const ScePadOpenParam* pParam) {
|
||||||
return 1; // dummy
|
return 1; // dummy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,51 +1,76 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "Core/PS4/Loader/SymbolsResolver.h"
|
#include "Core/PS4/Loader/SymbolsResolver.h"
|
||||||
|
#include <Emulator/HLE/Libraries/LibUserService/user_service.h>
|
||||||
|
|
||||||
namespace Emulator::HLE::Libraries::LibPad {
|
namespace Emulator::HLE::Libraries::LibPad {
|
||||||
|
|
||||||
|
struct ScePadOpenParam {
|
||||||
|
u08 reserve[8];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ScePadAnalogStick {
|
||||||
|
u08 x;
|
||||||
|
u08 y;
|
||||||
|
};
|
||||||
|
struct ScePadAnalogButtons {
|
||||||
|
u08 l2;
|
||||||
|
u08 r2;
|
||||||
|
u08 padding[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SceFQuaternion {
|
||||||
|
float x, y, z, w;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SceFVector3 {
|
||||||
|
float x, y, z;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ScePadTouch {
|
||||||
|
u16 x;
|
||||||
|
u16 y;
|
||||||
|
u08 id;
|
||||||
|
u08 reserve[3];
|
||||||
|
};
|
||||||
|
|
||||||
|
constexpr int SCE_PAD_MAX_TOUCH_NUM = 2;
|
||||||
|
|
||||||
|
typedef struct ScePadTouchData {
|
||||||
|
u08 touchNum;
|
||||||
|
u08 reserve[3];
|
||||||
|
u32 reserve1;
|
||||||
|
ScePadTouch touch[SCE_PAD_MAX_TOUCH_NUM];
|
||||||
|
} ScePadTouchData;
|
||||||
|
|
||||||
|
struct ScePadExtensionUnitData {
|
||||||
|
u32 extensionUnitId;
|
||||||
|
u08 reserve[1];
|
||||||
|
u08 dataLength;
|
||||||
|
u08 data[10];
|
||||||
|
};
|
||||||
|
|
||||||
struct ScePadData {
|
struct ScePadData {
|
||||||
u32 buttons;
|
u32 buttons;
|
||||||
u08 left_stick_x;
|
ScePadAnalogStick leftStick;
|
||||||
u08 left_stick_y;
|
ScePadAnalogStick rightStick;
|
||||||
u08 right_stick_x;
|
ScePadAnalogButtons analogButtons;
|
||||||
u08 right_stick_y;
|
SceFQuaternion orientation;
|
||||||
u08 analog_buttons_l2;
|
SceFVector3 acceleration;
|
||||||
u08 analog_buttons_r2;
|
SceFVector3 angularVelocity;
|
||||||
u08 padding[2];
|
ScePadTouchData touchData;
|
||||||
float orientation_x;
|
|
||||||
float orientation_y;
|
|
||||||
float orientation_z;
|
|
||||||
float orientation_w;
|
|
||||||
float acceleration_x;
|
|
||||||
float acceleration_y;
|
|
||||||
float acceleration_z;
|
|
||||||
float angular_velocity_x;
|
|
||||||
float angular_velocity_y;
|
|
||||||
float angular_velocity_z;
|
|
||||||
u08 touch_data_touch_num;
|
|
||||||
u08 touch_data_reserve[3];
|
|
||||||
u32 touch_data_reserve1;
|
|
||||||
u16 touch_data_touch0_x;
|
|
||||||
u16 touch_data_touch0_y;
|
|
||||||
u08 touch_data_touch0_id;
|
|
||||||
u08 touch_data_touch0_reserve[3];
|
|
||||||
u16 touch_data_touch1_x;
|
|
||||||
u16 touch_data_touch1_y;
|
|
||||||
u08 touch_data_touch1_id;
|
|
||||||
u08 touch_data_touch1_reserve[3];
|
|
||||||
bool connected;
|
bool connected;
|
||||||
u64 timestamp;
|
u64 timestamp;
|
||||||
u32 extension_unit_data_extension_unit_id;
|
ScePadExtensionUnitData extensionUnitData;
|
||||||
u08 extension_unit_data_reserve[1];
|
uint8_t connectedCount;
|
||||||
u08 extension_unit_data_data_length;
|
uint8_t reserve[2];
|
||||||
u08 extension_unit_data_data[10];
|
uint8_t deviceUniqueDataLen;
|
||||||
u08 connected_count;
|
uint8_t deviceUniqueData[12];
|
||||||
u08 reserve[2];
|
|
||||||
u08 device_unique_data_len;
|
|
||||||
u08 device_unique_data[12];
|
|
||||||
};
|
};
|
||||||
// hle functions
|
// hle functions
|
||||||
int PS4_SYSV_ABI scePadInit();
|
int PS4_SYSV_ABI scePadInit();
|
||||||
|
int PS4_SYSV_ABI scePadOpen(Emulator::HLE::Libraries::LibUserService::SceUserServiceUserId userId, s32 type, s32 index,
|
||||||
|
const ScePadOpenParam* pParam);
|
||||||
|
int PS4_SYSV_ABI scePadReadState(int32_t handle, ScePadData* pData);
|
||||||
|
|
||||||
void libPad_Register(SymbolsResolver* sym);
|
void libPad_Register(SymbolsResolver* sym);
|
||||||
}; // namespace Emulator::HLE::Libraries::LibPad
|
}; // namespace Emulator::HLE::Libraries::LibPad
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
namespace Emulator::HLE::Libraries::LibUserService {
|
namespace Emulator::HLE::Libraries::LibUserService {
|
||||||
|
|
||||||
|
using SceUserServiceUserId = s32;
|
||||||
|
|
||||||
struct SceUserServiceInitializeParams {
|
struct SceUserServiceInitializeParams {
|
||||||
s32 priority;
|
s32 priority;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue