From f812cf03c4248e0dcbdd9ea21fd242e59e42d381 Mon Sep 17 00:00:00 2001 From: Fewnity Date: Wed, 26 Apr 2023 01:28:24 +0200 Subject: [PATCH] Fix compilation Some functions calls were broken after the update --- libgamestream/client.c | 3 ++- libgamestream/sps.c | 9 +++++++++ src/gui/ui_connect.c | 6 +++--- src/gui/ui_connect.h | 2 ++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/libgamestream/client.c b/libgamestream/client.c index 6da825a63..f1a4e3d6c 100644 --- a/libgamestream/client.c +++ b/libgamestream/client.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -59,6 +59,7 @@ const char* gs_error; #define SIGNATURE_LEN 256 #define UUID_STRLEN 37 +#define PATH_MAX 1024 static int mkdirtree(const char* directory) { char buffer[PATH_MAX]; diff --git a/libgamestream/sps.c b/libgamestream/sps.c index e502aa2f8..5f4aacb37 100644 --- a/libgamestream/sps.c +++ b/libgamestream/sps.c @@ -30,6 +30,15 @@ void gs_sps_init(int width, int height) { initial_height = height; } +void gs_sps_stop() +{ + if (h264_stream) + { + h264_free(h264_stream); + h264_stream = NULL; + } +} + void gs_sps_fix(PLENTRY sps, int flags, uint8_t* out_buf, uint32_t* out_offset) { int start_len = sps->data[2] == 0x01 ? 3 : 4; diff --git a/src/gui/ui_connect.c b/src/gui/ui_connect.c index ec8e11658..765fcbb3b 100644 --- a/src/gui/ui_connect.c +++ b/src/gui/ui_connect.c @@ -236,7 +236,7 @@ int ui_connect(char *name, char *address) { char key_dir[4096]; sprintf(key_dir, "%s/%s", config.key_dir, name); - ret = gs_init(&server, address, key_dir, 0, true); + ret = gs_init(&server, address, HOST_PORT, key_dir, 0, true); if (ret == GS_OUT_OF_MEMORY) { display_error("Not enough memory"); return 0; @@ -372,7 +372,7 @@ device_info_t* ui_connect_and_pairing(device_info_t *info) { sprintf(key_dir, "%s/%s", config.key_dir, info->name); sceIoMkdir(key_dir, 0777); - int ret = gs_init(&server, info->internal, key_dir, 0, true); + int ret = gs_init(&server, info->internal, HOST_PORT, key_dir, 0, true); if (ret == GS_OUT_OF_MEMORY) { display_error("Not enough memory"); @@ -463,7 +463,7 @@ bool check_connection(const char *name, char *addr) { char key_dir[4096]; sprintf(key_dir, "%s/%s", config.key_dir, name); - if (gs_init(&server, addr, key_dir, 0, true) != GS_OK) { + if (gs_init(&server, addr, HOST_PORT, key_dir, 0, true) != GS_OK) { return false; } connection_terminate(); diff --git a/src/gui/ui_connect.h b/src/gui/ui_connect.h index c3e9fba61..743f2658a 100644 --- a/src/gui/ui_connect.h +++ b/src/gui/ui_connect.h @@ -1,6 +1,8 @@ #include #include "../device.h" +#define HOST_PORT 47989 + void ui_connect_address(char *addr); device_info_t* ui_connect_and_pairing(device_info_t *info); bool ui_connect_connected();