diff --git a/src/tcpgecko/main.h b/src/tcpgecko/main.h index 7316087..6381b21 100644 --- a/src/tcpgecko/main.h +++ b/src/tcpgecko/main.h @@ -4,13 +4,11 @@ #include "../common/types.h" #include "../dynamic_libs/os_functions.h" -/* Main */ #ifdef __cplusplus extern "C" { #endif -//! C wrapper for our C++ functions -int Menu_Main(void); +int Menu_Main(); extern bool isCodeHandlerInstalled; extern bool areSDCheatsEnabled; @@ -19,4 +17,4 @@ extern bool areSDCheatsEnabled; } #endif -#endif +#endif \ No newline at end of file diff --git a/src/tcpgecko/net.c b/src/tcpgecko/net.cpp similarity index 98% rename from src/tcpgecko/net.c rename to src/tcpgecko/net.cpp index 59d72d4..c7d410d 100644 --- a/src/tcpgecko/net.c +++ b/src/tcpgecko/net.cpp @@ -156,7 +156,7 @@ int cafiine_send_handle(int sock, const char *path, int handle) { return -1; } -int cafiine_fopen(int sock, int *result, const char *path, const char *mode, int *handle) { +/*int cafiine_fopen(int sock, int *result, const char *path, const char *mode, int *handle) { while (iLock) usleep(5000); iLock = 1; @@ -201,7 +201,7 @@ int cafiine_fopen(int sock, int *result, const char *path, const char *mode, int error: iLock = 0; return final_result; -} +}*/ void cafiine_send_file(int sock, char *file, int size, int fd) { while (iLock) @@ -481,7 +481,7 @@ int recvwait(int sock, void *buffer, int len) { ret = recv(sock, buffer, len, 0); CHECK_ERROR(ret < 0); len -= ret; - buffer += ret; + buffer = &buffer + ret; } return 0; error: @@ -494,7 +494,7 @@ int recvwaitlen(int sock, void *buffer, int len) { ret = recv(sock, buffer, len, 0); CHECK_ERROR(ret < 0); len -= ret; - buffer += ret; + buffer = &buffer + ret; } return 0; error: @@ -517,7 +517,7 @@ int sendwait(int sock, const void *buffer, int len) { ret = send(sock, buffer, len, 0); CHECK_ERROR(ret < 0); len -= ret; - buffer += ret; + buffer = &buffer + ret; } return 0; error: diff --git a/src/tcpgecko/title.c b/src/tcpgecko/title.cpp similarity index 100% rename from src/tcpgecko/title.c rename to src/tcpgecko/title.cpp diff --git a/src/tcpgecko/title.h b/src/tcpgecko/title.h index 1274bbb..40c943c 100644 --- a/src/tcpgecko/title.h +++ b/src/tcpgecko/title.h @@ -6,6 +6,14 @@ #define TITLE_ID_BAYONETTA_2 0x0005000010172500 #define TITLE_ID_INTERNET_BROWSER 0x000500301001200A +#ifdef __cplusplus +extern "C" { +#endif + bool isRunningAllowedTitleID(); +#ifdef __cplusplus +} +#endif + #endif \ No newline at end of file diff --git a/tcpgecko.elf b/tcpgecko.elf index 4342b82..906dc41 100644 Binary files a/tcpgecko.elf and b/tcpgecko.elf differ