Skip to content

Commit

Permalink
[BOX32][WRAPPER] Fixed some gnutls wrapped functions (help NFS Paybac…
Browse files Browse the repository at this point in the history
…k from Steam)
  • Loading branch information
ptitSeb committed Mar 8, 2025
1 parent c2d0297 commit fc02f0d
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/wrapped32/wrappedgnutls.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@
#include "callback.h"
#include "converter32.h"

static const char* gnutlsName =
#if ANDROID
"libgnutls.so"
#else
"libgnutls.so.30"
#endif
;
static const char* gnutlsName = "libgnutls.so.30";
#define ALTNAME "libgnutls.so"

#define LIBNAME gnutls

#include "generated/wrappedgnutlstypes32.h"
Expand Down Expand Up @@ -69,7 +65,8 @@ static void* find_gnutls_log_Fct(void* fct)
static uintptr_t my_pullpush_fct_##A = 0; \
static long my_pullpush_##A(void* p, void* d, size_t l) \
{ \
return (long)RunFunctionFmt(my_pullpush_fct_##A, "ppL", p, d, l); \
long_t ret = (long_t)RunFunctionFmt(my_pullpush_fct_##A, "ppL", p, d, l); \
return from_long(ret);\
}
SUPER()
#undef GO
Expand Down Expand Up @@ -126,12 +123,12 @@ EXPORT void* my32_gnutls_certificate_get_peers(x64emu_t* emu, void* session, int
if(size) *size = num;
if(!ret) return NULL;
static datum_32_t res[128];
if(num>128) {printf_log(LOG_NONE, "BOX32: Warning, return buffer for gnutls_certificate_get_peers too small: %d\n", size); num=128;}
if(num>128) {printf_log(LOG_NONE, "BOX32: Warning, return buffer for gnutls_certificate_get_peers too small: %d\n", num); num=128;}
for(int i=0; i<num; ++i) {
res[i].data = to_ptrv(ret[i].p0);
res[i].size = ret[i].u1;
}
return ret;
return res;
}

EXPORT void my32_gnutls_global_set_log_function(x64emu_t* emu, void* f)
Expand Down

0 comments on commit fc02f0d

Please sign in to comment.