diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-04-11 18:31:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-11 18:31:59 +0200 |
| commit | 76903904d07afc332ac98c863d494eff353e1e5d (patch) | |
| tree | 2965f6175befb434a15376e55f5b87b27fa098e4 /src | |
| parent | ae221ed5bd1e530ff7f90af30b633bb21801e42b (diff) | |
| parent | a42f232b1efb155a0aebbf6b882e97ce7e516a3b (diff) | |
| download | box64-76903904d07afc332ac98c863d494eff353e1e5d.tar.gz box64-76903904d07afc332ac98c863d494eff353e1e5d.zip | |
Merge pull request #6 from rajdakin/generalImprovements
General improvements to box64 and fixed some SDL2 functions
Diffstat (limited to 'src')
61 files changed, 1593 insertions, 367 deletions
diff --git a/src/elfs/elfloader.c b/src/elfs/elfloader.c index f31dc71f..4e6a3be9 100755 --- a/src/elfs/elfloader.c +++ b/src/elfs/elfloader.c @@ -785,7 +785,7 @@ Elf64_Sym* GetFunction(elfheader_t* h, const char* name) // TODO: create a hash on named to avoid this loop for (int i=0; i<h->numSymTab; ++i) { int type = ELF64_ST_TYPE(h->SymTab[i].st_info); - if(/*h->SymTab[i].st_info == 18*/type==STT_FUNC) { // TODO: this "18" is probably defined somewhere + if(type==STT_FUNC) { const char * symname = h->StrTab+h->SymTab[i].st_name; if(strcmp(symname, name)==0) { return h->SymTab+i; diff --git a/src/emu/x64emu.c b/src/emu/x64emu.c index 2f95b518..c1f3946c 100755 --- a/src/emu/x64emu.c +++ b/src/emu/x64emu.c @@ -17,6 +17,9 @@ #include "x64run_private.h" #include "callback.h" #include "bridge.h" +#ifdef HAVE_TRACE +#include "x64trace.h" +#endif #ifdef DYNAREC #include "custommem.h" #endif @@ -412,8 +415,19 @@ void StopEmu(x64emu_t* emu, const char* reason) emu->quit = 1; printf_log(LOG_NONE, "%s", reason); // dump stuff... - printf_log(LOG_NONE, "CPU Regs=%s\n", DumpCPURegs(emu, R_RIP)); - // TODO: stack, memory/instruction around EIP, etc.. + printf_log(LOG_NONE, "==== CPU Registers ====\n%s\n", DumpCPURegs(emu, R_RIP)); + printf_log(LOG_NONE, "======== Stack ========\nStack is from %lX to %lX\n", R_RBP, R_RSP); + if (R_RBP == R_RSP) { + printf_log(LOG_NONE, "RBP = RSP: leaf function detected; next 128 bytes should be either data or random.\n"); + } else { + // TODO: display stack if operation should be allowed (to avoid crashes) + /* for (uint64_t *sp = R_RBP; sp >= R_RSP; --sp) { + } */ + } + printf_log(LOG_NONE, "Old IP: %tX\n", emu->old_ip); +#ifdef HAVE_TRACE + printf_log(LOG_NONE, "%s\n", DecodeX64Trace(my_context->dec, emu->old_ip)); +#endif } void UnimpOpcode(x64emu_t* emu) @@ -461,16 +475,16 @@ uint64_t ReadTSC(x64emu_t* emu) { //TODO: implement hardware counter read? // Read the TimeStamp Counter as 64bits. - // this is supposed to be the number of instrunctions executed since last reset -// fall back to gettime... + // this is supposed to be the number of instructions executed since last reset + // fall back to gettime... #ifndef NOGETCLOCK - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC_COARSE, &ts); - return (uint64_t)(ts.tv_sec) * 1000000000LL + ts.tv_nsec; + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC_COARSE, &ts); + return (uint64_t)(ts.tv_sec) * 1000000000LL + ts.tv_nsec; #else - struct timeval tv; - gettimeofday(&tv, NULL); - return (uint64_t)(tv.tv_sec) * 1000000 + tv.tv_usec; + struct timeval tv; + gettimeofday(&tv, NULL); + return (uint64_t)(tv.tv_sec) * 1000000 + tv.tv_usec; #endif } diff --git a/src/emu/x64primop.h b/src/emu/x64primop.h index 97264208..e42c7062 100755 --- a/src/emu/x64primop.h +++ b/src/emu/x64primop.h @@ -353,8 +353,6 @@ static inline uint16_t shr16(x64emu_t *emu, uint16_t d, uint8_t s) static inline uint32_t shr32(x64emu_t *emu, uint32_t d, uint8_t s) { - RESET_FLAGS(emu); // TODO: Defered this one? - emu->df = d_shr32; emu->op1.u32 = d; @@ -367,8 +365,6 @@ static inline uint32_t shr32(x64emu_t *emu, uint32_t d, uint8_t s) static inline uint64_t shr64(x64emu_t *emu, uint64_t d, uint8_t s) { - RESET_FLAGS(emu); // TODO: Defered this one? - emu->df = d_shr64; emu->op1.u64 = d; diff --git a/src/emu/x64run_private.c b/src/emu/x64run_private.c index 9bf22e44..c6a7ac88 100755 --- a/src/emu/x64run_private.c +++ b/src/emu/x64run_private.c @@ -30,8 +30,6 @@ int32_t EXPORT my___libc_start_main(x64emu_t* emu, int *(main) (int, char * *, char * *), int argc, char * * ubp_av, void (*init) (void), void (*fini) (void), void (*rtld_fini) (void), void (* stack_end)) { - //TODO: register rtld_fini - //TODO: register fini // let's cheat and set all args... if(init) { PushExit(emu); diff --git a/src/emu/x64rundc.c b/src/emu/x64rundc.c index da5b0fd9..9f581895 100644 --- a/src/emu/x64rundc.c +++ b/src/emu/x64rundc.c @@ -67,7 +67,7 @@ int RunDC(x64emu_t *emu, rex_t rex) case 0xDD: case 0xDE: case 0xDF: /* FCOMP */ - fpu_fcom(emu, ST(nextop&7).d); // TODO: is this ok? + fpu_fcom(emu, ST(nextop&7).d); fpu_do_pop(emu); break; case 0xE0: @@ -143,4 +143,4 @@ int RunDC(x64emu_t *emu, rex_t rex) } } return 0; -} \ No newline at end of file +} diff --git a/src/include/box64context.h b/src/include/box64context.h index 4d48c816..1b215378 100755 --- a/src/include/box64context.h +++ b/src/include/box64context.h @@ -31,7 +31,6 @@ typedef struct kh_dynablocks_s kh_dynablocks_t; #define JMPTABL_SHIFT 16 typedef void* (*procaddess_t)(const char* name); -typedef void* (*vkprocaddess_t)(void* instance, const char* name); #define MAX_SIGNAL 64 @@ -108,9 +107,6 @@ typedef struct box64context_s { procaddess_t glxprocaddress; kh_symbolmap_t *alwrappers; // the map of wrapper for alGetProcAddress kh_symbolmap_t *almymap; // link to the mysymbolmap if libOpenAL - kh_symbolmap_t *vkwrappers; // the map of wrapper for VulkanProcs (TODO: check SDL2) - kh_symbolmap_t *vkmymap; // link to the mysymbolmap of libGL - vkprocaddess_t vkprocaddress; pthread_mutex_t mutex_once; pthread_mutex_t mutex_once2; diff --git a/src/include/sdl2rwops.h b/src/include/sdl2rwops.h index 968a3c58..a049f80b 100755 --- a/src/include/sdl2rwops.h +++ b/src/include/sdl2rwops.h @@ -1,7 +1,7 @@ #ifndef __SDL2RWOPS_H__ #define __SDL2RWOPS_H__ -typedef struct SDL2_RWops_s SDL2_RWops_t; // the actual SDL1 SDL_RWops +typedef struct SDL2_RWops_s SDL2_RWops_t; // the actual SDL2 SDL_RWops typedef struct x64emu_s x64emu_t; typedef SDL2_RWops_t* (*sdl2_allocrw)(); @@ -20,12 +20,12 @@ typedef struct SDL2RWSave_s { // each function will be added to dictionary, and each native functions will be wrapped so they run in emulated world SDL2_RWops_t* AddNativeRW2(x64emu_t* emu, SDL2_RWops_t* ops); -SDL2_RWops_t* RWNativeStart2(x64emu_t* emu, SDL2_RWops_t* ops); // put Native RW function, wrapping emulated (callback style) ones if needed -void RWNativeEnd2(SDL2_RWops_t* ops); // put back emulated function back in place +SDL2_RWops_t* RWNativeStart2(x64emu_t* emu, SDL2_RWops_t* ops); // put native RW functions, wrapping the emulated (callback style) ones if needed +void RWNativeEnd2(SDL2_RWops_t* ops); // put emulated function back in place int64_t RWNativeSeek2(SDL2_RWops_t *ops, int64_t offset, int32_t whence); uint32_t RWNativeRead2(SDL2_RWops_t* ops, void* ptr, uint32_t size, uint32_t maxnum); int32_t RWNativeWrite2(SDL2_RWops_t *ops, const void *ptr, int32_t size, int32_t num); int32_t RWNativeClose2(SDL2_RWops_t* ops); -#endif \ No newline at end of file +#endif diff --git a/src/librarian/librarian.c b/src/librarian/librarian.c index b53b2f88..9afdd395 100755 --- a/src/librarian/librarian.c +++ b/src/librarian/librarian.c @@ -608,7 +608,12 @@ const char* FindSymbolName(lib_t *maplib, void* p, void** start, uint32_t* sz, c *base = GetBaseAddress(h); return ret; } - // TODO: then search in the other libs... + // TODO: find if cyclic references exists (should also fix MapLibAddMapLib) + /* for (int i = 0; i < maplib->libsz; ++i) { + // if (maplib == maplib->libraries[i]->maplib) continue; + const char *nameInLib = FindSymbolName(maplib->libraries[i]->maplib, p, start, sz, libname, base); + if (nameInLib) return nameInLib; + } */ return NULL; } diff --git a/src/main.c b/src/main.c index 3fb8d9a0..554d75a7 100755 --- a/src/main.c +++ b/src/main.c @@ -805,11 +805,11 @@ int main(int argc, const char **argv, const char **env) { AddPath("libudev.so.0", &my_context->box64_emulated_libs, 0); box64_steam = 1; } - // special case for steam-runtime-check-requirements to fake 64bits suport + /*// special case for steam-runtime-check-requirements to fake 64bits suport if(strstr(prgname, "steam-runtime-check-requirements")==prgname) { printf_log(LOG_INFO, "steam-runtime-check-requirements detected, faking All is good!\n"); exit(0); // exiting, not testing anything - } + }*/ // special case for UnrealLinux.bin, it doesn't like "full path resolution" if(!strcmp(prog, "UnrealLinux.bin") && my_context->argv[0]) { free(my_context->argv[0]); diff --git a/src/tools/box64stack.c b/src/tools/box64stack.c index 94ca4dd3..7c330128 100755 --- a/src/tools/box64stack.c +++ b/src/tools/box64stack.c @@ -121,29 +121,55 @@ void SetupInitialStack(x64emu_t *emu) R_RSP=tmp; // push the AuxVector themselves - Push(emu, 0); Push(emu, 0); //AT_NULL(0)=0 - Push(emu, p_x86_64); Push(emu, 15); //AT_PLATFORM(15)=p_x86_64* - Push(emu, 0); Push(emu, 66); //AT_HWCAP2(26)=0 + /* Actual sample: + 3 0x400040 + 4 0x38 + 5 0xb + 6 0x1000 + 7 0x7f7addca6000 + 8 (nil) + 9 0x401040 + 11 0x3e8 + 12 0x3e8 + 13 0x3e8 + 14 0x3e8 + 16 0xbfebfbff + 15 0x7ffd5074c4c9 + 17 0x64 + 23 (nil) + 25 0x7ffd5074c4b9 + 26 (nil) + 31 0x7ffd5074efea + 33 0x7ffd507e6000 + */ + Push(emu, 0); Push(emu, 0); //AT_NULL(0)=0 + //Push(emu, ); Push(emu, 3); //AT_PHDR(3)=address of the PH of the executable + //Push(emu, ); Push(emu, 4); //AT_PHENT(4)=size of PH entry + //Push(emu, ); Push(emu, 5); //AT_PHNUM(5)=number of elf headers + Push(emu, box64_pagesize); Push(emu, 6); //AT_PAGESZ(6) + //Push(emu, real_getauxval(7)); Push(emu, 7); //AT_BASE(7)=ld-2.27.so start (in memory) + Push(emu, 0); Push(emu, 8); //AT_FLAGS(8)=0 + Push(emu, R_RIP); Push(emu, 9); //AT_ENTRY(9)=entrypoint + Push(emu, real_getauxval(11)); Push(emu, 11); //AT_UID(11) + Push(emu, real_getauxval(12)); Push(emu, 12); //AT_EUID(12) + Push(emu, real_getauxval(13)); Push(emu, 13); //AT_GID(13) + Push(emu, real_getauxval(14)); Push(emu, 14); //AT_EGID(14) + Push(emu, p_x86_64); Push(emu, 15); //AT_PLATFORM(15)=&"x86_64" // Push HWCAP: - // FPU: 1<<0 ; VME: 1<<1 ; DE : 1<<2 ; PSE: 1<<3 ; TSC: 1<<4 - // MSR: 1<<5 : PAE: 1<<6 : MCE: 1<<7 ; CX8: 1<<8 : APIC:1<<9 - // SEP: 1<<11: MTRR:1<<12: PGE: 1<<13: MCA: 1<<14; CMOV:1<<15; FCMOV: 1<<16 - // MMX: 1<<23:OSFXR:1<<24: XMM: 1<<25:XMM2: 1<<26;AMD3D:1<<31 + // FPU: 1<<0 ; VME: 1<<1 ; DE : 1<<2 ; PSE: 1<<3 ; TSC: 1<<4 ; MSR: 1<<5 ; PAE: 1<<6 ; MCE: 1<<7 + // CX8: 1<<8 ; APIC:1<<9 ; SEP: 1<<11; MTRR:1<<12; PGE: 1<<13; MCA: 1<<14; CMOV:1<<15 + // FCMOV:1<<16; ; MMX: 1<<23 + // OSFXR:1<<24; XMM: 1<<25;XMM2: 1<<26; AMD3D:1<<31 Push(emu, (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<8) | (1<<15) | (1<<16) | (1<<23) | (1<<25) | (1<<26)); - Push(emu, 16); //AT_HWCAP(16)=... - Push(emu, p_arg0); Push(emu, 31); //AT_EXECFN(31)=p_arg0 - Push(emu, p_random); Push(emu, 25); //AT_RANDOM(25)=p_random - Push(emu, real_getauxval(23)); Push(emu, 23); //AT_SECURE(23)=0 - Push(emu, real_getauxval(14)); Push(emu, 14); //AT_EGID(14) - Push(emu, real_getauxval(13)); Push(emu, 13); //AT_GID(13) - Push(emu, real_getauxval(12)); Push(emu, 12); //AT_EUID(12) - Push(emu, real_getauxval(11)); Push(emu, 11); //AT_UID(11) - Push(emu, box64_pagesize); Push(emu, 6); //AT_PAGESZ(6) - Push(emu, R_RIP); Push(emu, 9); //AT_ENTRY(9)=entrypoint - Push(emu, 0/*emu->context->vsyscall*/); Push(emu, 32); //AT_SYSINFO(32)=vsyscall + Push(emu, 16); //AT_HWCAP(16)=... + //Push(emu, sysconf(_SC_CLK_TCK)); Push(emu, 17); //AT_CLKTCK(17)=times() frequency + Push(emu, real_getauxval(23)); Push(emu, 23); //AT_SECURE(23) + Push(emu, p_random); Push(emu, 25); //AT_RANDOM(25)=p_random + Push(emu, 0); Push(emu, 26); //AT_HWCAP2(26)=0 + Push(emu, p_arg0); Push(emu, 31); //AT_EXECFN(31)=p_arg0 + //Push(emu, ); Push(emu, 33); //AT_SYSINFO_EHDR(33)=address of vDSO if(!emu->context->auxval_start) // store auxval start if needed emu->context->auxval_start = (uintptr_t*)R_RSP; - // TODO: continue // push nil / envs / nil / args / argc Push(emu, 0); @@ -153,4 +179,4 @@ void SetupInitialStack(x64emu_t *emu) for (int i=emu->context->argc-1; i>=0; --i) Push(emu, p_argv[i]); Push(emu, emu->context->argc); -} \ No newline at end of file +} diff --git a/src/tools/my_cpuid.c b/src/tools/my_cpuid.c index 3aaf9d51..793f8d7f 100644 --- a/src/tools/my_cpuid.c +++ b/src/tools/my_cpuid.c @@ -36,8 +36,8 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u) R_ECX = 0x6C65746E; break; case 0x1: - R_EAX = 0x00000601; // familly and all - R_EBX = 0; // Brand indexe, CLFlush, Max APIC ID, Local APIC ID + R_EAX = 0x00000601; // family and all + R_EBX = 0; // Brand index, CLFlush, Max APIC ID, Local APIC ID R_EDX = 1 // fpu | 1<<4 // rdtsc | 1<<8 // cmpxchg8 @@ -108,10 +108,10 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u) R_EDX = 0; break; case 0x7: // extended bits... - /*if(R_ECX==0) R_EAX = 0; - else*/ R_EAX = R_ECX = R_EBX = R_EDX = 0; + if(R_ECX==1) R_EAX = 0; // Bit 5 is avx512_bf16 + else R_EAX = R_ECX = R_EBX = R_EDX = 0; // TODO break; - case 0xB: // Extended Topology Enumaretion Leaf + case 0xB: // Extended Topology Enumeration Leaf //TODO! R_EAX = 0; break; @@ -138,7 +138,7 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u) R_EAX = 0; // reserved R_EBX = 0; // reserved R_ECX = (1<<5) | (1<<8); // LZCNT | PREFETCHW - R_EDX = 0; + R_EDX = 1; // x87 FPU break; case 0x80000002: // Brand part 1 (P4 signature) R_EAX = 0x20202020; diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index bdbda443..eef2095b 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -1,4 +1,3 @@ -#() iF #() vFE #() vFv #() vFi @@ -102,7 +101,6 @@ #() iFui #() iFuu #() iFup -#() iFUU #() iFli #() iFLL #() iFLp @@ -234,6 +232,7 @@ #() iFEip #() iFEWW #() iFEup +#() iFEUU #() iFEpi #() iFEpL #() iFEpp @@ -1186,6 +1185,7 @@ #!defined(HAVE_LD80BITS) KFK #!defined(HAVE_LD80BITS) KFKK #!defined(HAVE_LD80BITS) KFKp +#() vFEv -> vFE #() lFEv -> lFE #() LFEv -> LFE #() pFEv -> pFE diff --git a/src/wrapped/generated/wrappedbz2types.h b/src/wrapped/generated/wrappedbz2types.h new file mode 100644 index 00000000..7ea64a63 --- /dev/null +++ b/src/wrapped/generated/wrappedbz2types.h @@ -0,0 +1,27 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedbz2TYPES_H_ +#define __wrappedbz2TYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFp_t)(void*); +typedef int64_t (*iFpi_t)(void*, int64_t); +typedef int64_t (*iFpii_t)(void*, int64_t, int64_t); +typedef int64_t (*iFpiii_t)(void*, int64_t, int64_t, int64_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(BZ2_bzCompressEnd, iFp_t) \ + GO(BZ2_bzDecompress, iFp_t) \ + GO(BZ2_bzDecompressEnd, iFp_t) \ + GO(BZ2_bzCompress, iFpi_t) \ + GO(BZ2_bzDecompressInit, iFpii_t) \ + GO(BZ2_bzCompressInit, iFpiii_t) + +#endif // __wrappedbz2TYPES_H_ diff --git a/src/wrapped/generated/wrappedcryptotypes.h b/src/wrapped/generated/wrappedcryptotypes.h new file mode 100644 index 00000000..30d8180f --- /dev/null +++ b/src/wrapped/generated/wrappedcryptotypes.h @@ -0,0 +1,37 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedcryptoTYPES_H_ +#define __wrappedcryptoTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFp_t)(void*); +typedef void* (*pFp_t)(void*); +typedef void (*vFpp_t)(void*, void*); +typedef void* (*pFpppp_t)(void*, void*, void*, void*); +typedef int64_t (*iFpiipp_t)(void*, int64_t, int64_t, void*, void*); +typedef int64_t (*iFppppipp_t)(void*, void*, void*, void*, int64_t, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(CRYPTO_set_id_callback, vFp_t) \ + GO(CRYPTO_set_locking_callback, vFp_t) \ + GO(sk_new, pFp_t) \ + GO(sk_pop_free, vFpp_t) \ + GO(PEM_read_bio_DSAPrivateKey, pFpppp_t) \ + GO(PEM_read_bio_DSA_PUBKEY, pFpppp_t) \ + GO(PEM_read_bio_ECPrivateKey, pFpppp_t) \ + GO(PEM_read_bio_EC_PUBKEY, pFpppp_t) \ + GO(PEM_read_bio_RSAPrivateKey, pFpppp_t) \ + GO(PEM_read_bio_RSA_PUBKEY, pFpppp_t) \ + GO(ENGINE_ctrl, iFpiipp_t) \ + GO(PEM_write_bio_DSAPrivateKey, iFppppipp_t) \ + GO(PEM_write_bio_ECPrivateKey, iFppppipp_t) \ + GO(PEM_write_bio_RSAPrivateKey, iFppppipp_t) + +#endif // __wrappedcryptoTYPES_H_ diff --git a/src/wrapped/generated/wrappedcurltypes.h b/src/wrapped/generated/wrappedcurltypes.h new file mode 100644 index 00000000..5f0cccfd --- /dev/null +++ b/src/wrapped/generated/wrappedcurltypes.h @@ -0,0 +1,19 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedcurlTYPES_H_ +#define __wrappedcurlTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef uint64_t (*uFpup_t)(void*, uint64_t, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(curl_easy_setopt, uFpup_t) + +#endif // __wrappedcurlTYPES_H_ diff --git a/src/wrapped/generated/wrappeddbustypes.h b/src/wrapped/generated/wrappeddbustypes.h new file mode 100644 index 00000000..ea6dd689 --- /dev/null +++ b/src/wrapped/generated/wrappeddbustypes.h @@ -0,0 +1,39 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappeddbusTYPES_H_ +#define __wrappeddbusTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFppp_t)(void*, void*, void*); +typedef void (*vFpppp_t)(void*, void*, void*, void*); +typedef int64_t (*iFpipp_t)(void*, int64_t, void*, void*); +typedef int64_t (*iFppip_t)(void*, void*, int64_t, void*); +typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); +typedef int64_t (*iFppppp_t)(void*, void*, void*, void*, void*); +typedef int64_t (*iFpppppp_t)(void*, void*, void*, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(dbus_connection_remove_filter, vFppp_t) \ + GO(dbus_timeout_set_data, vFppp_t) \ + GO(dbus_watch_set_data, vFppp_t) \ + GO(dbus_connection_set_dispatch_status_function, vFpppp_t) \ + GO(dbus_connection_set_wakeup_main_function, vFpppp_t) \ + GO(dbus_connection_set_data, iFpipp_t) \ + GO(dbus_message_set_data, iFpipp_t) \ + GO(dbus_pending_call_set_data, iFpipp_t) \ + GO(dbus_message_get_args_valist, iFppip_t) \ + GO(dbus_connection_add_filter, iFpppp_t) \ + GO(dbus_pending_call_set_notify, iFpppp_t) \ + GO(dbus_connection_try_register_fallback, iFppppp_t) \ + GO(dbus_connection_try_register_object_path, iFppppp_t) \ + GO(dbus_connection_set_timeout_functions, iFpppppp_t) \ + GO(dbus_connection_set_watch_functions, iFpppppp_t) + +#endif // __wrappeddbusTYPES_H_ diff --git a/src/wrapped/generated/wrappedfontconfigtypes.h b/src/wrapped/generated/wrappedfontconfigtypes.h new file mode 100644 index 00000000..46e77c3f --- /dev/null +++ b/src/wrapped/generated/wrappedfontconfigtypes.h @@ -0,0 +1,19 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedfontconfigTYPES_H_ +#define __wrappedfontconfigTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFppiLi_t)(void*, void*, int64_t, uintptr_t, int64_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(FcPatternAddWeak, iFppiLi_t) + +#endif // __wrappedfontconfigTYPES_H_ diff --git a/src/wrapped/generated/wrappedfreetypetypes.h b/src/wrapped/generated/wrappedfreetypetypes.h new file mode 100644 index 00000000..9378eb8f --- /dev/null +++ b/src/wrapped/generated/wrappedfreetypetypes.h @@ -0,0 +1,21 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedfreetypeTYPES_H_ +#define __wrappedfreetypeTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFpplp_t)(void*, void*, intptr_t, void*); +typedef int64_t (*iFpuuLppp_t)(void*, uint64_t, uint64_t, uintptr_t, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(FT_Open_Face, iFpplp_t) \ + GO(FTC_Manager_New, iFpuuLppp_t) + +#endif // __wrappedfreetypeTYPES_H_ diff --git a/src/wrapped/generated/wrappedgnutlstypes.h b/src/wrapped/generated/wrappedgnutlstypes.h new file mode 100644 index 00000000..d465739c --- /dev/null +++ b/src/wrapped/generated/wrappedgnutlstypes.h @@ -0,0 +1,22 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedgnutlsTYPES_H_ +#define __wrappedgnutlsTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFp_t)(void*); +typedef void (*vFpp_t)(void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(gnutls_global_set_log_function, vFp_t) \ + GO(gnutls_transport_set_pull_function, vFpp_t) \ + GO(gnutls_transport_set_push_function, vFpp_t) + +#endif // __wrappedgnutlsTYPES_H_ diff --git a/src/wrapped/generated/wrappedldlinuxtypes.h b/src/wrapped/generated/wrappedldlinuxtypes.h new file mode 100644 index 00000000..4a7a4158 --- /dev/null +++ b/src/wrapped/generated/wrappedldlinuxtypes.h @@ -0,0 +1,19 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedldlinuxTYPES_H_ +#define __wrappedldlinuxTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void* (*pFp_t)(void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(__tls_get_addr, pFp_t) + +#endif // __wrappedldlinuxTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibasoundtypes.h b/src/wrapped/generated/wrappedlibasoundtypes.h new file mode 100644 index 00000000..ab06d481 --- /dev/null +++ b/src/wrapped/generated/wrappedlibasoundtypes.h @@ -0,0 +1,28 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibasoundTYPES_H_ +#define __wrappedlibasoundTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFp_t)(void*); +typedef void* (*pFppp_t)(void*, void*, void*); +typedef int64_t (*iFpipp_t)(void*, int64_t, void*, void*); +typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); +typedef void* (*pFpipL_t)(void*, int64_t, void*, uintptr_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(snd_dlclose, iFp_t) \ + GO(snd_lib_error_set_handler, iFp_t) \ + GO(snd_dlsym, pFppp_t) \ + GO(snd_async_add_handler, iFpipp_t) \ + GO(snd_async_add_pcm_handler, iFpppp_t) \ + GO(snd_dlopen, pFpipL_t) + +#endif // __wrappedlibasoundTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibctypes.h b/src/wrapped/generated/wrappedlibctypes.h new file mode 100644 index 00000000..d20ca9a3 --- /dev/null +++ b/src/wrapped/generated/wrappedlibctypes.h @@ -0,0 +1,167 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibcTYPES_H_ +#define __wrappedlibcTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFv_t)(void); +typedef void (*vFp_t)(void*); +typedef int64_t (*iFp_t)(void*); +typedef intptr_t (*lFv_t)(void); +typedef uintptr_t (*LFv_t)(void); +typedef void (*vFpi_t)(void*, int64_t); +typedef void (*vFpu_t)(void*, uint64_t); +typedef int64_t (*iFpi_t)(void*, int64_t); +typedef int64_t (*iFpL_t)(void*, uintptr_t); +typedef int64_t (*iFpp_t)(void*, void*); +typedef int64_t (*iFpV_t)(void*, void*); +typedef int64_t (*iFSp_t)(void*, void*); +typedef void* (*pFip_t)(int64_t, void*); +typedef void* (*pFpi_t)(void*, int64_t); +typedef void* (*pFpp_t)(void*, void*); +typedef void (*vFipV_t)(int64_t, void*, void*); +typedef void (*vFpii_t)(void*, int64_t, int64_t); +typedef void (*vFpup_t)(void*, uint64_t, void*); +typedef int64_t (*iFiip_t)(int64_t, int64_t, void*); +typedef int64_t (*iFiiN_t)(int64_t, int64_t, ...); +typedef int64_t (*iFipp_t)(int64_t, void*, void*); +typedef int64_t (*iFipV_t)(int64_t, void*, void*); +typedef int64_t (*iFpLi_t)(void*, uintptr_t, int64_t); +typedef int64_t (*iFppi_t)(void*, void*, int64_t); +typedef int64_t (*iFppp_t)(void*, void*, void*); +typedef int64_t (*iFppV_t)(void*, void*, void*); +typedef int64_t (*iFpOu_t)(void*, int32_t, uint64_t); +typedef intptr_t (*lFppL_t)(void*, void*, uintptr_t); +typedef void* (*pFpip_t)(void*, int64_t, void*); +typedef void (*vFiipV_t)(int64_t, int64_t, void*, void*); +typedef void (*vFpLLp_t)(void*, uintptr_t, uintptr_t, void*); +typedef int64_t (*iFpipp_t)(void*, int64_t, void*, void*); +typedef int64_t (*iFpipV_t)(void*, int64_t, void*, void*); +typedef int64_t (*iFpLpp_t)(void*, uintptr_t, void*, void*); +typedef int64_t (*iFpLpV_t)(void*, uintptr_t, void*, void*); +typedef int64_t (*iFppii_t)(void*, void*, int64_t, int64_t); +typedef int64_t (*iFppiV_t)(void*, void*, int64_t, void*); +typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); +typedef void (*vFpLLpp_t)(void*, uintptr_t, uintptr_t, void*, void*); +typedef int64_t (*iFiippi_t)(int64_t, int64_t, void*, void*, int64_t); +typedef int64_t (*iFpilpV_t)(void*, int64_t, intptr_t, void*, void*); +typedef int64_t (*iFpuppp_t)(void*, uint64_t, void*, void*, void*); +typedef void* (*pFpLLiN_t)(void*, uintptr_t, uintptr_t, int64_t, ...); +typedef void* (*pFppLLp_t)(void*, void*, uintptr_t, uintptr_t, void*); +typedef void* (*pFpppLp_t)(void*, void*, void*, uintptr_t, void*); +typedef int64_t (*iFpLiLpV_t)(void*, uintptr_t, int64_t, uintptr_t, void*, void*); +typedef void* (*pFpLiiiI_t)(void*, uintptr_t, int64_t, int64_t, int64_t, int64_t); +typedef int64_t (*iFpippppp_t)(void*, int64_t, void*, void*, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(__stack_chk_fail, vFv_t) \ + GO(_ITM_deregisterTMCloneTable, vFp_t) \ + GO(__cxa_finalize, vFp_t) \ + GO(__sigsetjmp, iFp_t) \ + GO(_setjmp, iFp_t) \ + GO(getcontext, iFp_t) \ + GO(setjmp, iFp_t) \ + GO(fork, lFv_t) \ + GO(syscall, LFv_t) \ + GO(__longjmp_chk, vFpi_t) \ + GO(_longjmp, vFpi_t) \ + GO(longjmp, vFpi_t) \ + GO(_ITM_registerTMCloneTable, vFpu_t) \ + GO(backtrace, iFpi_t) \ + GO(munmap, iFpL_t) \ + GO(__vprintf_chk, iFpp_t) \ + GO(dl_iterate_phdr, iFpp_t) \ + GO(execvp, iFpp_t) \ + GO(sigaltstack, iFpp_t) \ + GO(swapcontext, iFpp_t) \ + GO(vprintf, iFpp_t) \ + GO(execlp, iFpV_t) \ + GO(printf, iFpV_t) \ + GO(_IO_file_stat, iFSp_t) \ + GO(__sysv_signal, pFip_t) \ + GO(signal, pFip_t) \ + GO(sigset, pFip_t) \ + GO(sysv_signal, pFip_t) \ + GO(backtrace_symbols, pFpi_t) \ + GO(__realpath_chk, pFpp_t) \ + GO(fopen, pFpp_t) \ + GO(fopen64, pFpp_t) \ + GO(realpath, pFpp_t) \ + GO(syslog, vFipV_t) \ + GO(backtrace_symbols_fd, vFpii_t) \ + GO(_ITM_addUserCommitAction, vFpup_t) \ + GO(__fxstat, iFiip_t) \ + GO(__fxstat64, iFiip_t) \ + GO(__fcntl, iFiiN_t) \ + GO(fcntl, iFiiN_t) \ + GO(fcntl64, iFiiN_t) \ + GO(__lxstat, iFipp_t) \ + GO(__lxstat64, iFipp_t) \ + GO(__sigaction, iFipp_t) \ + GO(__xstat, iFipp_t) \ + GO(__xstat64, iFipp_t) \ + GO(sigaction, iFipp_t) \ + GO(__printf_chk, iFipV_t) \ + GO(mprotect, iFpLi_t) \ + GO(ftw, iFppi_t) \ + GO(ftw64, iFppi_t) \ + GO(__cxa_atexit, iFppp_t) \ + GO(__isoc99_vsscanf, iFppp_t) \ + GO(__vfprintf_chk, iFppp_t) \ + GO(__vsscanf, iFppp_t) \ + GO(vasprintf, iFppp_t) \ + GO(vfprintf, iFppp_t) \ + GO(vsscanf, iFppp_t) \ + GO(__isoc99_fscanf, iFppV_t) \ + GO(__isoc99_sscanf, iFppV_t) \ + GO(fprintf, iFppV_t) \ + GO(fscanf, iFppV_t) \ + GO(sprintf, iFppV_t) \ + GO(sscanf, iFppV_t) \ + GO(swscanf, iFppV_t) \ + GO(__open, iFpOu_t) \ + GO(open, iFpOu_t) \ + GO(open64, iFpOu_t) \ + GO(readlink, lFppL_t) \ + GO(fts_open, pFpip_t) \ + GO(__syslog_chk, vFiipV_t) \ + GO(qsort, vFpLLp_t) \ + GO(__vasprintf_chk, iFpipp_t) \ + GO(glob64, iFpipp_t) \ + GO(__fprintf_chk, iFpipV_t) \ + GO(__vsnprintf, iFpLpp_t) \ + GO(__vsnprintf_chk, iFpLpp_t) \ + GO(vsnprintf, iFpLpp_t) \ + GO(__snprintf, iFpLpV_t) \ + GO(snprintf, iFpLpV_t) \ + GO(swprintf, iFpLpV_t) \ + GO(nftw64, iFppii_t) \ + GO(makecontext, iFppiV_t) \ + GO(__register_atfork, iFpppp_t) \ + GO(__vsprintf_chk, iFpppp_t) \ + GO(scandir64, iFpppp_t) \ + GO(vsprintf, iFpppp_t) \ + GO(qsort_r, vFpLLpp_t) \ + GO(__fxstatat, iFiippi_t) \ + GO(__fxstatat64, iFiippi_t) \ + GO(__sprintf_chk, iFpilpV_t) \ + GO(__vswprintf_chk, iFpuppp_t) \ + GO(vswprintf, iFpuppp_t) \ + GO(mremap, pFpLLiN_t) \ + GO(bsearch, pFppLLp_t) \ + GO(lfind, pFpppLp_t) \ + GO(lsearch, pFpppLp_t) \ + GO(__snprintf_chk, iFpLiLpV_t) \ + GO(__swprintf_chk, iFpLiLpV_t) \ + GO(mmap, pFpLiiiI_t) \ + GO(mmap64, pFpLiiiI_t) \ + GO(__libc_start_main, iFpippppp_t) + +#endif // __wrappedlibcTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibdltypes.h b/src/wrapped/generated/wrappedlibdltypes.h new file mode 100644 index 00000000..9a903f6d --- /dev/null +++ b/src/wrapped/generated/wrappedlibdltypes.h @@ -0,0 +1,33 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibdlTYPES_H_ +#define __wrappedlibdlTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFp_t)(void*); +typedef void* (*pFv_t)(void); +typedef int64_t (*iFpp_t)(void*, void*); +typedef void* (*pFpi_t)(void*, int64_t); +typedef void* (*pFpp_t)(void*, void*); +typedef int64_t (*iFpip_t)(void*, int64_t, void*); +typedef void* (*pFppi_t)(void*, void*, int64_t); +typedef void* (*pFppp_t)(void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(dlclose, iFp_t) \ + GO(dlerror, pFv_t) \ + GO(dladdr, iFpp_t) \ + GO(dlopen, pFpi_t) \ + GO(dlsym, pFpp_t) \ + GO(dlinfo, iFpip_t) \ + GO(dlmopen, pFppi_t) \ + GO(dlvsym, pFppp_t) + +#endif // __wrappedlibdlTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibgltypes.h b/src/wrapped/generated/wrappedlibgltypes.h new file mode 100644 index 00000000..463bced6 --- /dev/null +++ b/src/wrapped/generated/wrappedlibgltypes.h @@ -0,0 +1,23 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibglTYPES_H_ +#define __wrappedlibglTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void* (*pFp_t)(void*); +typedef void (*vFpp_t)(void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(glXGetProcAddress, pFp_t) \ + GO(glXGetProcAddressARB, pFp_t) \ + GO(glDebugMessageCallback, vFpp_t) \ + GO(glDebugMessageCallbackARB, vFpp_t) + +#endif // __wrappedlibglTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibglutypes.h b/src/wrapped/generated/wrappedlibglutypes.h new file mode 100644 index 00000000..c3f295fa --- /dev/null +++ b/src/wrapped/generated/wrappedlibglutypes.h @@ -0,0 +1,21 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibgluTYPES_H_ +#define __wrappedlibgluTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFpip_t)(void*, int64_t, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(gluNurbsCallback, vFpip_t) \ + GO(gluQuadricCallback, vFpip_t) \ + GO(gluTessCallback, vFpip_t) + +#endif // __wrappedlibgluTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibpthreadtypes.h b/src/wrapped/generated/wrappedlibpthreadtypes.h new file mode 100644 index 00000000..6b2f2751 --- /dev/null +++ b/src/wrapped/generated/wrappedlibpthreadtypes.h @@ -0,0 +1,66 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibpthreadTYPES_H_ +#define __wrappedlibpthreadTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFp_t)(void*); +typedef int64_t (*iFp_t)(void*); +typedef void (*vFpi_t)(void*, int64_t); +typedef int64_t (*iFpi_t)(void*, int64_t); +typedef int64_t (*iFpL_t)(void*, uintptr_t); +typedef int64_t (*iFpp_t)(void*, void*); +typedef void (*vFppp_t)(void*, void*, void*); +typedef int64_t (*iFpLp_t)(void*, uintptr_t, void*); +typedef int64_t (*iFppL_t)(void*, void*, uintptr_t); +typedef int64_t (*iFppp_t)(void*, void*, void*); +typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(__pthread_register_cancel, vFp_t) \ + GO(__pthread_unregister_cancel, vFp_t) \ + GO(__pthread_unwind_next, vFp_t) \ + GO(pthread_attr_destroy, iFp_t) \ + GO(pthread_attr_init, iFp_t) \ + GO(_pthread_cleanup_pop, vFpi_t) \ + GO(_pthread_cleanup_pop_restore, vFpi_t) \ + GO(pthread_attr_setdetachstate, iFpi_t) \ + GO(pthread_attr_setinheritsched, iFpi_t) \ + GO(pthread_attr_setschedpolicy, iFpi_t) \ + GO(pthread_attr_setscope, iFpi_t) \ + GO(pthread_kill, iFpi_t) \ + GO(pthread_attr_setguardsize, iFpL_t) \ + GO(pthread_attr_setstacksize, iFpL_t) \ + GO(__pthread_key_create, iFpp_t) \ + GO(__pthread_once, iFpp_t) \ + GO(pthread_attr_getdetachstate, iFpp_t) \ + GO(pthread_attr_getguardsize, iFpp_t) \ + GO(pthread_attr_getinheritsched, iFpp_t) \ + GO(pthread_attr_getschedparam, iFpp_t) \ + GO(pthread_attr_getschedpolicy, iFpp_t) \ + GO(pthread_attr_getscope, iFpp_t) \ + GO(pthread_attr_getstackaddr, iFpp_t) \ + GO(pthread_attr_getstacksize, iFpp_t) \ + GO(pthread_attr_setschedparam, iFpp_t) \ + GO(pthread_attr_setstackaddr, iFpp_t) \ + GO(pthread_cond_wait, iFpp_t) \ + GO(pthread_key_create, iFpp_t) \ + GO(pthread_once, iFpp_t) \ + GO(_pthread_cleanup_push, vFppp_t) \ + GO(_pthread_cleanup_push_defer, vFppp_t) \ + GO(pthread_attr_setaffinity_np, iFpLp_t) \ + GO(pthread_attr_setstack, iFppL_t) \ + GO(__pthread_atfork, iFppp_t) \ + GO(pthread_atfork, iFppp_t) \ + GO(pthread_attr_getstack, iFppp_t) \ + GO(pthread_cond_timedwait, iFppp_t) \ + GO(pthread_create, iFpppp_t) + +#endif // __wrappedlibpthreadTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibrttypes.h b/src/wrapped/generated/wrappedlibrttypes.h new file mode 100644 index 00000000..f3c61b10 --- /dev/null +++ b/src/wrapped/generated/wrappedlibrttypes.h @@ -0,0 +1,19 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibrtTYPES_H_ +#define __wrappedlibrtTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFupp_t)(uint64_t, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(timer_create, iFupp_t) + +#endif // __wrappedlibrtTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibsmtypes.h b/src/wrapped/generated/wrappedlibsmtypes.h new file mode 100644 index 00000000..27f9c636 --- /dev/null +++ b/src/wrapped/generated/wrappedlibsmtypes.h @@ -0,0 +1,23 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibsmTYPES_H_ +#define __wrappedlibsmTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFppp_t)(void*, void*, void*); +typedef int64_t (*iFpipp_t)(void*, int64_t, void*, void*); +typedef void* (*pFppiiLpppip_t)(void*, void*, int64_t, int64_t, uintptr_t, void*, void*, void*, int64_t, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(SmcRequestSaveYourselfPhase2, iFppp_t) \ + GO(SmcInteractRequest, iFpipp_t) \ + GO(SmcOpenConnection, pFppiiLpppip_t) + +#endif // __wrappedlibsmTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibssltypes.h b/src/wrapped/generated/wrappedlibssltypes.h new file mode 100644 index 00000000..a56ea812 --- /dev/null +++ b/src/wrapped/generated/wrappedlibssltypes.h @@ -0,0 +1,30 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibsslTYPES_H_ +#define __wrappedlibsslTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFpp_t)(void*, void*); +typedef void (*vFpip_t)(void*, int64_t, void*); +typedef void (*vFppp_t)(void*, void*, void*); +typedef intptr_t (*lFpip_t)(void*, int64_t, void*); +typedef int64_t (*iFlpppp_t)(intptr_t, void*, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(SSL_CTX_set_default_passwd_cb, vFpp_t) \ + GO(SSL_set_psk_client_callback, vFpp_t) \ + GO(SSL_CTX_set_verify, vFpip_t) \ + GO(SSL_set_verify, vFpip_t) \ + GO(SSL_CTX_set_next_proto_select_cb, vFppp_t) \ + GO(SSL_CTX_callback_ctrl, lFpip_t) \ + GO(SSL_callback_ctrl, lFpip_t) \ + GO(SSL_get_ex_new_index, iFlpppp_t) + +#endif // __wrappedlibsslTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibx11types.h b/src/wrapped/generated/wrappedlibx11types.h new file mode 100644 index 00000000..0810f2a3 --- /dev/null +++ b/src/wrapped/generated/wrappedlibx11types.h @@ -0,0 +1,54 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibx11TYPES_H_ +#define __wrappedlibx11TYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFp_t)(void*); +typedef void* (*pFp_t)(void*); +typedef void (*vFpp_t)(void*, void*); +typedef void* (*pFpi_t)(void*, int64_t); +typedef void* (*pFpp_t)(void*, void*); +typedef int64_t (*iFppp_t)(void*, void*, void*); +typedef void* (*pFpip_t)(void*, int64_t, void*); +typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); +typedef int64_t (*iFppppp_t)(void*, void*, void*, void*, void*); +typedef int64_t (*iFpppppp_t)(void*, void*, void*, void*, void*, void*); +typedef void* (*pFppiiuuLi_t)(void*, void*, int64_t, int64_t, uint64_t, uint64_t, uintptr_t, int64_t); +typedef int64_t (*iFppppiiiiuu_t)(void*, void*, void*, void*, int64_t, int64_t, int64_t, int64_t, uint64_t, uint64_t); +typedef void* (*pFppuiipuuii_t)(void*, void*, uint64_t, int64_t, int64_t, void*, uint64_t, uint64_t, int64_t, int64_t); +typedef void* (*pFppiiuuuipii_t)(void*, void*, int64_t, int64_t, uint64_t, uint64_t, uint64_t, int64_t, void*, int64_t, int64_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(XDestroyImage, iFp_t) \ + GO(XInitImage, iFp_t) \ + GO(XSetErrorHandler, pFp_t) \ + GO(XSetIOErrorHandler, pFp_t) \ + GO(_XDeqAsyncHandler, vFpp_t) \ + GO(XSynchronize, pFpi_t) \ + GO(XSetAfterFunction, pFpp_t) \ + GO(XAddConnectionWatch, iFppp_t) \ + GO(XRemoveConnectionWatch, iFppp_t) \ + GO(XESetCloseDisplay, pFpip_t) \ + GO(XESetError, pFpip_t) \ + GO(XESetEventToWire, pFpip_t) \ + GO(XESetWireToEvent, pFpip_t) \ + GO(XCheckIfEvent, iFpppp_t) \ + GO(XIfEvent, iFpppp_t) \ + GO(XPeekIfEvent, iFpppp_t) \ + GO(XQueryExtension, iFppppp_t) \ + GO(XRegisterIMInstantiateCallback, iFpppppp_t) \ + GO(XUnregisterIMInstantiateCallback, iFpppppp_t) \ + GO(XGetImage, pFppiiuuLi_t) \ + GO(XPutImage, iFppppiiiiuu_t) \ + GO(XCreateImage, pFppuiipuuii_t) \ + GO(XGetSubImage, pFppiiuuuipii_t) + +#endif // __wrappedlibx11TYPES_H_ diff --git a/src/wrapped/generated/wrappedlibxexttypes.h b/src/wrapped/generated/wrappedlibxexttypes.h new file mode 100644 index 00000000..cb48dac5 --- /dev/null +++ b/src/wrapped/generated/wrappedlibxexttypes.h @@ -0,0 +1,27 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibxextTYPES_H_ +#define __wrappedlibxextTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void* (*pFp_t)(void*); +typedef int64_t (*iFpppiiu_t)(void*, void*, void*, int64_t, int64_t, uint64_t); +typedef void* (*pFppppip_t)(void*, void*, void*, void*, int64_t, void*); +typedef void* (*pFppuippuu_t)(void*, void*, uint64_t, int64_t, void*, void*, uint64_t, uint64_t); +typedef int64_t (*iFppppiiiiuui_t)(void*, void*, void*, void*, int64_t, int64_t, int64_t, int64_t, uint64_t, uint64_t, int64_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(XSetExtensionErrorHandler, pFp_t) \ + GO(XShmGetImage, iFpppiiu_t) \ + GO(XextAddDisplay, pFppppip_t) \ + GO(XShmCreateImage, pFppuippuu_t) \ + GO(XShmPutImage, iFppppiiiiuui_t) + +#endif // __wrappedlibxextTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibxtsttypes.h b/src/wrapped/generated/wrappedlibxtsttypes.h new file mode 100644 index 00000000..f13097ea --- /dev/null +++ b/src/wrapped/generated/wrappedlibxtsttypes.h @@ -0,0 +1,20 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibxtstTYPES_H_ +#define __wrappedlibxtstTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(XRecordEnableContext, iFpppp_t) \ + GO(XRecordEnableContextAsync, iFpppp_t) + +#endif // __wrappedlibxtstTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibxttypes.h b/src/wrapped/generated/wrappedlibxttypes.h new file mode 100644 index 00000000..8d49e866 --- /dev/null +++ b/src/wrapped/generated/wrappedlibxttypes.h @@ -0,0 +1,19 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibxtTYPES_H_ +#define __wrappedlibxtTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFpuipp_t)(void*, uint64_t, int64_t, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(XtAddEventHandler, vFpuipp_t) + +#endif // __wrappedlibxtTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibztypes.h b/src/wrapped/generated/wrappedlibztypes.h new file mode 100644 index 00000000..b2201a7d --- /dev/null +++ b/src/wrapped/generated/wrappedlibztypes.h @@ -0,0 +1,28 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedlibzTYPES_H_ +#define __wrappedlibzTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFp_t)(void*); +typedef int64_t (*iFppi_t)(void*, void*, int64_t); +typedef int64_t (*iFpipi_t)(void*, int64_t, void*, int64_t); +typedef int64_t (*iFpiiiiipi_t)(void*, int64_t, int64_t, int64_t, int64_t, int64_t, void*, int64_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(deflateEnd, iFp_t) \ + GO(inflateEnd, iFp_t) \ + GO(inflateInit, iFp_t) \ + GO(inflateInit_, iFppi_t) \ + GO(deflateInit_, iFpipi_t) \ + GO(inflateInit2_, iFpipi_t) \ + GO(deflateInit2_, iFpiiiiipi_t) + +#endif // __wrappedlibzTYPES_H_ diff --git a/src/wrapped/generated/wrappedopenaltypes.h b/src/wrapped/generated/wrappedopenaltypes.h new file mode 100644 index 00000000..6889c3ba --- /dev/null +++ b/src/wrapped/generated/wrappedopenaltypes.h @@ -0,0 +1,25 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedopenalTYPES_H_ +#define __wrappedopenalTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFv_t)(void); +typedef void* (*pFp_t)(void*); +typedef void* (*pFpp_t)(void*, void*); +typedef void (*vFiiipp_t)(int64_t, int64_t, int64_t, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(alRequestFoldbackStop, vFv_t) \ + GO(alGetProcAddress, pFp_t) \ + GO(alcGetProcAddress, pFpp_t) \ + GO(alRequestFoldbackStart, vFiiipp_t) + +#endif // __wrappedopenalTYPES_H_ diff --git a/src/wrapped/generated/wrappedpangotypes.h b/src/wrapped/generated/wrappedpangotypes.h new file mode 100644 index 00000000..7e535062 --- /dev/null +++ b/src/wrapped/generated/wrappedpangotypes.h @@ -0,0 +1,19 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedpangoTYPES_H_ +#define __wrappedpangoTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFpp_t)(void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(pango_attribute_init, vFpp_t) + +#endif // __wrappedpangoTYPES_H_ diff --git a/src/wrapped/generated/wrappedpulsetypes.h b/src/wrapped/generated/wrappedpulsetypes.h new file mode 100644 index 00000000..2fc994fd --- /dev/null +++ b/src/wrapped/generated/wrappedpulsetypes.h @@ -0,0 +1,102 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedpulseTYPES_H_ +#define __wrappedpulseTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFp_t)(void*); +typedef int64_t (*iFp_t)(void*); +typedef void* (*pFp_t)(void*); +typedef void (*vFpp_t)(void*, void*); +typedef void* (*pFpp_t)(void*, void*); +typedef void (*vFppp_t)(void*, void*, void*); +typedef void* (*pFipp_t)(int64_t, void*, void*); +typedef void* (*pFppp_t)(void*, void*, void*); +typedef int64_t (*iFppip_t)(void*, void*, int64_t, void*); +typedef int64_t (*iFpppV_t)(void*, void*, void*, void*); +typedef void* (*pFpipp_t)(void*, int64_t, void*, void*); +typedef void* (*pFpupp_t)(void*, uint64_t, void*, void*); +typedef void* (*pFpppp_t)(void*, void*, void*, void*); +typedef void* (*pFpippp_t)(void*, int64_t, void*, void*, void*); +typedef void* (*pFpuipp_t)(void*, uint64_t, int64_t, void*, void*); +typedef void* (*pFpuupp_t)(void*, uint64_t, uint64_t, void*, void*); +typedef void* (*pFpuppp_t)(void*, uint64_t, void*, void*, void*); +typedef void* (*pFppppp_t)(void*, void*, void*, void*, void*); +typedef int64_t (*iFppLpIi_t)(void*, void*, uintptr_t, void*, int64_t, int64_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(pa_mainloop_free, vFp_t) \ + GO(pa_threaded_mainloop_free, vFp_t) \ + GO(pa_signal_init, iFp_t) \ + GO(pa_mainloop_get_api, pFp_t) \ + GO(pa_threaded_mainloop_get_api, pFp_t) \ + GO(pa_signal_set_destroy, vFpp_t) \ + GO(pa_context_new, pFpp_t) \ + GO(pa_context_set_event_callback, vFppp_t) \ + GO(pa_context_set_state_callback, vFppp_t) \ + GO(pa_context_set_subscribe_callback, vFppp_t) \ + GO(pa_mainloop_set_poll_func, vFppp_t) \ + GO(pa_stream_set_buffer_attr_callback, vFppp_t) \ + GO(pa_stream_set_event_callback, vFppp_t) \ + GO(pa_stream_set_latency_update_callback, vFppp_t) \ + GO(pa_stream_set_moved_callback, vFppp_t) \ + GO(pa_stream_set_overflow_callback, vFppp_t) \ + GO(pa_stream_set_read_callback, vFppp_t) \ + GO(pa_stream_set_started_callback, vFppp_t) \ + GO(pa_stream_set_state_callback, vFppp_t) \ + GO(pa_stream_set_suspended_callback, vFppp_t) \ + GO(pa_stream_set_underflow_callback, vFppp_t) \ + GO(pa_stream_set_write_callback, vFppp_t) \ + GO(pa_signal_new, pFipp_t) \ + GO(pa_context_drain, pFppp_t) \ + GO(pa_context_exit_daemon, pFppp_t) \ + GO(pa_context_get_client_info_list, pFppp_t) \ + GO(pa_context_get_module_info_list, pFppp_t) \ + GO(pa_context_get_server_info, pFppp_t) \ + GO(pa_context_get_sink_info_list, pFppp_t) \ + GO(pa_context_get_sink_input_info_list, pFppp_t) \ + GO(pa_context_get_source_info_list, pFppp_t) \ + GO(pa_context_new_with_proplist, pFppp_t) \ + GO(pa_stream_drain, pFppp_t) \ + GO(pa_stream_flush, pFppp_t) \ + GO(pa_stream_prebuf, pFppp_t) \ + GO(pa_stream_trigger, pFppp_t) \ + GO(pa_stream_update_timing_info, pFppp_t) \ + GO(pa_context_connect, iFppip_t) \ + GO(pa_proplist_setf, iFpppV_t) \ + GO(pa_stream_cork, pFpipp_t) \ + GO(pa_context_get_sink_info_by_index, pFpupp_t) \ + GO(pa_context_get_sink_input_info, pFpupp_t) \ + GO(pa_context_get_source_info_by_index, pFpupp_t) \ + GO(pa_context_subscribe, pFpupp_t) \ + GO(pa_context_unload_module, pFpupp_t) \ + GO(pa_stream_update_sample_rate, pFpupp_t) \ + GO(pa_context_get_sink_info_by_name, pFpppp_t) \ + GO(pa_context_get_source_info_by_name, pFpppp_t) \ + GO(pa_context_proplist_remove, pFpppp_t) \ + GO(pa_context_set_default_sink, pFpppp_t) \ + GO(pa_context_set_default_source, pFpppp_t) \ + GO(pa_context_set_name, pFpppp_t) \ + GO(pa_stream_proplist_remove, pFpppp_t) \ + GO(pa_stream_set_buffer_attr, pFpppp_t) \ + GO(pa_stream_set_name, pFpppp_t) \ + GO(pa_context_proplist_update, pFpippp_t) \ + GO(pa_stream_proplist_update, pFpippp_t) \ + GO(pa_context_set_sink_input_mute, pFpuipp_t) \ + GO(pa_context_set_source_mute_by_index, pFpuipp_t) \ + GO(pa_context_move_sink_input_by_index, pFpuupp_t) \ + GO(pa_context_set_sink_input_volume, pFpuppp_t) \ + GO(pa_context_set_sink_volume_by_index, pFpuppp_t) \ + GO(pa_context_set_source_volume_by_index, pFpuppp_t) \ + GO(pa_context_load_module, pFppppp_t) \ + GO(pa_context_set_source_volume_by_name, pFppppp_t) \ + GO(pa_stream_write, iFppLpIi_t) + +#endif // __wrappedpulseTYPES_H_ diff --git a/src/wrapped/generated/wrappedsdl1imagetypes.h b/src/wrapped/generated/wrappedsdl1imagetypes.h new file mode 100644 index 00000000..89c5e486 --- /dev/null +++ b/src/wrapped/generated/wrappedsdl1imagetypes.h @@ -0,0 +1,37 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsdl1imageTYPES_H_ +#define __wrappedsdl1imageTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void* (*pFp_t)(void*); +typedef void* (*pFpi_t)(void*, int64_t); +typedef void* (*pFpip_t)(void*, int64_t, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(IMG_LoadBMP_RW, pFp_t) \ + GO(IMG_LoadCUR_RW, pFp_t) \ + GO(IMG_LoadGIF_RW, pFp_t) \ + GO(IMG_LoadICO_RW, pFp_t) \ + GO(IMG_LoadJPG_RW, pFp_t) \ + GO(IMG_LoadLBM_RW, pFp_t) \ + GO(IMG_LoadPCX_RW, pFp_t) \ + GO(IMG_LoadPNG_RW, pFp_t) \ + GO(IMG_LoadPNM_RW, pFp_t) \ + GO(IMG_LoadTGA_RW, pFp_t) \ + GO(IMG_LoadTIF_RW, pFp_t) \ + GO(IMG_LoadWEBP_RW, pFp_t) \ + GO(IMG_LoadXCF_RW, pFp_t) \ + GO(IMG_LoadXPM_RW, pFp_t) \ + GO(IMG_LoadXV_RW, pFp_t) \ + GO(IMG_Load_RW, pFpi_t) \ + GO(IMG_LoadTyped_RW, pFpip_t) + +#endif // __wrappedsdl1imageTYPES_H_ diff --git a/src/wrapped/generated/wrappedsdl1mixertypes.h b/src/wrapped/generated/wrappedsdl1mixertypes.h new file mode 100644 index 00000000..26106a46 --- /dev/null +++ b/src/wrapped/generated/wrappedsdl1mixertypes.h @@ -0,0 +1,33 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsdl1mixerTYPES_H_ +#define __wrappedsdl1mixerTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFp_t)(void*); +typedef void* (*pFp_t)(void*); +typedef void (*vFpp_t)(void*, void*); +typedef int64_t (*iFip_t)(int64_t, void*); +typedef void* (*pFpi_t)(void*, int64_t); +typedef void* (*pFpii_t)(void*, int64_t, int64_t); +typedef int64_t (*iFippp_t)(int64_t, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(Mix_ChannelFinished, vFp_t) \ + GO(Mix_HookMusicFinished, vFp_t) \ + GO(Mix_LoadMUS_RW, pFp_t) \ + GO(Mix_HookMusic, vFpp_t) \ + GO(Mix_SetPostMix, vFpp_t) \ + GO(Mix_UnregisterEffect, iFip_t) \ + GO(Mix_LoadWAV_RW, pFpi_t) \ + GO(Mix_LoadMUSType_RW, pFpii_t) \ + GO(Mix_RegisterEffect, iFippp_t) + +#endif // __wrappedsdl1mixerTYPES_H_ diff --git a/src/wrapped/generated/wrappedsdl1ttftypes.h b/src/wrapped/generated/wrappedsdl1ttftypes.h new file mode 100644 index 00000000..b61ad3e7 --- /dev/null +++ b/src/wrapped/generated/wrappedsdl1ttftypes.h @@ -0,0 +1,21 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsdl1ttfTYPES_H_ +#define __wrappedsdl1ttfTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void* (*pFpii_t)(void*, int64_t, int64_t); +typedef void* (*pFpiii_t)(void*, int64_t, int64_t, int64_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(TTF_OpenFontRW, pFpii_t) \ + GO(TTF_OpenFontIndexRW, pFpiii_t) + +#endif // __wrappedsdl1ttfTYPES_H_ diff --git a/src/wrapped/generated/wrappedsdl1types.h b/src/wrapped/generated/wrappedsdl1types.h new file mode 100644 index 00000000..b510c583 --- /dev/null +++ b/src/wrapped/generated/wrappedsdl1types.h @@ -0,0 +1,65 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsdl1TYPES_H_ +#define __wrappedsdl1TYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFp_t)(void*); +typedef int64_t (*iFp_t)(void*); +typedef uint64_t (*uFp_t)(void*); +typedef uint64_t (*UFp_t)(void*); +typedef void* (*pFv_t)(void); +typedef void* (*pFp_t)(void*); +typedef int64_t (*iFup_t)(uint64_t, void*); +typedef int64_t (*iFpp_t)(void*, void*); +typedef uint64_t (*uFpW_t)(void*, uint16_t); +typedef uint64_t (*uFpu_t)(void*, uint64_t); +typedef uint64_t (*uFpU_t)(void*, uint64_t); +typedef void* (*pFpi_t)(void*, int64_t); +typedef void* (*pFpp_t)(void*, void*); +typedef int64_t (*iFppi_t)(void*, void*, int64_t); +typedef void* (*pFupp_t)(uint64_t, void*, void*); +typedef void* (*pFpippp_t)(void*, int64_t, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(SDL_KillThread, vFp_t) \ + GO(SDL_SetEventFilter, vFp_t) \ + GO(SDL_UnloadObject, vFp_t) \ + GO(SDL_GetWMInfo, iFp_t) \ + GO(SDL_RemoveTimer, iFp_t) \ + GO(SDL_ReadBE16, uFp_t) \ + GO(SDL_ReadBE32, uFp_t) \ + GO(SDL_ReadLE16, uFp_t) \ + GO(SDL_ReadLE32, uFp_t) \ + GO(SDL_ReadBE64, UFp_t) \ + GO(SDL_ReadLE64, UFp_t) \ + GO(SDL_GetEventFilter, pFv_t) \ + GO(SDL_GL_GetProcAddress, pFp_t) \ + GO(SDL_LoadObject, pFp_t) \ + GO(SDL_SetTimer, iFup_t) \ + GO(SDL_OpenAudio, iFpp_t) \ + GO(SDL_WriteBE16, uFpW_t) \ + GO(SDL_WriteLE16, uFpW_t) \ + GO(SDL_WriteBE32, uFpu_t) \ + GO(SDL_WriteLE32, uFpu_t) \ + GO(SDL_WriteBE64, uFpU_t) \ + GO(SDL_WriteLE64, uFpU_t) \ + GO(SDL_LoadBMP_RW, pFpi_t) \ + GO(SDL_RWFromConstMem, pFpi_t) \ + GO(SDL_RWFromFP, pFpi_t) \ + GO(SDL_RWFromMem, pFpi_t) \ + GO(SDL_CreateThread, pFpp_t) \ + GO(SDL_LoadFunction, pFpp_t) \ + GO(SDL_RWFromFile, pFpp_t) \ + GO(SDL_SaveBMP_RW, iFppi_t) \ + GO(SDL_AddTimer, pFupp_t) \ + GO(SDL_LoadWAV_RW, pFpippp_t) + +#endif // __wrappedsdl1TYPES_H_ diff --git a/src/wrapped/generated/wrappedsdl2imagetypes.h b/src/wrapped/generated/wrappedsdl2imagetypes.h new file mode 100644 index 00000000..57120cbe --- /dev/null +++ b/src/wrapped/generated/wrappedsdl2imagetypes.h @@ -0,0 +1,43 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsdl2imageTYPES_H_ +#define __wrappedsdl2imageTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void* (*pFp_t)(void*); +typedef void* (*pFpi_t)(void*, int64_t); +typedef int64_t (*iFppi_t)(void*, void*, int64_t); +typedef void* (*pFpip_t)(void*, int64_t, void*); +typedef void* (*pFppi_t)(void*, void*, int64_t); +typedef void* (*pFppip_t)(void*, void*, int64_t, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(IMG_LoadBMP_RW, pFp_t) \ + GO(IMG_LoadCUR_RW, pFp_t) \ + GO(IMG_LoadGIF_RW, pFp_t) \ + GO(IMG_LoadICO_RW, pFp_t) \ + GO(IMG_LoadJPG_RW, pFp_t) \ + GO(IMG_LoadLBM_RW, pFp_t) \ + GO(IMG_LoadPCX_RW, pFp_t) \ + GO(IMG_LoadPNG_RW, pFp_t) \ + GO(IMG_LoadPNM_RW, pFp_t) \ + GO(IMG_LoadTGA_RW, pFp_t) \ + GO(IMG_LoadTIF_RW, pFp_t) \ + GO(IMG_LoadWEBP_RW, pFp_t) \ + GO(IMG_LoadXCF_RW, pFp_t) \ + GO(IMG_LoadXPM_RW, pFp_t) \ + GO(IMG_LoadXV_RW, pFp_t) \ + GO(IMG_Load_RW, pFpi_t) \ + GO(IMG_SavePNG_RW, iFppi_t) \ + GO(IMG_LoadTyped_RW, pFpip_t) \ + GO(IMG_LoadTexture_RW, pFppi_t) \ + GO(IMG_LoadTextureTyped_RW, pFppip_t) + +#endif // __wrappedsdl2imageTYPES_H_ diff --git a/src/wrapped/generated/wrappedsdl2mixertypes.h b/src/wrapped/generated/wrappedsdl2mixertypes.h new file mode 100644 index 00000000..7bc662db --- /dev/null +++ b/src/wrapped/generated/wrappedsdl2mixertypes.h @@ -0,0 +1,34 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsdl2mixerTYPES_H_ +#define __wrappedsdl2mixerTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFp_t)(void*); +typedef void (*vFpp_t)(void*, void*); +typedef int64_t (*iFiw_t)(int64_t, int16_t); +typedef int64_t (*iFip_t)(int64_t, void*); +typedef void* (*pFpi_t)(void*, int64_t); +typedef void* (*pFpii_t)(void*, int64_t, int64_t); +typedef int64_t (*iFippp_t)(int64_t, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(Mix_ChannelFinished, vFp_t) \ + GO(Mix_HookMusicFinished, vFp_t) \ + GO(Mix_HookMusic, vFpp_t) \ + GO(Mix_SetPostMix, vFpp_t) \ + GO(MinorityMix_SetPosition, iFiw_t) \ + GO(Mix_UnregisterEffect, iFip_t) \ + GO(Mix_LoadMUS_RW, pFpi_t) \ + GO(Mix_LoadWAV_RW, pFpi_t) \ + GO(Mix_LoadMUSType_RW, pFpii_t) \ + GO(Mix_RegisterEffect, iFippp_t) + +#endif // __wrappedsdl2mixerTYPES_H_ diff --git a/src/wrapped/generated/wrappedsdl2ttftypes.h b/src/wrapped/generated/wrappedsdl2ttftypes.h new file mode 100644 index 00000000..fe3c4815 --- /dev/null +++ b/src/wrapped/generated/wrappedsdl2ttftypes.h @@ -0,0 +1,21 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsdl2ttfTYPES_H_ +#define __wrappedsdl2ttfTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void* (*pFpii_t)(void*, int64_t, int64_t); +typedef void* (*pFpiii_t)(void*, int64_t, int64_t, int64_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(TTF_OpenFontRW, pFpii_t) \ + GO(TTF_OpenFontIndexRW, pFpiii_t) + +#endif // __wrappedsdl2ttfTYPES_H_ diff --git a/src/wrapped/generated/wrappedsdl2types.h b/src/wrapped/generated/wrappedsdl2types.h new file mode 100644 index 00000000..3c8bb639 --- /dev/null +++ b/src/wrapped/generated/wrappedsdl2types.h @@ -0,0 +1,114 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsdl2TYPES_H_ +#define __wrappedsdl2TYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFp_t)(void*); +typedef int64_t (*iFp_t)(void*); +typedef int64_t (*IFp_t)(void*); +typedef uint64_t (*uFp_t)(void*); +typedef uint64_t (*UFp_t)(void*); +typedef void* (*pFv_t)(void); +typedef void* (*pFp_t)(void*); +typedef void (*vFpp_t)(void*, void*); +typedef void (*vFpV_t)(void*, void*); +typedef int64_t (*iFip_t)(int64_t, void*); +typedef int64_t (*iFWW_t)(uint16_t, uint16_t); +typedef int64_t (*iFUU_t)(uint64_t, uint64_t); +typedef int64_t (*iFpi_t)(void*, int64_t); +typedef int64_t (*iFpp_t)(void*, void*); +typedef uint64_t (*uFpW_t)(void*, uint16_t); +typedef uint64_t (*uFpu_t)(void*, uint64_t); +typedef uint64_t (*uFpU_t)(void*, uint64_t); +typedef void* (*pFpi_t)(void*, int64_t); +typedef void* (*pFpp_t)(void*, void*); +typedef void (*vFipV_t)(int64_t, void*, void*); +typedef int64_t (*iFupp_t)(uint64_t, void*, void*); +typedef int64_t (*iFppi_t)(void*, void*, int64_t); +typedef int64_t (*IFpIi_t)(void*, int64_t, int64_t); +typedef void* (*pFupp_t)(uint64_t, void*, void*); +typedef void* (*pFppi_t)(void*, void*, int64_t); +typedef void* (*pFppp_t)(void*, void*, void*); +typedef void (*vFpuup_t)(void*, uint64_t, uint64_t, void*); +typedef int64_t (*iFpLpp_t)(void*, uintptr_t, void*, void*); +typedef int64_t (*iFpLpV_t)(void*, uintptr_t, void*, void*); +typedef uint64_t (*uFppuu_t)(void*, void*, uint64_t, uint64_t); +typedef int64_t (*iFpippi_t)(void*, int64_t, void*, void*, int64_t); +typedef void* (*pFpippp_t)(void*, int64_t, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(SDL_UnloadObject, vFp_t) \ + GO(SDL_RWclose, iFp_t) \ + GO(SDL_RemoveTimer, iFp_t) \ + GO(SDL_SaveAllDollarTemplates, iFp_t) \ + GO(SDL_RWtell, IFp_t) \ + GO(SDL_ReadBE16, uFp_t) \ + GO(SDL_ReadBE32, uFp_t) \ + GO(SDL_ReadLE16, uFp_t) \ + GO(SDL_ReadLE32, uFp_t) \ + GO(SDL_ReadU8, uFp_t) \ + GO(SDL_ReadBE64, UFp_t) \ + GO(SDL_ReadLE64, UFp_t) \ + GO(SDL_GetBasePath, pFv_t) \ + GO(SDL_Vulkan_GetVkGetInstanceProcAddr, pFv_t) \ + GO(SDL_GL_GetProcAddress, pFp_t) \ + GO(SDL_LoadObject, pFp_t) \ + GO(SDL_AddEventWatch, vFpp_t) \ + GO(SDL_DelEventWatch, vFpp_t) \ + GO(SDL_LogGetOutputFunction, vFpp_t) \ + GO(SDL_LogSetOutputFunction, vFpp_t) \ + GO(SDL_SetEventFilter, vFpp_t) \ + GO(SDL_Log, vFpV_t) \ + GO(SDL_SaveDollarTemplate, iFip_t) \ + GO(SDL_IsJoystickNintendoSwitchPro, iFWW_t) \ + GO(SDL_IsJoystickPS4, iFWW_t) \ + GO(SDL_IsJoystickSteamController, iFWW_t) \ + GO(SDL_IsJoystickXbox360, iFWW_t) \ + GO(SDL_IsJoystickXboxOne, iFWW_t) \ + GO(SDL_IsJoystickHIDAPI, iFUU_t) \ + GO(SDL_IsJoystickXInput, iFUU_t) \ + GO(SDL_GameControllerAddMappingsFromRW, iFpi_t) \ + GO(SDL_GetEventFilter, iFpp_t) \ + GO(SDL_OpenAudio, iFpp_t) \ + GO(SDL_WriteBE16, uFpW_t) \ + GO(SDL_WriteLE16, uFpW_t) \ + GO(SDL_WriteBE32, uFpu_t) \ + GO(SDL_WriteLE32, uFpu_t) \ + GO(SDL_WriteU8, uFpu_t) \ + GO(SDL_WriteBE64, uFpU_t) \ + GO(SDL_WriteLE64, uFpU_t) \ + GO(SDL_LoadBMP_RW, pFpi_t) \ + GO(SDL_RWFromConstMem, pFpi_t) \ + GO(SDL_RWFromFP, pFpi_t) \ + GO(SDL_RWFromMem, pFpi_t) \ + GO(SDL_LoadFunction, pFpp_t) \ + GO(SDL_RWFromFile, pFpp_t) \ + GO(SDL_LogCritical, vFipV_t) \ + GO(SDL_LogDebug, vFipV_t) \ + GO(SDL_LogError, vFipV_t) \ + GO(SDL_LogInfo, vFipV_t) \ + GO(SDL_LogVerbose, vFipV_t) \ + GO(SDL_LogWarn, vFipV_t) \ + GO(SDL_TLSSet, iFupp_t) \ + GO(SDL_SaveBMP_RW, iFppi_t) \ + GO(SDL_RWseek, IFpIi_t) \ + GO(SDL_AddTimer, pFupp_t) \ + GO(SDL_LoadFile_RW, pFppi_t) \ + GO(SDL_CreateThread, pFppp_t) \ + GO(SDL_qsort, vFpuup_t) \ + GO(SDL_vsnprintf, iFpLpp_t) \ + GO(SDL_snprintf, iFpLpV_t) \ + GO(SDL_RWread, uFppuu_t) \ + GO(SDL_RWwrite, uFppuu_t) \ + GO(SDL_OpenAudioDevice, iFpippi_t) \ + GO(SDL_LoadWAV_RW, pFpippp_t) + +#endif // __wrappedsdl2TYPES_H_ diff --git a/src/wrapped/generated/wrappedsmpeg2types.h b/src/wrapped/generated/wrappedsmpeg2types.h new file mode 100644 index 00000000..8fe02baf --- /dev/null +++ b/src/wrapped/generated/wrappedsmpeg2types.h @@ -0,0 +1,21 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsmpeg2TYPES_H_ +#define __wrappedsmpeg2TYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void (*vFpppp_t)(void*, void*, void*, void*); +typedef void* (*pFppii_t)(void*, void*, int64_t, int64_t); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(SMPEG_setdisplay, vFpppp_t) \ + GO(SMPEG_new_rwops, pFppii_t) + +#endif // __wrappedsmpeg2TYPES_H_ diff --git a/src/wrapped/generated/wrappedsmpegtypes.h b/src/wrapped/generated/wrappedsmpegtypes.h new file mode 100644 index 00000000..658adb1e --- /dev/null +++ b/src/wrapped/generated/wrappedsmpegtypes.h @@ -0,0 +1,21 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedsmpegTYPES_H_ +#define __wrappedsmpegTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef void* (*pFppi_t)(void*, void*, int64_t); +typedef void (*vFpppp_t)(void*, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(SMPEG_new_rwops, pFppi_t) \ + GO(SMPEG_setdisplay, vFpppp_t) + +#endif // __wrappedsmpegTYPES_H_ diff --git a/src/wrapped/generated/wrappedutiltypes.h b/src/wrapped/generated/wrappedutiltypes.h new file mode 100644 index 00000000..33e5ddec --- /dev/null +++ b/src/wrapped/generated/wrappedutiltypes.h @@ -0,0 +1,19 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedutilTYPES_H_ +#define __wrappedutilTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(forkpty, iFpppp_t) + +#endif // __wrappedutilTYPES_H_ diff --git a/src/wrapped/generated/wrappedvorbisfiletypes.h b/src/wrapped/generated/wrappedvorbisfiletypes.h new file mode 100644 index 00000000..c135492f --- /dev/null +++ b/src/wrapped/generated/wrappedvorbisfiletypes.h @@ -0,0 +1,20 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ +#ifndef __wrappedvorbisfileTYPES_H_ +#define __wrappedvorbisfileTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + +typedef int64_t (*iFppplPPPP_t)(void*, void*, void*, intptr_t, void*, void*, void*, void*); + +#define SUPER() ADDED_FUNCTIONS() \ + GO(ov_open_callbacks, iFppplPPPP_t) \ + GO(ov_test_callbacks, iFppplPPPP_t) + +#endif // __wrappedvorbisfileTYPES_H_ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index e6244933..32952925 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -1,6 +1,6 @@ -/***************************************************************** - * File automatically generated by rebuild_wrappers.py (v1.2.0.09) - *****************************************************************/ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ #include <stdio.h> #include <stdlib.h> #include <stdint.h> @@ -31,7 +31,7 @@ static void* io_convert(void* v) #define ST0val ST0.d int of_convert(int); -typedef int64_t (*iF_t)(); + typedef void (*vFE_t)(x64emu_t*); typedef void (*vFv_t)(void); typedef void (*vFi_t)(int64_t); @@ -135,7 +135,6 @@ typedef int64_t (*iFIi_t)(int64_t, int64_t); typedef int64_t (*iFui_t)(uint64_t, int64_t); typedef int64_t (*iFuu_t)(uint64_t, uint64_t); typedef int64_t (*iFup_t)(uint64_t, void*); -typedef int64_t (*iFUU_t)(uint64_t, uint64_t); typedef int64_t (*iFli_t)(intptr_t, int64_t); typedef int64_t (*iFLL_t)(uintptr_t, uintptr_t); typedef int64_t (*iFLp_t)(uintptr_t, void*); @@ -267,6 +266,7 @@ typedef int64_t (*iFEiw_t)(x64emu_t*, int64_t, int16_t); typedef int64_t (*iFEip_t)(x64emu_t*, int64_t, void*); typedef int64_t (*iFEWW_t)(x64emu_t*, uint16_t, uint16_t); typedef int64_t (*iFEup_t)(x64emu_t*, uint64_t, void*); +typedef int64_t (*iFEUU_t)(x64emu_t*, uint64_t, uint64_t); typedef int64_t (*iFEpi_t)(x64emu_t*, void*, int64_t); typedef int64_t (*iFEpL_t)(x64emu_t*, void*, uintptr_t); typedef int64_t (*iFEpp_t)(x64emu_t*, void*, void*); @@ -1229,7 +1229,6 @@ typedef double (*KFKK_t)(double, double); typedef double (*KFKp_t)(double, void*); #endif -void iF(x64emu_t *emu, uintptr_t fcn) { iF_t fn = (iF_t)fcn; R_RAX=(int64_t)fn(); } void vFE(x64emu_t *emu, uintptr_t fcn) { vFE_t fn = (vFE_t)fcn; fn(emu); } void vFv(x64emu_t *emu, uintptr_t fcn) { vFv_t fn = (vFv_t)fcn; fn(); } void vFi(x64emu_t *emu, uintptr_t fcn) { vFi_t fn = (vFi_t)fcn; fn((int64_t)R_RDI); } @@ -1333,7 +1332,6 @@ void iFIi(x64emu_t *emu, uintptr_t fcn) { iFIi_t fn = (iFIi_t)fcn; R_RAX=(int64_ void iFui(x64emu_t *emu, uintptr_t fcn) { iFui_t fn = (iFui_t)fcn; R_RAX=(int64_t)fn((uint64_t)R_RDI, (int64_t)R_RSI); } void iFuu(x64emu_t *emu, uintptr_t fcn) { iFuu_t fn = (iFuu_t)fcn; R_RAX=(int64_t)fn((uint64_t)R_RDI, (uint64_t)R_RSI); } void iFup(x64emu_t *emu, uintptr_t fcn) { iFup_t fn = (iFup_t)fcn; R_RAX=(int64_t)fn((uint64_t)R_RDI, (void*)R_RSI); } -void iFUU(x64emu_t *emu, uintptr_t fcn) { iFUU_t fn = (iFUU_t)fcn; R_RAX=(int64_t)fn((uint64_t)R_RDI, (uint64_t)R_RSI); } void iFli(x64emu_t *emu, uintptr_t fcn) { iFli_t fn = (iFli_t)fcn; R_RAX=(int64_t)fn((intptr_t)R_RDI, (int64_t)R_RSI); } void iFLL(x64emu_t *emu, uintptr_t fcn) { iFLL_t fn = (iFLL_t)fcn; R_RAX=(int64_t)fn((uintptr_t)R_RDI, (uintptr_t)R_RSI); } void iFLp(x64emu_t *emu, uintptr_t fcn) { iFLp_t fn = (iFLp_t)fcn; R_RAX=(int64_t)fn((uintptr_t)R_RDI, (void*)R_RSI); } @@ -1465,6 +1463,7 @@ void iFEiw(x64emu_t *emu, uintptr_t fcn) { iFEiw_t fn = (iFEiw_t)fcn; R_RAX=(int void iFEip(x64emu_t *emu, uintptr_t fcn) { iFEip_t fn = (iFEip_t)fcn; R_RAX=(int64_t)fn(emu, (int64_t)R_RDI, (void*)R_RSI); } void iFEWW(x64emu_t *emu, uintptr_t fcn) { iFEWW_t fn = (iFEWW_t)fcn; R_RAX=(int64_t)fn(emu, (uint16_t)R_RDI, (uint16_t)R_RSI); } void iFEup(x64emu_t *emu, uintptr_t fcn) { iFEup_t fn = (iFEup_t)fcn; R_RAX=(int64_t)fn(emu, (uint64_t)R_RDI, (void*)R_RSI); } +void iFEUU(x64emu_t *emu, uintptr_t fcn) { iFEUU_t fn = (iFEUU_t)fcn; R_RAX=(int64_t)fn(emu, (uint64_t)R_RDI, (uint64_t)R_RSI); } void iFEpi(x64emu_t *emu, uintptr_t fcn) { iFEpi_t fn = (iFEpi_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI); } void iFEpL(x64emu_t *emu, uintptr_t fcn) { iFEpL_t fn = (iFEpL_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uintptr_t)R_RSI); } void iFEpp(x64emu_t *emu, uintptr_t fcn) { iFEpp_t fn = (iFEpp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI); } @@ -2427,6 +2426,7 @@ void KFKK(x64emu_t *emu, uintptr_t fcn) { KFKK_t fn = (KFKK_t)fcn; double db=fn( void KFKp(x64emu_t *emu, uintptr_t fcn) { KFKp_t fn = (KFKp_t)fcn; double db=fn(FromLD((void*)(R_RSP + 8)), (void*)R_RDI); fpu_do_push(emu); ST0val = db; } #endif +void vFEv(x64emu_t *emu, uintptr_t fcn) { vFE_t fn = (vFE_t)fcn; fn(emu); } void lFEv(x64emu_t *emu, uintptr_t fcn) { lFE_t fn = (lFE_t)fcn; R_RAX=(intptr_t)fn(emu); } void LFEv(x64emu_t *emu, uintptr_t fcn) { LFE_t fn = (LFE_t)fcn; R_RAX=(uintptr_t)fn(emu); } void pFEv(x64emu_t *emu, uintptr_t fcn) { pFE_t fn = (pFE_t)fcn; R_RAX=(uintptr_t)fn(emu); } @@ -2438,7 +2438,6 @@ void iFEpLvvpp(x64emu_t *emu, uintptr_t fcn) { iFEpLpp_t fn = (iFEpLpp_t)fcn; R_ void iFEpuvvppp(x64emu_t *emu, uintptr_t fcn) { iFEpuppp_t fn = (iFEpuppp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } int isSimpleWrapper(wrapper_t fun) { - if (fun == &iF) return 1; if (fun == &vFv) return 1; if (fun == &vFi) return 1; if (fun == &vFu) return 1; @@ -2527,7 +2526,6 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &iFui) return 1; if (fun == &iFuu) return 1; if (fun == &iFup) return 1; - if (fun == &iFUU) return 1; if (fun == &iFli) return 1; if (fun == &iFLL) return 1; if (fun == &iFLp) return 1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 718ac076..295f051c 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -1,6 +1,6 @@ -/***************************************************************** - * File automatically generated by rebuild_wrappers.py (v1.2.0.09) - *****************************************************************/ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v1.3.0.10) * + *******************************************************************/ #ifndef __WRAPPER_H_ #define __WRAPPER_H_ #include <stdint.h> @@ -28,7 +28,6 @@ typedef void (*wrapper_t)(x64emu_t* emu, uintptr_t fnc); // M = ... automatically sending 2 args // H = Huge 128bits value/struct -void iF(x64emu_t *emu, uintptr_t fnc); void vFE(x64emu_t *emu, uintptr_t fnc); void vFv(x64emu_t *emu, uintptr_t fnc); void vFi(x64emu_t *emu, uintptr_t fnc); @@ -132,7 +131,6 @@ void iFIi(x64emu_t *emu, uintptr_t fnc); void iFui(x64emu_t *emu, uintptr_t fnc); void iFuu(x64emu_t *emu, uintptr_t fnc); void iFup(x64emu_t *emu, uintptr_t fnc); -void iFUU(x64emu_t *emu, uintptr_t fnc); void iFli(x64emu_t *emu, uintptr_t fnc); void iFLL(x64emu_t *emu, uintptr_t fnc); void iFLp(x64emu_t *emu, uintptr_t fnc); @@ -264,6 +262,7 @@ void iFEiw(x64emu_t *emu, uintptr_t fnc); void iFEip(x64emu_t *emu, uintptr_t fnc); void iFEWW(x64emu_t *emu, uintptr_t fnc); void iFEup(x64emu_t *emu, uintptr_t fnc); +void iFEUU(x64emu_t *emu, uintptr_t fnc); void iFEpi(x64emu_t *emu, uintptr_t fnc); void iFEpL(x64emu_t *emu, uintptr_t fnc); void iFEpp(x64emu_t *emu, uintptr_t fnc); @@ -1226,6 +1225,7 @@ void KFKK(x64emu_t *emu, uintptr_t fnc); void KFKp(x64emu_t *emu, uintptr_t fnc); #endif +void vFEv(x64emu_t *emu, uintptr_t fnc); void lFEv(x64emu_t *emu, uintptr_t fnc); void LFEv(x64emu_t *emu, uintptr_t fnc); void pFEv(x64emu_t *emu, uintptr_t fnc); @@ -1238,4 +1238,4 @@ void iFEpuvvppp(x64emu_t *emu, uintptr_t fnc); int isSimpleWrapper(wrapper_t fun); -#endif //__WRAPPER_H_ +#endif // __WRAPPER_H_ diff --git a/src/wrapped/wrappedcrypto_private.h b/src/wrapped/wrappedcrypto_private.h index ee63a3b9..f9a783a5 100755 --- a/src/wrapped/wrappedcrypto_private.h +++ b/src/wrapped/wrappedcrypto_private.h @@ -1594,7 +1594,7 @@ GO(ENGINE_remove, iFp) //GO(ENGINE_set_ctrl_function, GO(ENGINE_set_default, iFpu) GO(ENGINE_set_default_ciphers, iFp) -GO(ENGINE_set_default_DH, iF) +GO(ENGINE_set_default_DH, iFp) GO(ENGINE_set_default_digests, iFp) GO(ENGINE_set_default_DSA, iFp) GO(ENGINE_set_default_ECDH, iFp) diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index b024c65f..8fac99cf 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -434,7 +434,7 @@ pid_t EXPORT my_vfork(x64emu_t* emu) int EXPORT my_uname(struct utsname *buf) { - //TODO: check sizeof(struct utsname) + //TODO: check sizeof(struct utsname) == 390 int ret = uname(buf); strcpy(buf->machine, "x86_64"); return ret; @@ -1651,9 +1651,6 @@ EXPORT int32_t my___poll_chk(void* a, uint32_t b, int c, int l) #endif EXPORT int32_t my_fcntl64(x64emu_t* emu, int32_t a, int32_t b, void* c) { - // Implemented starting glibc 2.14+ - library_t* lib = my_lib; - if(!lib) return 0; if(b==F_SETFL) c = (void*)(uintptr_t)of_convert((intptr_t)c); #if 0 @@ -1666,10 +1663,7 @@ EXPORT int32_t my_fcntl64(x64emu_t* emu, int32_t a, int32_t b, void* c) return ret; } #endif - //TODO: check if better to use the syscall or regular fcntl? - //return syscall(__NR_fcntl64, a, b, d1); // should be enough int ret = fcntl(a, b, c); - if(b==F_GETFL && ret!=-1) ret = of_unconvert(ret); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index c559e383..5fb2644f 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -1728,7 +1728,7 @@ GOW(srandom, vFu) GOM(sscanf, iFEppV) //GOW(ssignal, //GO(sstk, -GOM(__stack_chk_fail, vFE) +GOM(__stack_chk_fail, vFEv) //GO(__statfs, GOW(statfs, iFpp) GOW(statfs64, iFpp) diff --git a/src/wrapped/wrappedlibdl_private.h b/src/wrapped/wrappedlibdl_private.h index 3e84b520..58064bca 100755 --- a/src/wrapped/wrappedlibdl_private.h +++ b/src/wrapped/wrappedlibdl_private.h @@ -3,7 +3,7 @@ GOM(dladdr, iFEpp) // dladdr1 GOM(dlclose, iFEp) -GOM(dlerror, pFE) +GOM(dlerror, pFEv) DATAB(_dlfcn_hook, 8) GOM(dlinfo, iFEpip) GOM(dlmopen, pFEppi) @@ -11,4 +11,4 @@ GOM(dlopen, pFEpi) GOM(dlsym, pFEpp) GOM(dlvsym, pFEppp) // Weak -#endif \ No newline at end of file +#endif diff --git a/src/wrapped/wrappedlibz.c b/src/wrapped/wrappedlibz.c index c84bfb8b..9a1cd6f3 100755 --- a/src/wrapped/wrappedlibz.c +++ b/src/wrapped/wrappedlibz.c @@ -18,34 +18,7 @@ const char* libzName = "libz.so.1"; #define LIBNAME libz -// TODO: put the wrapper type in a dedicate include -typedef void* (*pFpi_t)(void*, int32_t); -typedef void* (*pFp_t)(void*); -typedef void* (*pFpp_t)(void*, void*); -typedef int32_t (*iFp_t)(void*); -typedef int32_t (*iFppi_t)(void*, void*, int32_t); -typedef int32_t (*iFpipi_t)(void*, int, void*, int); -typedef void* (*pFpippp_t)(void*, int32_t, void*, void*, void*); -typedef void (*vFp_t)(void*); -typedef void* (*pFpp_t)(void*, void*); -typedef uint32_t (*uFp_t)(void*); -typedef uint64_t (*UFp_t)(void*); -typedef uint32_t (*uFu_t)(uint32_t); -typedef int32_t (*iFpp_t)(void*, void*); -typedef uint32_t (*uFpW_t)(void*, uint16_t); -typedef uint32_t (*uFpu_t)(void*, uint32_t); -typedef uint32_t (*uFpU_t)(void*, uint64_t); -typedef uint32_t (*uFupp_t)(uint32_t, void*, void*); -typedef int (*iFpiiiiipi_t)(void*, int, int, int, int, int, void*, int); - -#define SUPER() \ - GO(inflateInit_, iFppi_t) \ - GO(inflateInit, iFp_t) \ - GO(inflateEnd, iFp_t) \ - GO(deflateEnd, iFp_t) \ - GO(inflateInit2_, iFpipi_t) \ - GO(deflateInit_, iFpipi_t) \ - GO(deflateInit2_, iFpiiiiipi_t) +#include "generated/wrappedlibztypes.h" typedef struct libz_my_s { // functions @@ -207,4 +180,3 @@ EXPORT int32_t my_deflateEnd(x64emu_t* emu, void* str) ((box64context_t*)(lib->context))->zlib = NULL; #include "wrappedlib_init.h" - diff --git a/src/wrapped/wrappedlibz_private.h b/src/wrapped/wrappedlibz_private.h index de9428fb..80708207 100644 --- a/src/wrapped/wrappedlibz_private.h +++ b/src/wrapped/wrappedlibz_private.h @@ -5,7 +5,7 @@ GO(zlibVersion, pFv) GO(deflateInit, iFpi) GO(deflate, iFpi) -GO(deflateEnd, iFp) +GOM(deflateEnd, iFEp) GOM(inflateInit, iFEp) GO(inflate, iFpi) GOM(inflateEnd, iFEp) @@ -102,4 +102,4 @@ GO(inflateCodesUsed, uFp) GO(inflateResetKeep, iFp) GO(deflateResetKeep, iFp) GO(gzopen_w, pFpp) // Win32 only? -//GOM(gzvprintf iFEppVV); +//GOM(gzvprintf iFEppVV) diff --git a/src/wrapped/wrappedopenal_private.h b/src/wrapped/wrappedopenal_private.h index d57b2fb6..c1385598 100755 --- a/src/wrapped/wrappedopenal_private.h +++ b/src/wrapped/wrappedopenal_private.h @@ -111,7 +111,7 @@ GO(alcGetInteger64vSOFT, vFpiip) GO(alBufferDataStatic,vFiipii) GO(alBufferSubDataSOFT,vFuipii) GOM(alRequestFoldbackStart,vFEiiipp) -GOM(alRequestFoldbackStop,vFE) +GOM(alRequestFoldbackStop,vFEv) GO(alBufferSamplesSOFT,vFuuiiiip) GO(alBufferSubSamplesSOFT,vFuiiiip) GO(alGetBufferSamplesSOFT,vFuiiiip) @@ -164,4 +164,4 @@ GO(alAuxiliaryEffectSlotfv,vFuip) GO(alGetAuxiliaryEffectSloti,vFuip) GO(alGetAuxiliaryEffectSlotiv,vFuip) GO(alGetAuxiliaryEffectSlotf,vFuip) -GO(alGetAuxiliaryEffectSlotfv,vFuip) \ No newline at end of file +GO(alGetAuxiliaryEffectSlotfv,vFuip) diff --git a/src/wrapped/wrappedsdl1.c b/src/wrapped/wrappedsdl1.c index 3f78bc38..8c1070ff 100755 --- a/src/wrapped/wrappedsdl1.c +++ b/src/wrapped/wrappedsdl1.c @@ -45,60 +45,12 @@ typedef struct { void *userdata; } SDL_AudioSpec; -// TODO: put the wrapper type in a dedicate include typedef void (*vFv_t)(); -typedef void* (*pFv_t)(); -typedef void* (*pFpi_t)(void*, int32_t); -typedef void* (*pFp_t)(void*); -typedef void* (*pFpp_t)(void*, void*); -typedef int (*iFup_t)(uint32_t, void*); -typedef int32_t (*iFp_t)(void*); -typedef int32_t (*iFppi_t)(void*, void*, int32_t); -typedef void* (*pFpippp_t)(void*, int32_t, void*, void*, void*); -typedef void (*vFp_t)(void*); -typedef void* (*pFpp_t)(void*, void*); -typedef uint32_t (*uFp_t)(void*); -typedef uint64_t (*UFp_t)(void*); -typedef uint32_t (*uFu_t)(uint32_t); -typedef int32_t (*iFpp_t)(void*, void*); -typedef uint32_t (*uFpW_t)(void*, uint16_t); -typedef uint32_t (*uFpu_t)(void*, uint32_t); -typedef uint32_t (*uFpU_t)(void*, uint64_t); -typedef uint32_t (*uFupp_t)(uint32_t, void*, void*); - -#define SUPER() \ - GO(SDL_Quit, vFv_t) \ - GO(SDL_AllocRW, sdl1_allocrw) \ - GO(SDL_FreeRW, sdl1_freerw) \ - GO(SDL_OpenAudio, iFpp_t) \ - GO(SDL_LoadBMP_RW, pFpi_t) \ - GO(SDL_RWFromConstMem, pFpi_t) \ - GO(SDL_RWFromFP, pFpi_t) \ - GO(SDL_RWFromFile, pFpp_t) \ - GO(SDL_RWFromMem, pFpi_t) \ - GO(SDL_SaveBMP_RW, iFppi_t) \ - GO(SDL_LoadWAV_RW, pFpippp_t) \ - GO(SDL_ReadBE16, uFp_t) \ - GO(SDL_ReadBE32, uFp_t) \ - GO(SDL_ReadBE64, UFp_t) \ - GO(SDL_ReadLE16, uFp_t) \ - GO(SDL_ReadLE32, uFp_t) \ - GO(SDL_ReadLE64, UFp_t) \ - GO(SDL_WriteBE16, uFpW_t) \ - GO(SDL_WriteBE32, uFpu_t) \ - GO(SDL_WriteBE64, uFpU_t) \ - GO(SDL_WriteLE16, uFpW_t) \ - GO(SDL_WriteLE32, uFpu_t) \ - GO(SDL_WriteLE64, uFpU_t) \ - GO(SDL_AddTimer, uFupp_t) \ - GO(SDL_RemoveTimer, uFu_t) \ - GO(SDL_CreateThread, pFpp_t) \ - GO(SDL_KillThread, vFp_t) \ - GO(SDL_SetEventFilter, vFp_t) \ - GO(SDL_GL_GetProcAddress, pFp_t) \ - GO(SDL_GetWMInfo, iFp_t) \ - GO(SDL_SetTimer, iFup_t) \ - GO(SDL_GetEventFilter, pFv_t) \ +#define ADDED_FUNCTIONS() \ + GO(SDL_Quit, vFv_t) \ + GO(SDL_AllocRW, sdl1_allocrw) \ + GO(SDL_FreeRW, sdl1_freerw) +#include "generated/wrappedsdl1types.h" typedef struct sdl1_my_s { // functions @@ -218,7 +170,7 @@ static void* reverse_EvtFilterFct(void* fct) #undef SUPER // TODO: track the memory for those callback -int EXPORT my_SDL_OpenAudio(x64emu_t* emu, void* d, void* o) +EXPORT int my_SDL_OpenAudio(x64emu_t* emu, void* d, void* o) { SDL_AudioSpec *desired = (SDL_AudioSpec*)d; sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; @@ -237,7 +189,7 @@ int EXPORT my_SDL_OpenAudio(x64emu_t* emu, void* d, void* o) return ret; } -void EXPORT *my_SDL_LoadBMP_RW(x64emu_t* emu, void* a, int b) +EXPORT void *my_SDL_LoadBMP_RW(x64emu_t* emu, void* a, int b) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -246,7 +198,7 @@ void EXPORT *my_SDL_LoadBMP_RW(x64emu_t* emu, void* a, int b) RWNativeEnd(rw); return r; } -int32_t EXPORT my_SDL_SaveBMP_RW(x64emu_t* emu, void* a, void* b, int c) +EXPORT int32_t my_SDL_SaveBMP_RW(x64emu_t* emu, void* a, void* b, int c) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -255,7 +207,7 @@ int32_t EXPORT my_SDL_SaveBMP_RW(x64emu_t* emu, void* a, void* b, int c) RWNativeEnd(rw); return r; } -void EXPORT *my_SDL_LoadWAV_RW(x64emu_t* emu, void* a, int b, void* c, void* d, void* e) +EXPORT void *my_SDL_LoadWAV_RW(x64emu_t* emu, void* a, int b, void* c, void* d, void* e) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -264,7 +216,7 @@ void EXPORT *my_SDL_LoadWAV_RW(x64emu_t* emu, void* a, int b, void* c, void* d, RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_ReadBE16(x64emu_t* emu, void* a) +EXPORT uint32_t my_SDL_ReadBE16(x64emu_t* emu, void* a) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -272,7 +224,7 @@ uint32_t EXPORT my_SDL_ReadBE16(x64emu_t* emu, void* a) RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_ReadBE32(x64emu_t* emu, void* a) +EXPORT uint32_t my_SDL_ReadBE32(x64emu_t* emu, void* a) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -280,7 +232,7 @@ uint32_t EXPORT my_SDL_ReadBE32(x64emu_t* emu, void* a) RWNativeEnd(rw); return r; } -uint64_t EXPORT my_SDL_ReadBE64(x64emu_t* emu, void* a) +EXPORT uint64_t my_SDL_ReadBE64(x64emu_t* emu, void* a) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -288,7 +240,7 @@ uint64_t EXPORT my_SDL_ReadBE64(x64emu_t* emu, void* a) RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_ReadLE16(x64emu_t* emu, void* a) +EXPORT uint32_t my_SDL_ReadLE16(x64emu_t* emu, void* a) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -296,7 +248,7 @@ uint32_t EXPORT my_SDL_ReadLE16(x64emu_t* emu, void* a) RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_ReadLE32(x64emu_t* emu, void* a) +EXPORT uint32_t my_SDL_ReadLE32(x64emu_t* emu, void* a) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -304,7 +256,7 @@ uint32_t EXPORT my_SDL_ReadLE32(x64emu_t* emu, void* a) RWNativeEnd(rw); return r; } -uint64_t EXPORT my_SDL_ReadLE64(x64emu_t* emu, void* a) +EXPORT uint64_t my_SDL_ReadLE64(x64emu_t* emu, void* a) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -312,7 +264,7 @@ uint64_t EXPORT my_SDL_ReadLE64(x64emu_t* emu, void* a) RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_WriteBE16(x64emu_t* emu, void* a, uint16_t v) +EXPORT uint32_t my_SDL_WriteBE16(x64emu_t* emu, void* a, uint16_t v) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -320,7 +272,7 @@ uint32_t EXPORT my_SDL_WriteBE16(x64emu_t* emu, void* a, uint16_t v) RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_WriteBE32(x64emu_t* emu, void* a, uint32_t v) +EXPORT uint32_t my_SDL_WriteBE32(x64emu_t* emu, void* a, uint32_t v) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -328,7 +280,7 @@ uint32_t EXPORT my_SDL_WriteBE32(x64emu_t* emu, void* a, uint32_t v) RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_WriteBE64(x64emu_t* emu, void* a, uint64_t v) +EXPORT uint32_t my_SDL_WriteBE64(x64emu_t* emu, void* a, uint64_t v) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -336,7 +288,7 @@ uint32_t EXPORT my_SDL_WriteBE64(x64emu_t* emu, void* a, uint64_t v) RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_WriteLE16(x64emu_t* emu, void* a, uint16_t v) +EXPORT uint32_t my_SDL_WriteLE16(x64emu_t* emu, void* a, uint16_t v) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -344,7 +296,7 @@ uint32_t EXPORT my_SDL_WriteLE16(x64emu_t* emu, void* a, uint16_t v) RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_WriteLE32(x64emu_t* emu, void* a, uint32_t v) +EXPORT uint32_t my_SDL_WriteLE32(x64emu_t* emu, void* a, uint32_t v) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -352,7 +304,7 @@ uint32_t EXPORT my_SDL_WriteLE32(x64emu_t* emu, void* a, uint32_t v) RWNativeEnd(rw); return r; } -uint32_t EXPORT my_SDL_WriteLE64(x64emu_t* emu, void* a, uint64_t v) +EXPORT uint32_t my_SDL_WriteLE64(x64emu_t* emu, void* a, uint64_t v) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); @@ -362,28 +314,28 @@ uint32_t EXPORT my_SDL_WriteLE64(x64emu_t* emu, void* a, uint64_t v) } // SDL1 doesn't really used rw_ops->type, but box64 does, so set sensible value (from SDL2).... -void EXPORT *my_SDL_RWFromConstMem(x64emu_t* emu, void* a, int b) +EXPORT void *my_SDL_RWFromConstMem(x64emu_t* emu, void* a, int b) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* r = (SDL1_RWops_t*)my->SDL_RWFromConstMem(a, b); RWSetType(r, 5); return AddNativeRW(emu, r); } -void EXPORT *my_SDL_RWFromFP(x64emu_t* emu, void* a, int b) +EXPORT void *my_SDL_RWFromFP(x64emu_t* emu, void* a, int b) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* r = (SDL1_RWops_t*)my->SDL_RWFromFP(a, b); RWSetType(r, 2); return AddNativeRW(emu, r); } -void EXPORT *my_SDL_RWFromFile(x64emu_t* emu, void* a, void* b) +EXPORT void *my_SDL_RWFromFile(x64emu_t* emu, void* a, void* b) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* r = (SDL1_RWops_t*)my->SDL_RWFromFile(a, b); RWSetType(r, 2); return AddNativeRW(emu, r); } -void EXPORT *my_SDL_RWFromMem(x64emu_t* emu, void* a, int b) +EXPORT void *my_SDL_RWFromMem(x64emu_t* emu, void* a, int b) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; SDL1_RWops_t* r = (SDL1_RWops_t*)my->SDL_RWFromMem(a, b); @@ -391,50 +343,50 @@ void EXPORT *my_SDL_RWFromMem(x64emu_t* emu, void* a, int b) return AddNativeRW(emu, r); } -uint32_t EXPORT my_SDL_AddTimer(x64emu_t* emu, uint32_t a, void* cb, void* p) +EXPORT void *my_SDL_AddTimer(x64emu_t* emu, uint32_t a, void* cb, void* p) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; return my->SDL_AddTimer(a, find_TimerCallback_Fct(cb), p); } -void EXPORT my_SDL_RemoveTimer(x64emu_t* emu, uint32_t t) +EXPORT int my_SDL_RemoveTimer(x64emu_t* emu, void *t) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; - my->SDL_RemoveTimer(t); + return my->SDL_RemoveTimer(t); } -int32_t EXPORT my_SDL_SetTimer(x64emu_t* emu, uint32_t t, void* p) +EXPORT int32_t my_SDL_SetTimer(x64emu_t* emu, uint32_t t, void* p) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; return my->SDL_SetTimer(t, find_TimerCallback_Fct(p)); } #if 0 -int32_t EXPORT my_SDL_BuildAudioCVT(x64emu_t* emu, void* a, uint32_t b, uint32_t c, int32_t d, uint32_t e, uint32_t f, int32_t g) +EXPORT int32_t my_SDL_BuildAudioCVT(x64emu_t* emu, void* a, uint32_t b, uint32_t c, int32_t d, uint32_t e, uint32_t f, int32_t g) { printf_log(LOG_NONE, "Error, using Unimplemented SDL1 SDL_BuildAudioCVT\n"); emu->quit = 1; return 0; } -int32_t EXPORT my_SDL_ConvertAudio(x64emu_t* emu, void* a) +EXPORT int32_t my_SDL_ConvertAudio(x64emu_t* emu, void* a) { printf_log(LOG_NONE, "Error, using Unimplemented SDL1 SDL_ConvertAudio\n"); emu->quit = 1; return 0; } #endif -void EXPORT my_SDL_SetEventFilter(x64emu_t* emu, void* a) +EXPORT void my_SDL_SetEventFilter(x64emu_t* emu, void* a) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; my->SDL_SetEventFilter(find_EvtFilter_Fct(a)); } -void EXPORT *my_SDL_GetEventFilter(x64emu_t* emu) +EXPORT void *my_SDL_GetEventFilter(x64emu_t* emu) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; return reverse_EvtFilterFct(my->SDL_GetEventFilter()); } -void EXPORT *my_SDL_CreateThread(x64emu_t* emu, void* cb, void* p) +EXPORT void *my_SDL_CreateThread(x64emu_t* emu, void* cb, void* p) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; void* et = NULL; @@ -442,7 +394,7 @@ void EXPORT *my_SDL_CreateThread(x64emu_t* emu, void* cb, void* p) return my->SDL_CreateThread(fnc, et); } -void EXPORT my_SDL_KillThread(x64emu_t* emu, void* p) +EXPORT void my_SDL_KillThread(x64emu_t* emu, void* p) { sdl1_my_t *my = (sdl1_my_t *)emu->context->sdl1lib->priv.w.p2; my->SDL_KillThread(p); @@ -573,4 +525,3 @@ EXPORT int32_t my_SDL_GetWMInfo(x64emu_t* emu, void* p) ((box64context_t*)(lib->context))->sdl1freerw = NULL; #include "wrappedlib_init.h" - diff --git a/src/wrapped/wrappedsdl2.c b/src/wrapped/wrappedsdl2.c index e0f5f78c..870701dc 100755 --- a/src/wrapped/wrappedsdl2.c +++ b/src/wrapped/wrappedsdl2.c @@ -19,20 +19,23 @@ #include "myalign.h" #include "threads.h" +const char* sdl2Name = "libSDL2-2.0.so.0"; +#define LIBNAME sdl2 + static int sdl_Yes() { return 1;} static int sdl_No() { return 0;} -int EXPORT my2_SDL_Has3DNow() __attribute__((alias("sdl_No"))); -int EXPORT my2_SDL_Has3DNowExt() __attribute__((alias("sdl_No"))); -int EXPORT my2_SDL_HasAltiVec() __attribute__((alias("sdl_No"))); -int EXPORT my2_SDL_HasMMX() __attribute__((alias("sdl_Yes"))); -int EXPORT my2_SDL_HasMMXExt() __attribute__((alias("sdl_Yes"))); -int EXPORT my2_SDL_HasNEON() __attribute__((alias("sdl_No"))); // No neon in x86 ;) -int EXPORT my2_SDL_HasRDTSC() __attribute__((alias("sdl_Yes"))); -int EXPORT my2_SDL_HasSSE() __attribute__((alias("sdl_Yes"))); -int EXPORT my2_SDL_HasSSE2() __attribute__((alias("sdl_Yes"))); -int EXPORT my2_SDL_HasSSE3() __attribute__((alias("sdl_Yes"))); -int EXPORT my2_SDL_HasSSE41() __attribute__((alias("sdl_No"))); -int EXPORT my2_SDL_HasSSE42() __attribute__((alias("sdl_No"))); +int EXPORT my2_SDL_Has3DNow(void) __attribute__((alias("sdl_No"))); +int EXPORT my2_SDL_Has3DNowExt(void) __attribute__((alias("sdl_No"))); +int EXPORT my2_SDL_HasAltiVec(void) __attribute__((alias("sdl_No"))); +int EXPORT my2_SDL_HasMMX(void) __attribute__((alias("sdl_Yes"))); +int EXPORT my2_SDL_HasMMXExt(void) __attribute__((alias("sdl_Yes"))); +int EXPORT my2_SDL_HasNEON(void) __attribute__((alias("sdl_No"))); // No neon in x86_64 ;) +int EXPORT my2_SDL_HasRDTSC(void) __attribute__((alias("sdl_Yes"))); +int EXPORT my2_SDL_HasSSE(void) __attribute__((alias("sdl_Yes"))); +int EXPORT my2_SDL_HasSSE2(void) __attribute__((alias("sdl_Yes"))); +int EXPORT my2_SDL_HasSSE3(void) __attribute__((alias("sdl_Yes"))); +int EXPORT my2_SDL_HasSSE41(void) __attribute__((alias("sdl_No"))); +int EXPORT my2_SDL_HasSSE42(void) __attribute__((alias("sdl_No"))); typedef struct { int32_t freq; @@ -70,92 +73,14 @@ typedef struct } SDL_GameControllerButtonBind; -// TODO: put the wrapper type in a dedicate include typedef void (*vFv_t)(); -typedef void* (*pFv_t)(); -typedef int32_t (*iFp_t)(void*); -typedef int32_t (*iFip_t)(int32_t, void*); -typedef int32_t (*iFWW_t)(uint16_t, uint16_t); -typedef void* (*pFpi_t)(void*, int32_t); -typedef void* (*pFp_t)(void*); -typedef void* (*pFpp_t)(void*, void*); -typedef int32_t (*iFppi_t)(void*, void*, int32_t); -typedef int32_t (*iFpippi_t)(void*, int32_t, void*, void*, int32_t); -typedef int32_t (*iFppp_t)(void*, void*, void*); -typedef void* (*pFpippp_t)(void*, int32_t, void*, void*, void*); -typedef void* (*pFpp_t)(void*, void*); -typedef void* (*pFppp_t)(void*, void*, void*); -typedef void (*vFp_t)(void*); -typedef void (*vFpp_t)(void*, void*); -typedef void (*vFiupp_t)(int32_t, uint32_t, void*, void*); -typedef void (*vFiupV_t)(int32_t, uint32_t, void*, va_list); -typedef int32_t (*iFpupp_t)(void*, uint32_t, void*, void*); -typedef uint32_t (*uFu_t)(uint32_t); -typedef uint32_t (*uFp_t)(void*); -typedef uint32_t (*uFupp_t)(uint32_t, void*, void*); -typedef int64_t (*IFp_t)(void*); -typedef uint64_t (*UFp_t)(void*); -typedef int32_t (*iFpi_t)(void*, int32_t); -typedef int32_t (*iFpp_t)(void*, void*); -typedef int32_t (*iFUU_t)(uint64_t, uint64_t); -typedef int32_t (*iFupp_t)(uint32_t, void*, void*); -typedef uint32_t (*uFpC_t)(void*, uint8_t); -typedef uint32_t (*uFpW_t)(void*, uint16_t); -typedef uint32_t (*uFpu_t)(void*, uint32_t); -typedef uint32_t (*uFpU_t)(void*, uint64_t); - -#define SUPER() \ - GO(SDL_Quit, vFv_t) \ - GO(SDL_OpenAudio, iFpp_t) \ - GO(SDL_OpenAudioDevice, iFpippi_t) \ - GO(SDL_LoadFile_RW, pFpi_t) \ - GO(SDL_LoadBMP_RW, pFpi_t) \ - GO(SDL_RWFromConstMem, pFpi_t) \ - GO(SDL_RWFromFP, pFpi_t) \ - GO(SDL_RWFromFile, pFpp_t) \ - GO(SDL_RWFromMem, pFpi_t) \ - GO(SDL_SaveBMP_RW, iFppi_t) \ - GO(SDL_LoadWAV_RW, pFpippp_t) \ - GO(SDL_GameControllerAddMappingsFromRW, iFpi_t) \ - GO(SDL_AllocRW, sdl2_allocrw) \ - GO(SDL_FreeRW, sdl2_freerw) \ - GO(SDL_ReadU8, uFp_t) \ - GO(SDL_ReadBE16, uFp_t) \ - GO(SDL_ReadBE32, uFp_t) \ - GO(SDL_ReadBE64, UFp_t) \ - GO(SDL_ReadLE16, uFp_t) \ - GO(SDL_ReadLE32, uFp_t) \ - GO(SDL_ReadLE64, UFp_t) \ - GO(SDL_WriteU8, uFpC_t) \ - GO(SDL_WriteBE16, uFpW_t) \ - GO(SDL_WriteBE32, uFpu_t) \ - GO(SDL_WriteBE64, uFpU_t) \ - GO(SDL_WriteLE16, uFpW_t) \ - GO(SDL_WriteLE32, uFpu_t) \ - GO(SDL_WriteLE64, uFpU_t) \ - GO(SDL_AddTimer, uFupp_t) \ - GO(SDL_RemoveTimer, uFu_t) \ - GO(SDL_CreateThread, pFppp_t) \ - GO(SDL_KillThread, vFp_t) \ - GO(SDL_GetEventFilter, iFpp_t) \ - GO(SDL_SetEventFilter, vFpp_t) \ - GO(SDL_LogGetOutputFunction, vFpp_t) \ - GO(SDL_LogSetOutputFunction, vFpp_t) \ - GO(SDL_LogMessageV, vFiupV_t) \ - GO(SDL_GL_GetProcAddress, pFp_t) \ - GO(SDL_TLSSet, iFupp_t) \ - GO(SDL_AddEventWatch, vFpp_t) \ - GO(SDL_DelEventWatch, vFpp_t) \ - GO(SDL_SaveAllDollarTemplates, iFp_t) \ - GO(SDL_SaveDollarTemplate, iFip_t) \ - GO(SDL_IsJoystickPS4, iFWW_t) \ - GO(SDL_IsJoystickNintendoSwitchPro, iFWW_t) \ - GO(SDL_IsJoystickSteamController, iFWW_t) \ - GO(SDL_IsJoystickXbox360, iFWW_t) \ - GO(SDL_IsJoystickXboxOne, iFWW_t) \ - GO(SDL_IsJoystickXInput, iFUU_t) \ - GO(SDL_IsJoystickHIDAPI, iFUU_t) \ - GO(SDL_Vulkan_GetVkGetInstanceProcAddr, pFv_t) \ +typedef void (*vFiupV_t)(int64_t, uint64_t, void*, va_list); +#define ADDED_FUNCTIONS() \ + GO(SDL_Quit, vFv_t) \ + GO(SDL_AllocRW, sdl2_allocrw) \ + GO(SDL_FreeRW, sdl2_freerw) \ + GO(SDL_LogMessageV, vFiupV_t) +#include "generated/wrappedsdl2types.h" typedef struct sdl2_my_s { #define GO(A, B) B A; @@ -188,9 +113,9 @@ GO(4) // Timer #define GO(A) \ static uintptr_t my_Timer_fct_##A = 0; \ -static uint32_t my_Timer_##A(uint32_t a, void* b) \ +static uint64_t my_Timer_##A(uint64_t a, void* b) \ { \ - return (uint32_t)RunFunction(my_context, my_Timer_fct_##A, 2, a, b); \ + return (uint64_t)RunFunction(my_context, my_Timer_fct_##A, 2, a, b); \ } SUPER() #undef GO @@ -304,7 +229,7 @@ static void* reverse_LogOutput_Fct(void* fct) #undef SUPER // TODO: track the memory for those callback -EXPORT int32_t my2_SDL_OpenAudio(x64emu_t* emu, void* d, void* o) +EXPORT int64_t my2_SDL_OpenAudio(x64emu_t* emu, void* d, void* o) { SDL2_AudioSpec *desired = (SDL2_AudioSpec*)d; @@ -324,7 +249,7 @@ EXPORT int32_t my2_SDL_OpenAudio(x64emu_t* emu, void* d, void* o) return ret; } -EXPORT int32_t my2_SDL_OpenAudioDevice(x64emu_t* emu, void* device, int32_t iscapture, void* d, void* o, int32_t allowed) +EXPORT int64_t my2_SDL_OpenAudioDevice(x64emu_t* emu, void* device, int64_t iscapture, void* d, void* o, int64_t allowed) { SDL2_AudioSpec *desired = (SDL2_AudioSpec*)d; @@ -344,12 +269,12 @@ EXPORT int32_t my2_SDL_OpenAudioDevice(x64emu_t* emu, void* device, int32_t isca return ret; } -EXPORT void *my2_SDL_LoadFile_RW(x64emu_t* emu, void* a, int b) +EXPORT void *my2_SDL_LoadFile_RW(x64emu_t* emu, void* a, void* b, int c) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - void* r = my->SDL_LoadFile_RW(rw, b); - if(b==0) + void* r = my->SDL_LoadFile_RW(rw, b, c); + if(c==0) RWNativeEnd2(rw); return r; } @@ -362,11 +287,11 @@ EXPORT void *my2_SDL_LoadBMP_RW(x64emu_t* emu, void* a, int b) RWNativeEnd2(rw); return r; } -EXPORT int32_t my2_SDL_SaveBMP_RW(x64emu_t* emu, void* a, void* b, int c) +EXPORT int64_t my2_SDL_SaveBMP_RW(x64emu_t* emu, void* a, void* b, int c) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - int32_t r = my->SDL_SaveBMP_RW(rw, b, c); + int64_t r = my->SDL_SaveBMP_RW(rw, b, c); if(c==0) RWNativeEnd2(rw); return r; @@ -380,36 +305,36 @@ EXPORT void *my2_SDL_LoadWAV_RW(x64emu_t* emu, void* a, int b, void* c, void* d, RWNativeEnd2(rw); return r; } -EXPORT int32_t my2_SDL_GameControllerAddMappingsFromRW(x64emu_t* emu, void* a, int b) +EXPORT int64_t my2_SDL_GameControllerAddMappingsFromRW(x64emu_t* emu, void* a, int b) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - int32_t r = my->SDL_GameControllerAddMappingsFromRW(rw, b); + int64_t r = my->SDL_GameControllerAddMappingsFromRW(rw, b); if(b==0) RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_ReadU8(x64emu_t* emu, void* a) +EXPORT uint64_t my2_SDL_ReadU8(x64emu_t* emu, void* a) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_ReadU8(rw); + uint64_t r = my->SDL_ReadU8(rw); RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_ReadBE16(x64emu_t* emu, void* a) +EXPORT uint64_t my2_SDL_ReadBE16(x64emu_t* emu, void* a) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_ReadBE16(rw); + uint64_t r = my->SDL_ReadBE16(rw); RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_ReadBE32(x64emu_t* emu, void* a) +EXPORT uint64_t my2_SDL_ReadBE32(x64emu_t* emu, void* a) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_ReadBE32(rw); + uint64_t r = my->SDL_ReadBE32(rw); RWNativeEnd2(rw); return r; } @@ -421,19 +346,19 @@ EXPORT uint64_t my2_SDL_ReadBE64(x64emu_t* emu, void* a) RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_ReadLE16(x64emu_t* emu, void* a) +EXPORT uint64_t my2_SDL_ReadLE16(x64emu_t* emu, void* a) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_ReadLE16(rw); + uint64_t r = my->SDL_ReadLE16(rw); RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_ReadLE32(x64emu_t* emu, void* a) +EXPORT uint64_t my2_SDL_ReadLE32(x64emu_t* emu, void* a) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_ReadLE32(rw); + uint64_t r = my->SDL_ReadLE32(rw); RWNativeEnd2(rw); return r; } @@ -445,59 +370,59 @@ EXPORT uint64_t my2_SDL_ReadLE64(x64emu_t* emu, void* a) RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_WriteU8(x64emu_t* emu, void* a, uint8_t v) +EXPORT uint64_t my2_SDL_WriteU8(x64emu_t* emu, void* a, uint8_t v) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_WriteU8(rw, v); + uint64_t r = my->SDL_WriteU8(rw, v); RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_WriteBE16(x64emu_t* emu, void* a, uint16_t v) +EXPORT uint64_t my2_SDL_WriteBE16(x64emu_t* emu, void* a, uint16_t v) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_WriteBE16(rw, v); + uint64_t r = my->SDL_WriteBE16(rw, v); RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_WriteBE32(x64emu_t* emu, void* a, uint32_t v) +EXPORT uint64_t my2_SDL_WriteBE32(x64emu_t* emu, void* a, uint64_t v) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_WriteBE32(rw, v); + uint64_t r = my->SDL_WriteBE32(rw, v); RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_WriteBE64(x64emu_t* emu, void* a, uint64_t v) +EXPORT uint64_t my2_SDL_WriteBE64(x64emu_t* emu, void* a, uint64_t v) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_WriteBE64(rw, v); + uint64_t r = my->SDL_WriteBE64(rw, v); RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_WriteLE16(x64emu_t* emu, void* a, uint16_t v) +EXPORT uint64_t my2_SDL_WriteLE16(x64emu_t* emu, void* a, uint16_t v) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_WriteLE16(rw, v); + uint64_t r = my->SDL_WriteLE16(rw, v); RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_WriteLE32(x64emu_t* emu, void* a, uint32_t v) +EXPORT uint64_t my2_SDL_WriteLE32(x64emu_t* emu, void* a, uint64_t v) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_WriteLE32(rw, v); + uint64_t r = my->SDL_WriteLE32(rw, v); RWNativeEnd2(rw); return r; } -EXPORT uint32_t my2_SDL_WriteLE64(x64emu_t* emu, void* a, uint64_t v) +EXPORT uint64_t my2_SDL_WriteLE64(x64emu_t* emu, void* a, uint64_t v) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t r = my->SDL_WriteLE64(rw, v); + uint64_t r = my->SDL_WriteLE64(rw, v); RWNativeEnd2(rw); return r; } @@ -527,7 +452,7 @@ EXPORT void *my2_SDL_RWFromMem(x64emu_t* emu, void* a, int b) return AddNativeRW2(emu, (SDL2_RWops_t*)r); } -EXPORT int64_t my2_SDL_RWseek(x64emu_t* emu, void* a, int64_t offset, int32_t whence) +EXPORT int64_t my2_SDL_RWseek(x64emu_t* emu, void* a, int64_t offset, int64_t whence) { //sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); @@ -543,19 +468,19 @@ EXPORT int64_t my2_SDL_RWtell(x64emu_t* emu, void* a) RWNativeEnd2(rw); return ret; } -EXPORT uint32_t my2_SDL_RWread(x64emu_t* emu, void* a, void* ptr, uint32_t size, uint32_t maxnum) +EXPORT uint64_t my2_SDL_RWread(x64emu_t* emu, void* a, void* ptr, uint64_t size, uint64_t maxnum) { //sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t ret = RWNativeRead2(rw, ptr, size, maxnum); + uint64_t ret = RWNativeRead2(rw, ptr, size, maxnum); RWNativeEnd2(rw); return ret; } -EXPORT uint32_t my2_SDL_RWwrite(x64emu_t* emu, void* a, const void* ptr, uint32_t size, uint32_t maxnum) +EXPORT uint64_t my2_SDL_RWwrite(x64emu_t* emu, void* a, const void* ptr, uint64_t size, uint64_t maxnum) { //sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t ret = RWNativeWrite2(rw, ptr, size, maxnum); + uint64_t ret = RWNativeWrite2(rw, ptr, size, maxnum); RWNativeEnd2(rw); return ret; } @@ -570,7 +495,7 @@ EXPORT int my2_SDL_SaveAllDollarTemplates(x64emu_t* emu, void* a) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t ret = my->SDL_SaveAllDollarTemplates(rw); + int ret = my->SDL_SaveAllDollarTemplates(rw); RWNativeEnd2(rw); return ret; } @@ -579,18 +504,18 @@ EXPORT int my2_SDL_SaveDollarTemplate(x64emu_t* emu, int gesture, void* a) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); - uint32_t ret = my->SDL_SaveDollarTemplate(gesture, rw); + int ret = my->SDL_SaveDollarTemplate(gesture, rw); RWNativeEnd2(rw); return ret; } -EXPORT uint32_t my2_SDL_AddTimer(x64emu_t* emu, uint32_t a, void* f, void* p) +EXPORT void *my2_SDL_AddTimer(x64emu_t* emu, uint64_t a, void* f, void* p) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; return my->SDL_AddTimer(a, find_Timer_Fct(f), p); } -EXPORT void my2_SDL_RemoveTimer(x64emu_t* emu, uint32_t t) +EXPORT int my2_SDL_RemoveTimer(x64emu_t* emu, void* t) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; my->SDL_RemoveTimer(t); @@ -653,7 +578,7 @@ char EXPORT *my2_SDL_GetBasePath(x64emu_t* emu) { return p; } -EXPORT void my2_SDL_LogCritical(x64emu_t* emu, int32_t cat, void* fmt, void *b) { +EXPORT void my2_SDL_LogCritical(x64emu_t* emu, int64_t cat, void* fmt, void *b) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; // SDL_LOG_PRIORITY_CRITICAL == 6 myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2); @@ -661,7 +586,7 @@ EXPORT void my2_SDL_LogCritical(x64emu_t* emu, int32_t cat, void* fmt, void *b) my->SDL_LogMessageV(cat, 6, fmt, VARARGS); } -EXPORT void my2_SDL_LogError(x64emu_t* emu, int32_t cat, void* fmt, void *b) { +EXPORT void my2_SDL_LogError(x64emu_t* emu, int64_t cat, void* fmt, void *b) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; // SDL_LOG_PRIORITY_ERROR == 5 myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2); @@ -669,7 +594,7 @@ EXPORT void my2_SDL_LogError(x64emu_t* emu, int32_t cat, void* fmt, void *b) { my->SDL_LogMessageV(cat, 5, fmt, VARARGS); } -EXPORT void my2_SDL_LogWarn(x64emu_t* emu, int32_t cat, void* fmt, void *b) { +EXPORT void my2_SDL_LogWarn(x64emu_t* emu, int64_t cat, void* fmt, void *b) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; // SDL_LOG_PRIORITY_WARN == 4 myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2); @@ -677,7 +602,7 @@ EXPORT void my2_SDL_LogWarn(x64emu_t* emu, int32_t cat, void* fmt, void *b) { my->SDL_LogMessageV(cat, 4, fmt, VARARGS); } -EXPORT void my2_SDL_LogInfo(x64emu_t* emu, int32_t cat, void* fmt, void *b) { +EXPORT void my2_SDL_LogInfo(x64emu_t* emu, int64_t cat, void* fmt, void *b) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; // SDL_LOG_PRIORITY_INFO == 3 myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2); @@ -685,7 +610,7 @@ EXPORT void my2_SDL_LogInfo(x64emu_t* emu, int32_t cat, void* fmt, void *b) { my->SDL_LogMessageV(cat, 3, fmt, VARARGS); } -EXPORT void my2_SDL_LogDebug(x64emu_t* emu, int32_t cat, void* fmt, void *b) { +EXPORT void my2_SDL_LogDebug(x64emu_t* emu, int64_t cat, void* fmt, void *b) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; // SDL_LOG_PRIORITY_DEBUG == 2 myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2); @@ -693,7 +618,7 @@ EXPORT void my2_SDL_LogDebug(x64emu_t* emu, int32_t cat, void* fmt, void *b) { my->SDL_LogMessageV(cat, 2, fmt, VARARGS); } -EXPORT void my2_SDL_LogVerbose(x64emu_t* emu, int32_t cat, void* fmt, void *b) { +EXPORT void my2_SDL_LogVerbose(x64emu_t* emu, int64_t cat, void* fmt, void *b) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; // SDL_LOG_PRIORITY_VERBOSE == 1 myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2); @@ -801,7 +726,7 @@ static const sdl2_tls_dtor dtor_cb[nb_once] = { ,tls_dtor_callback_8, tls_dtor_callback_9, tls_dtor_callback_10,tls_dtor_callback_11 ,tls_dtor_callback_12,tls_dtor_callback_13,tls_dtor_callback_14,tls_dtor_callback_15 }; -EXPORT int32_t my2_SDL_TLSSet(x64emu_t* emu, uint32_t id, void* value, void* dtor) +EXPORT int64_t my2_SDL_TLSSet(x64emu_t* emu, uint64_t id, void* value, void* dtor) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; @@ -848,7 +773,7 @@ EXPORT void* my2_SDL_LoadFunction(x64emu_t* emu, void* handle, void* name) return my_dlsym(emu, handle, name); } -EXPORT int32_t my2_SDL_IsJoystickPS4(x64emu_t* emu, uint16_t vendor, uint16_t product_id) +EXPORT int64_t my2_SDL_IsJoystickPS4(x64emu_t* emu, uint16_t vendor, uint16_t product_id) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; @@ -857,7 +782,7 @@ EXPORT int32_t my2_SDL_IsJoystickPS4(x64emu_t* emu, uint16_t vendor, uint16_t pr // fallback return 0; } -EXPORT int32_t my2_SDL_IsJoystickNintendoSwitchPro(x64emu_t* emu, uint16_t vendor, uint16_t product_id) +EXPORT int64_t my2_SDL_IsJoystickNintendoSwitchPro(x64emu_t* emu, uint16_t vendor, uint16_t product_id) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; @@ -866,7 +791,7 @@ EXPORT int32_t my2_SDL_IsJoystickNintendoSwitchPro(x64emu_t* emu, uint16_t vendo // fallback return 0; } -EXPORT int32_t my2_SDL_IsJoystickSteamController(x64emu_t* emu, uint16_t vendor, uint16_t product_id) +EXPORT int64_t my2_SDL_IsJoystickSteamController(x64emu_t* emu, uint16_t vendor, uint16_t product_id) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; @@ -875,7 +800,7 @@ EXPORT int32_t my2_SDL_IsJoystickSteamController(x64emu_t* emu, uint16_t vendor, // fallback return 0; } -EXPORT int32_t my2_SDL_IsJoystickXbox360(x64emu_t* emu, uint16_t vendor, uint16_t product_id) +EXPORT int64_t my2_SDL_IsJoystickXbox360(x64emu_t* emu, uint16_t vendor, uint16_t product_id) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; @@ -884,7 +809,7 @@ EXPORT int32_t my2_SDL_IsJoystickXbox360(x64emu_t* emu, uint16_t vendor, uint16_ // fallback return 0; } -EXPORT int32_t my2_SDL_IsJoystickXboxOne(x64emu_t* emu, uint16_t vendor, uint16_t product_id) +EXPORT int64_t my2_SDL_IsJoystickXboxOne(x64emu_t* emu, uint16_t vendor, uint16_t product_id) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; @@ -893,7 +818,7 @@ EXPORT int32_t my2_SDL_IsJoystickXboxOne(x64emu_t* emu, uint16_t vendor, uint16_ // fallback return 0; } -EXPORT int32_t my2_SDL_IsJoystickXInput(x64emu_t* emu, uint64_t a, uint64_t b) +EXPORT int64_t my2_SDL_IsJoystickXInput(x64emu_t* emu, uint64_t a, uint64_t b) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; @@ -902,7 +827,7 @@ EXPORT int32_t my2_SDL_IsJoystickXInput(x64emu_t* emu, uint64_t a, uint64_t b) // fallback return 0; } -EXPORT int32_t my2_SDL_IsJoystickHIDAPI(x64emu_t* emu, uint64_t a, uint64_t b) +EXPORT int64_t my2_SDL_IsJoystickHIDAPI(x64emu_t* emu, uint64_t a, uint64_t b) { sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2; @@ -925,9 +850,6 @@ EXPORT void* my2_SDL_Vulkan_GetVkGetInstanceProcAddr(x64emu_t* emu) return NULL; } -const char* sdl2Name = "libSDL2-2.0.so.0"; -#define LIBNAME sdl2 - #define CUSTOM_INIT \ box64->sdl2lib = lib; \ lib->priv.w.p2 = getSDL2My(lib); \ @@ -951,5 +873,3 @@ const char* sdl2Name = "libSDL2-2.0.so.0"; #include "wrappedlib_init.h" - - diff --git a/src/wrapped/wrappedsdl2_private.h b/src/wrapped/wrappedsdl2_private.h index dbbae9d3..d220089b 100755 --- a/src/wrapped/wrappedsdl2_private.h +++ b/src/wrapped/wrappedsdl2_private.h @@ -144,7 +144,7 @@ GO(SDL_GameControllerGetType, iFp) GO(SDL_GameControllerGetVendor, WFp) GO(SDL_GameControllerMapping, pFp) GO(SDL_GameControllerMappingForDeviceIndex, pFi) -GOM(SDL_GameControllerMappingForGUID, pFpp) // SDL_GameControllerMappingForGUID structure +GO(SDL_GameControllerMappingForGUID, pFpp) GO(SDL_GameControllerMappingForIndex, pFi) GO(SDL_GameControllerName, pFp) GO(SDL_GameControllerNameForIndex, pFi) @@ -163,7 +163,7 @@ GO(SDL_GetAudioDeviceName, pFii) GO(SDL_GetAudioDeviceStatus, iFi) GO(SDL_GetAudioDriver, pFi) GO(SDL_GetAudioStatus, iFv) -GOM(SDL_GetBasePath, pFE) +GOM(SDL_GetBasePath, pFEv) GO(SDL_GetClipboardText, pFv) GO(SDL_GetClipRect, vFpp) GO(SDL_GetClosestDisplayMode, pFipp) @@ -185,7 +185,7 @@ GO(SDL_GetDisplayOrientation, iFi) GO(SDL_GetDisplayUsableBounds, iFip) GO(SDL_getenv, pFp) GO(SDL_GetError, pFv) -GOM(SDL_GetEventFilter, iFpp) +GOM(SDL_GetEventFilter, iFEpp) GO(SDL_GetGlobalMouseState, uFpp) GO(SDL_GetGrabbedWindow, pFv) GO(SDL_GetHint, pFp) @@ -515,7 +515,7 @@ GOM(SDL_RWFromConstMem, pFEpi) GOM(SDL_RWFromFP, pFEpi) GOM(SDL_RWFromFile, pFEpp) GOM(SDL_RWFromMem, pFEpi) -GOM(SDL_SaveAllDollarTemplates, pFEp) +GOM(SDL_SaveAllDollarTemplates, iFEp) GOM(SDL_SaveBMP_RW, iFEppi) GOM(SDL_SaveDollarTemplate, iFEip) // SDL_scalbn @@ -692,5 +692,5 @@ GOM(SDL_IsJoystickNintendoSwitchPro, iFEWW) GOM(SDL_IsJoystickSteamController, iFEWW) GOM(SDL_IsJoystickXbox360, iFEWW) GOM(SDL_IsJoystickXboxOne, iFEWW) -GOM(SDL_IsJoystickXInput, iFUU) -GOM(SDL_IsJoystickHIDAPI, iFUU) +GOM(SDL_IsJoystickXInput, iFEUU) +GOM(SDL_IsJoystickHIDAPI, iFEUU) |