mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-20 13:33:13 -07:00
Prepare Regist for PS5
This commit is contained in:
parent
c804bf66c7
commit
21ef8fa018
7 changed files with 86 additions and 32 deletions
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -61,11 +62,21 @@ typedef enum
|
|||
{
|
||||
// values must not change
|
||||
CHIAKI_TARGET_PS4_UNKNOWN = 0,
|
||||
CHIAKI_TARGET_PS4_8 = 800,
|
||||
CHIAKI_TARGET_PS4_9 = 900,
|
||||
CHIAKI_TARGET_PS4_10 = 1000
|
||||
CHIAKI_TARGET_PS4_8 = 800,
|
||||
CHIAKI_TARGET_PS4_9 = 900,
|
||||
CHIAKI_TARGET_PS4_10 = 1000,
|
||||
CHIAKI_TARGET_PS5_UNKNOWN = 1000000,
|
||||
CHIAKI_TARGET_PS5_1 = 1000100
|
||||
} ChiakiTarget;
|
||||
|
||||
static inline bool chiaki_target_is_unknown(ChiakiTarget target)
|
||||
{
|
||||
return target == CHIAKI_TARGET_PS5_UNKNOWN
|
||||
|| target == CHIAKI_TARGET_PS4_UNKNOWN;
|
||||
}
|
||||
|
||||
static inline bool chiaki_target_is_ps5(ChiakiTarget target) { return target >= CHIAKI_TARGET_PS5_UNKNOWN; }
|
||||
|
||||
/**
|
||||
* Perform initialization of global state needed for using the Chiaki lib
|
||||
*/
|
||||
|
|
|
@ -35,7 +35,7 @@ CHIAKI_EXPORT const char *chiaki_rp_application_reason_string(uint32_t reason);
|
|||
*/
|
||||
CHIAKI_EXPORT const char *chiaki_rp_version_string(ChiakiTarget target);
|
||||
|
||||
CHIAKI_EXPORT ChiakiTarget chiaki_rp_version_parse(const char *rp_version_str);
|
||||
CHIAKI_EXPORT ChiakiTarget chiaki_rp_version_parse(const char *rp_version_str, bool is_ps5);
|
||||
|
||||
|
||||
#define CHIAKI_RP_DID_SIZE 32
|
||||
|
@ -70,6 +70,7 @@ CHIAKI_EXPORT void chiaki_connect_video_profile_preset(ChiakiConnectVideoProfile
|
|||
|
||||
typedef struct chiaki_connect_info_t
|
||||
{
|
||||
bool ps5;
|
||||
const char *host; // null terminated
|
||||
char regist_key[CHIAKI_SESSION_AUTH_SIZE]; // must be completely filled (pad with \0)
|
||||
uint8_t morning[0x10];
|
||||
|
@ -149,6 +150,7 @@ typedef struct chiaki_session_t
|
|||
{
|
||||
struct
|
||||
{
|
||||
bool ps5;
|
||||
struct addrinfo *host_addrinfos;
|
||||
struct addrinfo *host_addrinfo_selected;
|
||||
char hostname[128];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue