mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 02:47:02 +02:00
libs: fill controller and broadcast status outputs
This commit is contained in:
@@ -812,6 +812,20 @@ int KYTY_SYSV_ABI PadGetControllerInformation(int handle, PadControllerInformati
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int KYTY_SYSV_ABI PadIsRemoteController(int handle, bool* is_remote) {
|
||||||
|
PRINT_NAME();
|
||||||
|
|
||||||
|
if (handle != 1) {
|
||||||
|
return PAD_ERROR_INVALID_HANDLE;
|
||||||
|
}
|
||||||
|
if (is_remote == nullptr) {
|
||||||
|
return PAD_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
*is_remote = false;
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
int KYTY_SYSV_ABI PadReadState(int handle, PadData* data) {
|
int KYTY_SYSV_ABI PadReadState(int handle, PadData* data) {
|
||||||
PRINT_NAME();
|
PRINT_NAME();
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ int KYTY_SYSV_ABI PadSetMotionSensorState(int handle, bool enable);
|
|||||||
int KYTY_SYSV_ABI PadSetAngularVelocityDeadbandState(int handle, bool enable);
|
int KYTY_SYSV_ABI PadSetAngularVelocityDeadbandState(int handle, bool enable);
|
||||||
int KYTY_SYSV_ABI PadResetOrientation(int handle);
|
int KYTY_SYSV_ABI PadResetOrientation(int handle);
|
||||||
int KYTY_SYSV_ABI PadGetControllerInformation(int handle, PadControllerInformation* info);
|
int KYTY_SYSV_ABI PadGetControllerInformation(int handle, PadControllerInformation* info);
|
||||||
|
int KYTY_SYSV_ABI PadIsRemoteController(int handle, bool* is_remote);
|
||||||
int KYTY_SYSV_ABI PadReadState(int handle, PadData* data);
|
int KYTY_SYSV_ABI PadReadState(int handle, PadData* data);
|
||||||
int KYTY_SYSV_ABI PadRead(int handle, PadData* data, int num);
|
int KYTY_SYSV_ABI PadRead(int handle, PadData* data, int num);
|
||||||
int KYTY_SYSV_ABI PadSetVibration(int handle, const PadVibrationParam* param);
|
int KYTY_SYSV_ABI PadSetVibration(int handle, const PadVibrationParam* param);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "loader/symbolDatabase.h"
|
#include "loader/symbolDatabase.h"
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include <cstddef>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@@ -3721,6 +3722,21 @@ namespace LibGameLiveStreaming {
|
|||||||
|
|
||||||
LIB_VERSION("GameLiveStreaming", 1, "GameLiveStreaming", 1, 1);
|
LIB_VERSION("GameLiveStreaming", 1, "GameLiveStreaming", 1, 1);
|
||||||
|
|
||||||
|
constexpr int GAME_LIVE_STREAMING_ERROR_INVALID_PARAM = -2136997886;
|
||||||
|
|
||||||
|
struct GameLiveStreamingStatus2 {
|
||||||
|
int32_t user_id;
|
||||||
|
bool is_on_air;
|
||||||
|
uint32_t spectator_count;
|
||||||
|
uint32_t text_message_count;
|
||||||
|
uint32_t command_message_count;
|
||||||
|
uint8_t reserved[52];
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(GameLiveStreamingStatus2) == 72);
|
||||||
|
static_assert(offsetof(GameLiveStreamingStatus2, is_on_air) == 4);
|
||||||
|
static_assert(offsetof(GameLiveStreamingStatus2, spectator_count) == 8);
|
||||||
|
|
||||||
static int KYTY_SYSV_ABI GameLiveStreamingInitialize(size_t heap_size) {
|
static int KYTY_SYSV_ABI GameLiveStreamingInitialize(size_t heap_size) {
|
||||||
PRINT_NAME();
|
PRINT_NAME();
|
||||||
|
|
||||||
@@ -3735,9 +3751,34 @@ static int KYTY_SYSV_ABI GameLiveStreamingTerminate() {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int KYTY_SYSV_ABI GameLiveStreamingGetCurrentStatus2(GameLiveStreamingStatus2* status) {
|
||||||
|
PRINT_NAME();
|
||||||
|
|
||||||
|
if (status == nullptr) {
|
||||||
|
return GAME_LIVE_STREAMING_ERROR_INVALID_PARAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::memset(status, 0, sizeof(*status));
|
||||||
|
status->user_id = -1;
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int KYTY_SYSV_ABI GameLiveStreamingGetSocialFeedbackMessagesCount(int type, uint32_t* count) {
|
||||||
|
PRINT_NAME();
|
||||||
|
|
||||||
|
if (type < 1 || type > 3 || count == nullptr) {
|
||||||
|
return GAME_LIVE_STREAMING_ERROR_INVALID_PARAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
*count = 0;
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
LIB_DEFINE(InitPlatform_1_GameLiveStreaming) {
|
LIB_DEFINE(InitPlatform_1_GameLiveStreaming) {
|
||||||
LIB_FUNC("kvYEw2lBndk", LibGameLiveStreaming::GameLiveStreamingInitialize);
|
LIB_FUNC("kvYEw2lBndk", LibGameLiveStreaming::GameLiveStreamingInitialize);
|
||||||
LIB_FUNC("9yK6Fk8mKOQ", LibGameLiveStreaming::GameLiveStreamingTerminate);
|
LIB_FUNC("9yK6Fk8mKOQ", LibGameLiveStreaming::GameLiveStreamingTerminate);
|
||||||
|
LIB_FUNC("lK8dLBNp9OE", LibGameLiveStreaming::GameLiveStreamingGetCurrentStatus2);
|
||||||
|
LIB_FUNC("yeQKjHETi40", LibGameLiveStreaming::GameLiveStreamingGetSocialFeedbackMessagesCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace LibGameLiveStreaming
|
} // namespace LibGameLiveStreaming
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ LIB_DEFINE(InitPad_1) {
|
|||||||
LIB_FUNC("rIZnR6eSpvk", Controller::PadResetOrientation);
|
LIB_FUNC("rIZnR6eSpvk", Controller::PadResetOrientation);
|
||||||
LIB_FUNC("vDLMoJLde8I", PadSetTiltCorrectionState);
|
LIB_FUNC("vDLMoJLde8I", PadSetTiltCorrectionState);
|
||||||
LIB_FUNC("gjP9-KQzoUk", Controller::PadGetControllerInformation);
|
LIB_FUNC("gjP9-KQzoUk", Controller::PadGetControllerInformation);
|
||||||
|
LIB_FUNC("fCWdlnmB1Ks", Controller::PadIsRemoteController);
|
||||||
LIB_FUNC("hGbf2QTBmqc", PadGetExtControllerInformationStub);
|
LIB_FUNC("hGbf2QTBmqc", PadGetExtControllerInformationStub);
|
||||||
LIB_FUNC("2JgFB2n9oUM", Controller::PadSetTriggerEffect);
|
LIB_FUNC("2JgFB2n9oUM", Controller::PadSetTriggerEffect);
|
||||||
LIB_FUNC("YndgXqQVV7c", Controller::PadReadState);
|
LIB_FUNC("YndgXqQVV7c", Controller::PadReadState);
|
||||||
|
|||||||
Reference in New Issue
Block a user