Skip to content

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
Some functions calls were broken after the update
  • Loading branch information
Fewnity committed Apr 25, 2023
1 parent 8d457c4 commit f812cf0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion libgamestream/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <uuid/uuid.h>
#include <uuid.h>
#include <openssl/sha.h>
#include <openssl/aes.h>
#include <openssl/rand.h>
Expand Down Expand Up @@ -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];
Expand Down
9 changes: 9 additions & 0 deletions libgamestream/sps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/gui/ui_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/gui/ui_connect.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <stdbool.h>
#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();
Expand Down

0 comments on commit f812cf0

Please sign in to comment.