diff options
| author | rajdakin <rajdakin@gmail.com> | 2024-07-09 08:21:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-09 08:21:21 +0200 |
| commit | 605d5a29c067fa4834340182ab96438673d09a12 (patch) | |
| tree | 3fc4d93603319405ab4a3f7a8c0a59eef1c5d71f /src/wrapped | |
| parent | fdc7e9d1e4d4ab0dd7e895645739fd57e416d5e3 (diff) | |
| download | box64-605d5a29c067fa4834340182ab96438673d09a12.tar.gz box64-605d5a29c067fa4834340182ab96438673d09a12.zip | |
Fixes (#1659)
* Replaced some tabs with spaces * Fixed some signedness warnings * Added more debug info * Fixed an improper alignment * [WRAPPEDWAYLAND] Added return statements to wrappers * [EMU] [AVX] Fixed some issues * [ARM DYNAREC] Fixed some minor warnings * [ARM DYNAREC] Removed unused macro arguments * [EMU] Fixed a noisy warning * [ARM DYNAREC] Removed "empty body" warnings * [EMU] Fixed an opcode in dynarec, non-cosim builds * [LA64 DYNAREC] Minor warning fixes * [LA64 DYNAREC] Fixed empty body warnings * [LA64 DYNAREC] Added parenthesis around assignments in if statements * [LA64 DYNAREC] Fixed missing parenthesis in macro definitions * [RV64 DYNAREC] Fixed minor warnings * [RV64 DYNAREC] Fixed wrong/missing parentheses * [WRAPPER] Fixed the WaylandClient callback signatures
Diffstat (limited to 'src/wrapped')
| -rw-r--r-- | src/wrapped/wrappedfaudio.c | 20 | ||||
| -rw-r--r-- | src/wrapped/wrappedfreetype.c | 2 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 14 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibsm.c | 24 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibx11_private.h | 2 | ||||
| -rw-r--r-- | src/wrapped/wrappedlzma.c | 42 | ||||
| -rw-r--r-- | src/wrapped/wrappedpulse_private.h | 2 | ||||
| -rw-r--r-- | src/wrapped/wrappedsdl2.c | 42 | ||||
| -rw-r--r-- | src/wrapped/wrappedwaylandclient.c | 397 |
9 files changed, 272 insertions, 273 deletions
diff --git a/src/wrapped/wrappedfaudio.c b/src/wrapped/wrappedfaudio.c index c5007302..5f3246fb 100644 --- a/src/wrapped/wrappedfaudio.c +++ b/src/wrapped/wrappedfaudio.c @@ -166,9 +166,9 @@ static void* find_OnProcessingPassStartFunc_Fct(void* fct) } typedef struct my_FAudioEngineCallback_s { - void* OnCriticalError; - void* OnProcessingPassEnd; - void* OnProcessingPassStart; + void* OnCriticalError; + void* OnProcessingPassEnd; + void* OnProcessingPassStart; } my_FAudioEngineCallback_t; // OnBufferEndFunc ... #define GO(A) \ @@ -326,13 +326,13 @@ static void* find_OnVoiceProcessingPassStartFunc_Fct(void* fct) } typedef struct my_FAudioVoiceCallback_s { - void* OnBufferEnd; - void* OnBufferStart; - void* OnLoopEnd; - void* OnStreamEnd; - void* OnVoiceError; - void* OnVoiceProcessingPassEnd; - void* OnVoiceProcessingPassStart; + void* OnBufferEnd; + void* OnBufferStart; + void* OnLoopEnd; + void* OnStreamEnd; + void* OnVoiceError; + void* OnVoiceProcessingPassEnd; + void* OnVoiceProcessingPassStart; } my_FAudioVoiceCallback_t; // FAudioEngineCallEXT ... #define GO(A) \ diff --git a/src/wrapped/wrappedfreetype.c b/src/wrapped/wrappedfreetype.c index f1bec4f9..7e02db0b 100644 --- a/src/wrapped/wrappedfreetype.c +++ b/src/wrapped/wrappedfreetype.c @@ -20,7 +20,7 @@ const char* freetypeName = #ifdef ANDROID - "libfreetype.so" + "libfreetype.so" #else "libfreetype.so.6" #endif diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 7a3964b8..b27e931b 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -2798,7 +2798,7 @@ EXPORT int my_readlinkat(x64emu_t* emu, int fd, void* path, void* buf, size_t bu return readlinkat(fd, path, buf, bufsize); } #ifndef MAP_FIXED_NOREPLACE -#define MAP_FIXED_NOREPLACE 0x200000 +#define MAP_FIXED_NOREPLACE 0x200000 #endif #ifndef MAP_32BIT #define MAP_32BIT 0x40 @@ -3174,9 +3174,9 @@ EXPORT int my_setrlimit(x64emu_t* emu, int ressource, const struct rlimit *rlim) #if 0 #ifdef PANDORA -#define RENAME_NOREPLACE (1 << 0) -#define RENAME_EXCHANGE (1 << 1) -#define RENAME_WHITEOUT (1 << 2) +#define RENAME_NOREPLACE (1 << 0) +#define RENAME_EXCHANGE (1 << 1) +#define RENAME_WHITEOUT (1 << 2) EXPORT int my_renameat2(int olddirfd, void* oldpath, int newdirfd, void* newpath, uint32_t flags) { // simulate that function, but @@ -3209,8 +3209,8 @@ EXPORT int my_renameat2(int olddirfd, void* oldpath, int newdirfd, void* newpath #endif #ifndef __NR_memfd_create -#define MFD_CLOEXEC 0x0001U -#define MFD_ALLOW_SEALING 0x0002U +#define MFD_CLOEXEC 0x0001U +#define MFD_ALLOW_SEALING 0x0002U EXPORT int my_memfd_create(x64emu_t* emu, void* name, uint32_t flags) { // try to simulate that function @@ -3225,7 +3225,7 @@ EXPORT int my_memfd_create(x64emu_t* emu, void* name, uint32_t flags) #endif #ifndef GRND_RANDOM -#define GRND_RANDOM 0x0002 +#define GRND_RANDOM 0x0002 #endif EXPORT int my_getentropy(x64emu_t* emu, void* buffer, size_t length) { diff --git a/src/wrapped/wrappedlibsm.c b/src/wrapped/wrappedlibsm.c index aaf84234..c4c80ac2 100644 --- a/src/wrapped/wrappedlibsm.c +++ b/src/wrapped/wrappedlibsm.c @@ -27,29 +27,29 @@ const char* libsmName = "libSM.so.6"; typedef struct my_SmcCallbacks_s { struct { - void* callback; - void* client_data; + void* callback; + void* client_data; } save_yourself; struct { - void* callback; - void* client_data; + void* callback; + void* client_data; } die; struct { - void* callback; - void* client_data; + void* callback; + void* client_data; } save_complete; struct { - void* callback; - void* client_data; + void* callback; + void* client_data; } shutdown_cancelled; } my_SmcCallbacks_t; -#define SmcSaveYourselfProcMask (1L << 0) -#define SmcDieProcMask (1L << 1) -#define SmcSaveCompleteProcMask (1L << 2) -#define SmcShutdownCancelledProcMask (1L << 3) +#define SmcSaveYourselfProcMask (1L << 0) +#define SmcDieProcMask (1L << 1) +#define SmcSaveCompleteProcMask (1L << 2) +#define SmcShutdownCancelledProcMask (1L << 3) static uintptr_t my_save_yourself_fct = 0; static void my_save_yourself(void* smcConn, void* clientData, int saveType, int shutdown, int interactStyle, int fast) diff --git a/src/wrapped/wrappedlibx11_private.h b/src/wrapped/wrappedlibx11_private.h index a382161f..9cf69529 100644 --- a/src/wrapped/wrappedlibx11_private.h +++ b/src/wrapped/wrappedlibx11_private.h @@ -944,7 +944,7 @@ GO(XSetIconName, iFppp) GO(XSetIconSizes, iFpLpi) GOM(XSetICValues, pFEpV) // use vaarg //GO(_XSetImage, -GOM(XSetIMValues, pFEpV) // use vaarg +GOM(XSetIMValues, pFEpV) // use vaarg GO(XSetInputFocus, iFpLiL) GOM(XSetIOErrorHandler, pFEp) GO(_XSetLastRequestRead, uFpp) diff --git a/src/wrapped/wrappedlzma.c b/src/wrapped/wrappedlzma.c index 387208f0..19f9ad9f 100644 --- a/src/wrapped/wrappedlzma.c +++ b/src/wrapped/wrappedlzma.c @@ -26,30 +26,30 @@ const char* lzmaName = "liblzma.so.5"; #include "wrappercallback.h" typedef struct lzma_allocator_s { - void *(*alloc)(void *opaque, size_t nmemb, size_t size); - void (*free)(void *opaque, void *ptr); - void *opaque; + void *(*alloc)(void *opaque, size_t nmemb, size_t size); + void (*free)(void *opaque, void *ptr); + void *opaque; } lzma_allocator_t; typedef struct lzma_stream_s { - const uint8_t *next_in; - size_t avail_in; - uint64_t total_in; - uint8_t *next_out; - size_t avail_out; - uint64_t total_out; - lzma_allocator_t *allocator; - void* internal; - void *reserved_ptr1; - void *reserved_ptr2; - void *reserved_ptr3; - void *reserved_ptr4; - uint64_t reserved_int1; - uint64_t reserved_int2; - size_t reserved_int3; - size_t reserved_int4; - int reserved_enum1; - int reserved_enum2; + const uint8_t *next_in; + size_t avail_in; + uint64_t total_in; + uint8_t *next_out; + size_t avail_out; + uint64_t total_out; + lzma_allocator_t *allocator; + void* internal; + void *reserved_ptr1; + void *reserved_ptr2; + void *reserved_ptr3; + void *reserved_ptr4; + uint64_t reserved_int1; + uint64_t reserved_int2; + size_t reserved_int3; + size_t reserved_int4; + int reserved_enum1; + int reserved_enum2; } lzma_stream_t; #define SUPER() \ diff --git a/src/wrapped/wrappedpulse_private.h b/src/wrapped/wrappedpulse_private.h index d9e55623..fed2e1aa 100644 --- a/src/wrapped/wrappedpulse_private.h +++ b/src/wrapped/wrappedpulse_private.h @@ -293,7 +293,7 @@ GO(pa_xrealloc, pFpL) GO(pa_xstrdup, pFp) GO(pa_xstrndup, pFpL) -GO(pa_stream_begin_write, iFppp) // 0.9.16+ +GO(pa_stream_begin_write, iFppp) // 0.9.16+ GO(pa_stream_cancel_write, iFp) // 0.9.16+ GO(dummy_io_new, pFpiipp) // dumy function to create Wrapper diff --git a/src/wrapped/wrappedsdl2.c b/src/wrapped/wrappedsdl2.c index 299237f2..33cbfab6 100644 --- a/src/wrapped/wrappedsdl2.c +++ b/src/wrapped/wrappedsdl2.c @@ -661,19 +661,19 @@ EXPORT void* my2_SDL_GL_GetProcAddress(x64emu_t* emu, void* name) return getGLProcAddress(emu, (glprocaddress_t)my->SDL_GL_GetProcAddress, rname); } -#define nb_once 16 +#define nb_once 16 typedef void(*sdl2_tls_dtor)(void*); static uintptr_t dtor_emu[nb_once] = {0}; static void tls_dtor_callback(int n, void* a) { - if(dtor_emu[n]) { + if(dtor_emu[n]) { RunFunctionFmt(dtor_emu[n], "p", a); - } + } } #define GO(N) \ void tls_dtor_callback_##N(void* a) \ { \ - tls_dtor_callback(N, a); \ + tls_dtor_callback(N, a); \ } GO(0) @@ -694,26 +694,26 @@ GO(14) GO(15) #undef GO static const sdl2_tls_dtor dtor_cb[nb_once] = { - tls_dtor_callback_0, tls_dtor_callback_1, tls_dtor_callback_2, tls_dtor_callback_3 - ,tls_dtor_callback_4, tls_dtor_callback_5, tls_dtor_callback_6, tls_dtor_callback_7 - ,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 + tls_dtor_callback_0, tls_dtor_callback_1, tls_dtor_callback_2, tls_dtor_callback_3 + ,tls_dtor_callback_4, tls_dtor_callback_5, tls_dtor_callback_6, tls_dtor_callback_7 + ,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 int64_t my2_SDL_TLSSet(x64emu_t* emu, uint64_t id, void* value, void* dtor) { - if(!dtor) - return my->SDL_TLSSet(id, value, NULL); - int n = 0; - while (n<nb_once) { - if(!dtor_emu[n] || (dtor_emu[n])==((uintptr_t)dtor)) { - dtor_emu[n] = (uintptr_t)dtor; - return my->SDL_TLSSet(id, value, dtor_cb[n]); - } - ++n; - } - printf_log(LOG_NONE, "Error: SDL2 SDL_TLSSet with destructor: no more slot!\n"); - //emu->quit = 1; - return -1; + if(!dtor) + return my->SDL_TLSSet(id, value, NULL); + int n = 0; + while (n<nb_once) { + if(!dtor_emu[n] || (dtor_emu[n])==((uintptr_t)dtor)) { + dtor_emu[n] = (uintptr_t)dtor; + return my->SDL_TLSSet(id, value, dtor_cb[n]); + } + ++n; + } + printf_log(LOG_NONE, "Error: SDL2 SDL_TLSSet with destructor: no more slot!\n"); + //emu->quit = 1; + return -1; } EXPORT void my2_SDL_AddEventWatch(x64emu_t* emu, void* p, void* userdata) diff --git a/src/wrapped/wrappedwaylandclient.c b/src/wrapped/wrappedwaylandclient.c index 416dbf4c..4fe3b8f6 100644 --- a/src/wrapped/wrappedwaylandclient.c +++ b/src/wrapped/wrappedwaylandclient.c @@ -41,11 +41,11 @@ typedef struct my_wl_registry_listener_s { } my_wl_registry_listener_t; #define GO(A) \ static my_wl_registry_listener_t* ref_wl_registry_listener_##A = NULL; \ -static void* my_wl_registry_listener_global_##A(void* a, void* b, uint32_t c, void* d, uint32_t e) \ +static void my_wl_registry_listener_global_##A(void* a, void* b, uint32_t c, void* d, uint32_t e) \ { \ RunFunctionFmt(ref_wl_registry_listener_##A->global, "ppupu", a, b, c, d, e); \ } \ -static void* my_wl_registry_listener_global_remove_##A(void* a, void* b, uint32_t c) \ +static void my_wl_registry_listener_global_remove_##A(void* a, void* b, uint32_t c) \ { \ RunFunctionFmt(ref_wl_registry_listener_##A->global_remove, "ppu", a, b, c); \ } \ @@ -74,11 +74,11 @@ typedef struct my_xdg_surface_listener_s { } my_xdg_surface_listener_t; #define GO(A) \ static my_xdg_surface_listener_t* ref_xdg_surface_listener_##A = NULL; \ -static void* my_xdg_surface_listener_configure_##A(void* a, void* b, int c, int d, void* e, uint32_t f) \ +static void my_xdg_surface_listener_configure_##A(void* a, void* b, int c, int d, void* e, uint32_t f) \ { \ RunFunctionFmt(ref_xdg_surface_listener_##A->configure, "ppiipu", a, b, c, d, e, f); \ } \ -static void* my_xdg_surface_listener_close_##A(void* a, void* b) \ +static void my_xdg_surface_listener_close_##A(void* a, void* b) \ { \ RunFunctionFmt(ref_xdg_surface_listener_##A->close, "pp", a, b); \ } \ @@ -106,18 +106,18 @@ typedef struct my_xdg_toplevel_listener_s { uintptr_t close; //vFpp } my_xdg_toplevel_listener_t; #define GO(A) \ -static my_xdg_toplevel_listener_t* ref_xdg_toplevel_listener_##A = NULL; \ -static void* my_xdg_toplevel_listener_configure_##A(void* a, void* b, int c, int d, void* e) \ -{ \ - RunFunctionFmt(ref_xdg_toplevel_listener_##A->configure, "ppiip", a, b, c, d, e); \ -} \ -static void* my_xdg_toplevel_listener_close_##A(void* a, void* b) \ -{ \ - RunFunctionFmt(ref_xdg_toplevel_listener_##A->close, "pp", a, b); \ -} \ -static my_xdg_toplevel_listener_t my_xdg_toplevel_listener_fct_##A = { \ - (uintptr_t)my_xdg_toplevel_listener_configure_##A, \ - (uintptr_t)my_xdg_toplevel_listener_close_##A \ +static my_xdg_toplevel_listener_t* ref_xdg_toplevel_listener_##A = NULL; \ +static void my_xdg_toplevel_listener_configure_##A(void* a, void* b, int c, int d, void* e) \ +{ \ + RunFunctionFmt(ref_xdg_toplevel_listener_##A->configure, "ppiip", a, b, c, d, e); \ +} \ +static void my_xdg_toplevel_listener_close_##A(void* a, void* b) \ +{ \ + RunFunctionFmt(ref_xdg_toplevel_listener_##A->close, "pp", a, b); \ +} \ +static my_xdg_toplevel_listener_t my_xdg_toplevel_listener_fct_##A = { \ + (uintptr_t)my_xdg_toplevel_listener_configure_##A, \ + (uintptr_t)my_xdg_toplevel_listener_close_##A \ }; SUPER() #undef GO @@ -138,13 +138,13 @@ typedef struct my_xdg_wm_base_listener_s { uintptr_t ping; //vFppu } my_xdg_wm_base_listener_t; #define GO(A) \ -static my_xdg_wm_base_listener_t* ref_xdg_wm_base_listener_##A = NULL; \ -static void* my_xdg_wm_base_listener_ping_##A(void* a, void* b, uint32_t c) \ -{ \ - RunFunctionFmt(ref_xdg_wm_base_listener_##A->ping, "ppu", a, b, c); \ -} \ -static my_xdg_wm_base_listener_t my_xdg_wm_base_listener_fct_##A = { \ - (uintptr_t)my_xdg_wm_base_listener_ping_##A, \ +static my_xdg_wm_base_listener_t* ref_xdg_wm_base_listener_##A = NULL; \ +static void my_xdg_wm_base_listener_ping_##A(void* a, void* b, uint32_t c) \ +{ \ + RunFunctionFmt(ref_xdg_wm_base_listener_##A->ping, "ppu", a, b, c); \ +} \ +static my_xdg_wm_base_listener_t my_xdg_wm_base_listener_fct_##A = { \ + (uintptr_t)my_xdg_wm_base_listener_ping_##A, \ }; SUPER() #undef GO @@ -165,13 +165,13 @@ typedef struct my_wl_shm_listener_s { uintptr_t format; //vFppu } my_wl_shm_listener_t; #define GO(A) \ -static my_wl_shm_listener_t* ref_wl_shm_listener_##A = NULL; \ -static void* my_wl_shm_listener_format_##A(void* a, void* b, uint32_t c) \ -{ \ - RunFunctionFmt(ref_wl_shm_listener_##A->format, "ppu", a, b, c); \ -} \ -static my_wl_shm_listener_t my_wl_shm_listener_fct_##A = { \ - (uintptr_t)my_wl_shm_listener_format_##A, \ +static my_wl_shm_listener_t* ref_wl_shm_listener_##A = NULL; \ +static void my_wl_shm_listener_format_##A(void* a, void* b, uint32_t c) \ +{ \ + RunFunctionFmt(ref_wl_shm_listener_##A->format, "ppu", a, b, c); \ +} \ +static my_wl_shm_listener_t my_wl_shm_listener_fct_##A = { \ + (uintptr_t)my_wl_shm_listener_format_##A, \ }; SUPER() #undef GO @@ -197,38 +197,38 @@ typedef struct my_wl_output_listener_s { uintptr_t description; //vFppp } my_wl_output_listener_t; #define GO(A) \ -static my_wl_output_listener_t* ref_wl_output_listener_##A = NULL; \ -static void* my_wl_output_listener_geometry_##A(void* a, void* b, int c, int d, int e, int f, int g, void* h, void* i, int j)\ -{ \ - RunFunctionFmt(ref_wl_output_listener_##A->geometry, "ppiiiiippi", a, b, c, d, e, f, g, h, i, j); \ -} \ -static void* my_wl_output_listener_mode_##A(void* a, void* b, uint32_t c, int d, int e, int f) \ -{ \ - RunFunctionFmt(ref_wl_output_listener_##A->mode, "ppuiii", a, b, c, d, e, f); \ -} \ -static void* my_wl_output_listener_done_##A(void* a, void* b) \ -{ \ - RunFunctionFmt(ref_wl_output_listener_##A->done, "pp", a, b); \ -} \ -static void* my_wl_output_listener_scale_##A(void* a, void* b, int c) \ -{ \ - RunFunctionFmt(ref_wl_output_listener_##A->scale, "ppi", a, b, c); \ -} \ -static void* my_wl_output_listener_name_##A(void* a, void* b, void* c) \ -{ \ - RunFunctionFmt(ref_wl_output_listener_##A->name, "ppp", a, b, c); \ -} \ -static void* my_wl_output_listener_description_##A(void* a, void* b, void* c) \ -{ \ - RunFunctionFmt(ref_wl_output_listener_##A->description, "ppp", a, b, c); \ -} \ -static my_wl_output_listener_t my_wl_output_listener_fct_##A = { \ - (uintptr_t)my_wl_output_listener_geometry_##A, \ - (uintptr_t)my_wl_output_listener_mode_##A, \ - (uintptr_t)my_wl_output_listener_done_##A, \ - (uintptr_t)my_wl_output_listener_scale_##A, \ - (uintptr_t)my_wl_output_listener_name_##A, \ - (uintptr_t)my_wl_output_listener_description_##A \ +static my_wl_output_listener_t* ref_wl_output_listener_##A = NULL; \ +static void my_wl_output_listener_geometry_##A(void* a, void* b, int c, int d, int e, int f, int g, void* h, void* i, int j) \ +{ \ + RunFunctionFmt(ref_wl_output_listener_##A->geometry, "ppiiiiippi", a, b, c, d, e, f, g, h, i, j); \ +} \ +static void my_wl_output_listener_mode_##A(void* a, void* b, uint32_t c, int d, int e, int f) \ +{ \ + RunFunctionFmt(ref_wl_output_listener_##A->mode, "ppuiii", a, b, c, d, e, f); \ +} \ +static void my_wl_output_listener_done_##A(void* a, void* b) \ +{ \ + RunFunctionFmt(ref_wl_output_listener_##A->done, "pp", a, b); \ +} \ +static void my_wl_output_listener_scale_##A(void* a, void* b, int c) \ +{ \ + RunFunctionFmt(ref_wl_output_listener_##A->scale, "ppi", a, b, c); \ +} \ +static void my_wl_output_listener_name_##A(void* a, void* b, void* c) \ +{ \ + RunFunctionFmt(ref_wl_output_listener_##A->name, "ppp", a, b, c); \ +} \ +static void my_wl_output_listener_description_##A(void* a, void* b, void* c) \ +{ \ + RunFunctionFmt(ref_wl_output_listener_##A->description, "ppp", a, b, c); \ +} \ +static my_wl_output_listener_t my_wl_output_listener_fct_##A = { \ + (uintptr_t)my_wl_output_listener_geometry_##A, \ + (uintptr_t)my_wl_output_listener_mode_##A, \ + (uintptr_t)my_wl_output_listener_done_##A, \ + (uintptr_t)my_wl_output_listener_scale_##A, \ + (uintptr_t)my_wl_output_listener_name_##A, \ + (uintptr_t)my_wl_output_listener_description_##A \ }; SUPER() #undef GO @@ -250,18 +250,18 @@ typedef struct my_wl_seat_listener_s { uintptr_t name; //vFppp } my_wl_seat_listener_t; #define GO(A) \ -static my_wl_seat_listener_t* ref_wl_seat_listener_##A = NULL; \ -static void* my_wl_seat_listener_capabilities_##A(void* a, void* b, uint32_t c) \ -{ \ - RunFunctionFmt(ref_wl_seat_listener_##A->capabilities, "ppu", a, b, c); \ -} \ -static void* my_wl_seat_listener_name_##A(void* a, void* b, void* c) \ -{ \ - RunFunctionFmt(ref_wl_seat_listener_##A->name, "ppp", a, b, c); \ -} \ -static my_wl_seat_listener_t my_wl_seat_listener_fct_##A = { \ - (uintptr_t)my_wl_seat_listener_capabilities_##A, \ - (uintptr_t)my_wl_seat_listener_name_##A \ +static my_wl_seat_listener_t* ref_wl_seat_listener_##A = NULL; \ +static void my_wl_seat_listener_capabilities_##A(void* a, void* b, uint32_t c) \ +{ \ + RunFunctionFmt(ref_wl_seat_listener_##A->capabilities, "ppu", a, b, c); \ +} \ +static void my_wl_seat_listener_name_##A(void* a, void* b, void* c) \ +{ \ + RunFunctionFmt(ref_wl_seat_listener_##A->name, "ppp", a, b, c); \ +} \ +static my_wl_seat_listener_t my_wl_seat_listener_fct_##A = { \ + (uintptr_t)my_wl_seat_listener_capabilities_##A, \ + (uintptr_t)my_wl_seat_listener_name_##A \ }; SUPER() #undef GO @@ -292,63 +292,63 @@ typedef struct my_wl_pointer_listener_s { uintptr_t axis_relative_direction; //vFppuu } my_wl_pointer_listener_t; #define GO(A) \ -static my_wl_pointer_listener_t* ref_wl_pointer_listener_##A = NULL; \ -static void* my_wl_pointer_listener_enter_##A(void* a, void* b, uint32_t c, void* d, int e, int f) \ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->enter, "ppupii", a, b, c, d, e, f); \ -} \ -static void* my_wl_pointer_listener_leave_##A(void* a, void* b, uint32_t c, void* d) \ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->leave, "ppup", a, b, c, d); \ -} \ -static void* my_wl_pointer_listener_motion_##A(void* a, void* b, uint32_t c, int d, int e) \ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->motion, "ppuii", a, b, c, d, e); \ -} \ -static void* my_wl_pointer_listener_button_##A(void* a, void* b, uint32_t c, uint32_t d, uint32_t e, uint32_t f)\ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->button, "ppuuuu", a, b, c, d, e, f); \ -} \ -static void* my_wl_pointer_listener_axis_##A(void* a, void* b, uint32_t c, uint32_t d, int e) \ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->axis, "ppuui", a, b, c, d, e); \ -} \ -static void* my_wl_pointer_listener_frame_##A(void* a, void* b) \ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->frame, "pp", a, b); \ -} \ -static void* my_wl_pointer_listener_axis_source_##A(void* a, void* b, uint32_t c) \ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->axis_source, "ppu", a, b, c); \ -} \ -static void* my_wl_pointer_listener_axis_stop_##A(void* a, void* b, uint32_t c, uint32_t d) \ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->axis_stop, "ppuu", a, b, c, d); \ -} \ -static void* my_wl_pointer_listener_axis_discrete_##A(void* a, void* b, uint32_t c, int d) \ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->axis_discrete, "ppui", a, b, c, d); \ -} \ -static void* my_wl_pointer_listener_axis_value120_##A(void* a, void* b, uint32_t c, int d) \ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->axis_value120, "ppui", a, b, c, d); \ -} \ -static void* my_wl_pointer_listener_axis_relative_direction_##A(void* a, void* b, uint32_t c, uint32_t d)\ -{ \ - RunFunctionFmt(ref_wl_pointer_listener_##A->axis_relative_direction, "ppuu", a, b, c, d); \ -} \ -static my_wl_pointer_listener_t my_wl_pointer_listener_fct_##A = { \ - (uintptr_t)my_wl_pointer_listener_enter_##A, \ - (uintptr_t)my_wl_pointer_listener_leave_##A, \ - (uintptr_t)my_wl_pointer_listener_motion_##A, \ - (uintptr_t)my_wl_pointer_listener_button_##A, \ - (uintptr_t)my_wl_pointer_listener_axis_##A, \ - (uintptr_t)my_wl_pointer_listener_frame_##A, \ - (uintptr_t)my_wl_pointer_listener_axis_source_##A, \ - (uintptr_t)my_wl_pointer_listener_axis_stop_##A, \ - (uintptr_t)my_wl_pointer_listener_axis_discrete_##A, \ - (uintptr_t)my_wl_pointer_listener_axis_value120_##A, \ - (uintptr_t)my_wl_pointer_listener_axis_relative_direction_##A \ +static my_wl_pointer_listener_t* ref_wl_pointer_listener_##A = NULL; \ +static void my_wl_pointer_listener_enter_##A(void* a, void* b, uint32_t c, void* d, int e, int f) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->enter, "ppupii", a, b, c, d, e, f); \ +} \ +static void my_wl_pointer_listener_leave_##A(void* a, void* b, uint32_t c, void* d) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->leave, "ppup", a, b, c, d); \ +} \ +static void my_wl_pointer_listener_motion_##A(void* a, void* b, uint32_t c, int d, int e) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->motion, "ppuii", a, b, c, d, e); \ +} \ +static void my_wl_pointer_listener_button_##A(void* a, void* b, uint32_t c, uint32_t d, uint32_t e, uint32_t f) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->button, "ppuuuu", a, b, c, d, e, f); \ +} \ +static void my_wl_pointer_listener_axis_##A(void* a, void* b, uint32_t c, uint32_t d, int e) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->axis, "ppuui", a, b, c, d, e); \ +} \ +static void my_wl_pointer_listener_frame_##A(void* a, void* b) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->frame, "pp", a, b); \ +} \ +static void my_wl_pointer_listener_axis_source_##A(void* a, void* b, uint32_t c) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->axis_source, "ppu", a, b, c); \ +} \ +static void my_wl_pointer_listener_axis_stop_##A(void* a, void* b, uint32_t c, uint32_t d) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->axis_stop, "ppuu", a, b, c, d); \ +} \ +static void my_wl_pointer_listener_axis_discrete_##A(void* a, void* b, uint32_t c, int d) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->axis_discrete, "ppui", a, b, c, d); \ +} \ +static void my_wl_pointer_listener_axis_value120_##A(void* a, void* b, uint32_t c, int d) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->axis_value120, "ppui", a, b, c, d); \ +} \ +static void my_wl_pointer_listener_axis_relative_direction_##A(void* a, void* b, uint32_t c, uint32_t d) \ +{ \ + RunFunctionFmt(ref_wl_pointer_listener_##A->axis_relative_direction, "ppuu", a, b, c, d); \ +} \ +static my_wl_pointer_listener_t my_wl_pointer_listener_fct_##A = { \ + (uintptr_t)my_wl_pointer_listener_enter_##A, \ + (uintptr_t)my_wl_pointer_listener_leave_##A, \ + (uintptr_t)my_wl_pointer_listener_motion_##A, \ + (uintptr_t)my_wl_pointer_listener_button_##A, \ + (uintptr_t)my_wl_pointer_listener_axis_##A, \ + (uintptr_t)my_wl_pointer_listener_frame_##A, \ + (uintptr_t)my_wl_pointer_listener_axis_source_##A, \ + (uintptr_t)my_wl_pointer_listener_axis_stop_##A, \ + (uintptr_t)my_wl_pointer_listener_axis_discrete_##A, \ + (uintptr_t)my_wl_pointer_listener_axis_value120_##A, \ + (uintptr_t)my_wl_pointer_listener_axis_relative_direction_##A \ }; SUPER() #undef GO @@ -374,38 +374,38 @@ typedef struct my_wl_keyboard_listener_s { uintptr_t repeat_info; //vFppii } my_wl_keyboard_listener_t; #define GO(A) \ -static my_wl_keyboard_listener_t* ref_wl_keyboard_listener_##A = NULL; \ -static void* my_wl_keyboard_listener_keymap_##A(void* a, void* b, uint32_t c, int d, uint32_t e) \ -{ \ - RunFunctionFmt(ref_wl_keyboard_listener_##A->keymap, "ppuiu", a, b, c, d, e); \ -} \ -static void* my_wl_keyboard_listener_enter_##A(void* a, void* b, uint32_t c, void* d) \ -{ \ - RunFunctionFmt(ref_wl_keyboard_listener_##A->enter, "ppup", a, b, c, d); \ -} \ -static void* my_wl_keyboard_listener_leave_##A(void* a, void* b, uint32_t c, void* d) \ -{ \ - RunFunctionFmt(ref_wl_keyboard_listener_##A->leave, "ppup", a, b, c, d); \ -} \ -static void* my_wl_keyboard_listener_key_##A(void* a, void* b, uint32_t c, uint32_t d, uint32_t e, uint32_t f, uint32_t g)\ -{ \ - RunFunctionFmt(ref_wl_keyboard_listener_##A->key, "ppuuuuu", a, b, c, d, e, f, g); \ -} \ -static void* my_wl_keyboard_listener_modifiers_##A(void* a, void* b, uint32_t c, uint32_t d, uint32_t e, uint32_t f, uint32_t g)\ -{ \ - RunFunctionFmt(ref_wl_keyboard_listener_##A->modifiers, "ppuuuuu", a, b, c, d, e, f, g); \ -} \ -static void* my_wl_keyboard_listener_repeat_info_##A(void* a, void* b, int c, int d) \ -{ \ - RunFunctionFmt(ref_wl_keyboard_listener_##A->repeat_info, "ppii", a, b, c, d); \ -} \ -static my_wl_keyboard_listener_t my_wl_keyboard_listener_fct_##A = { \ - (uintptr_t)my_wl_keyboard_listener_keymap_##A, \ - (uintptr_t)my_wl_keyboard_listener_enter_##A, \ - (uintptr_t)my_wl_keyboard_listener_leave_##A, \ - (uintptr_t)my_wl_keyboard_listener_key_##A, \ - (uintptr_t)my_wl_keyboard_listener_modifiers_##A, \ - (uintptr_t)my_wl_keyboard_listener_repeat_info_##A \ +static my_wl_keyboard_listener_t* ref_wl_keyboard_listener_##A = NULL; \ +static void my_wl_keyboard_listener_keymap_##A(void* a, void* b, uint32_t c, int d, uint32_t e) \ +{ \ + RunFunctionFmt(ref_wl_keyboard_listener_##A->keymap, "ppuiu", a, b, c, d, e); \ +} \ +static void my_wl_keyboard_listener_enter_##A(void* a, void* b, uint32_t c, void* d) \ +{ \ + RunFunctionFmt(ref_wl_keyboard_listener_##A->enter, "ppup", a, b, c, d); \ +} \ +static void my_wl_keyboard_listener_leave_##A(void* a, void* b, uint32_t c, void* d) \ +{ \ + RunFunctionFmt(ref_wl_keyboard_listener_##A->leave, "ppup", a, b, c, d); \ +} \ +static void my_wl_keyboard_listener_key_##A(void* a, void* b, uint32_t c, uint32_t d, uint32_t e, uint32_t f, uint32_t g) \ +{ \ + RunFunctionFmt(ref_wl_keyboard_listener_##A->key, "ppuuuuu", a, b, c, d, e, f, g); \ +} \ +static void my_wl_keyboard_listener_modifiers_##A(void* a, void* b, uint32_t c, uint32_t d, uint32_t e, uint32_t f, uint32_t g) \ +{ \ + RunFunctionFmt(ref_wl_keyboard_listener_##A->modifiers, "ppuuuuu", a, b, c, d, e, f, g); \ +} \ +static void my_wl_keyboard_listener_repeat_info_##A(void* a, void* b, int c, int d) \ +{ \ + RunFunctionFmt(ref_wl_keyboard_listener_##A->repeat_info, "ppii", a, b, c, d); \ +} \ +static my_wl_keyboard_listener_t my_wl_keyboard_listener_fct_##A = { \ + (uintptr_t)my_wl_keyboard_listener_keymap_##A, \ + (uintptr_t)my_wl_keyboard_listener_enter_##A, \ + (uintptr_t)my_wl_keyboard_listener_leave_##A, \ + (uintptr_t)my_wl_keyboard_listener_key_##A, \ + (uintptr_t)my_wl_keyboard_listener_modifiers_##A, \ + (uintptr_t)my_wl_keyboard_listener_repeat_info_##A \ }; SUPER() #undef GO @@ -426,13 +426,13 @@ typedef struct my_wl_buffer_listener_s { uintptr_t release; //vFpp } my_wl_buffer_listener_t; #define GO(A) \ -static my_wl_buffer_listener_t* ref_wl_buffer_listener_##A = NULL; \ -static void* my_wl_buffer_listener_release_##A(void* a, void* b) \ -{ \ - RunFunctionFmt(ref_wl_buffer_listener_##A->release, "pp", a, b); \ -} \ -static my_wl_buffer_listener_t my_wl_buffer_listener_fct_##A = { \ - (uintptr_t)my_wl_buffer_listener_release_##A, \ +static my_wl_buffer_listener_t* ref_wl_buffer_listener_##A = NULL; \ +static void my_wl_buffer_listener_release_##A(void* a, void* b) \ +{ \ + RunFunctionFmt(ref_wl_buffer_listener_##A->release, "pp", a, b); \ +} \ +static my_wl_buffer_listener_t my_wl_buffer_listener_fct_##A = { \ + (uintptr_t)my_wl_buffer_listener_release_##A, \ }; SUPER() #undef GO @@ -454,7 +454,7 @@ typedef struct my_zwp_relative_pointer_v1_listener_s { } my_zwp_relative_pointer_v1_listener_t; #define GO(A) \ static my_zwp_relative_pointer_v1_listener_t* ref_zwp_relative_pointer_v1_listener_##A = NULL; \ -static void* my_zwp_relative_pointer_v1_listener_relative_motion_##A(void* a, void* b, uint32_t c, uint32_t d, int e, int f, int g, int h) \ +static void my_zwp_relative_pointer_v1_listener_relative_motion_##A(void* a, void* b, uint32_t c, uint32_t d, int e, int f, int g, int h) \ { \ RunFunctionFmt(ref_zwp_relative_pointer_v1_listener_##A->relative_motion, "ppuuiiii", a, b, c, d, e, f, g, h); \ } \ @@ -484,33 +484,33 @@ typedef struct my_zxdg_output_v1_listener_s { uintptr_t description; //vFppp } my_zxdg_output_v1_listener_t; #define GO(A) \ -static my_zxdg_output_v1_listener_t* ref_zxdg_output_v1_listener_##A = NULL; \ -static void* my_zxdg_output_v1_listener_logical_position_##A(void* a, void* b, int32_t c, int32_t d) \ -{ \ - RunFunctionFmt(ref_zxdg_output_v1_listener_##A->logical_position, "ppii", a, b, c, d); \ -} \ -static void* my_zxdg_output_v1_listener_logical_size_##A(void* a, void* b, int32_t c, int32_t d) \ -{ \ - RunFunctionFmt(ref_zxdg_output_v1_listener_##A->logical_size, "ppii", a, b, c, d); \ -} \ -static void* my_zxdg_output_v1_listener_done_##A(void* a, void* b) \ -{ \ - RunFunctionFmt(ref_zxdg_output_v1_listener_##A->done, "pp", a, b); \ -} \ -static void* my_zxdg_output_v1_listener_name_##A(void* a, void* b, void* c) \ -{ \ - RunFunctionFmt(ref_zxdg_output_v1_listener_##A->name, "ppp", a, b, c); \ -} \ -static void* my_zxdg_output_v1_listener_description_##A(void* a, void* b, void* c) \ -{ \ - RunFunctionFmt(ref_zxdg_output_v1_listener_##A->description, "ppp", a, b, c); \ -} \ -static my_zxdg_output_v1_listener_t my_zxdg_output_v1_listener_fct_##A = { \ - (uintptr_t)my_zxdg_output_v1_listener_logical_position_##A, \ - (uintptr_t)my_zxdg_output_v1_listener_logical_size_##A, \ - (uintptr_t)my_zxdg_output_v1_listener_done_##A, \ - (uintptr_t)my_zxdg_output_v1_listener_name_##A, \ - (uintptr_t)my_zxdg_output_v1_listener_description_##A, \ +static my_zxdg_output_v1_listener_t* ref_zxdg_output_v1_listener_##A = NULL; \ +static void my_zxdg_output_v1_listener_logical_position_##A(void* a, void* b, int32_t c, int32_t d) \ +{ \ + RunFunctionFmt(ref_zxdg_output_v1_listener_##A->logical_position, "ppii", a, b, c, d); \ +} \ +static void my_zxdg_output_v1_listener_logical_size_##A(void* a, void* b, int32_t c, int32_t d) \ +{ \ + RunFunctionFmt(ref_zxdg_output_v1_listener_##A->logical_size, "ppii", a, b, c, d); \ +} \ +static void my_zxdg_output_v1_listener_done_##A(void* a, void* b) \ +{ \ + RunFunctionFmt(ref_zxdg_output_v1_listener_##A->done, "pp", a, b); \ +} \ +static void my_zxdg_output_v1_listener_name_##A(void* a, void* b, void* c) \ +{ \ + RunFunctionFmt(ref_zxdg_output_v1_listener_##A->name, "ppp", a, b, c); \ +} \ +static void my_zxdg_output_v1_listener_description_##A(void* a, void* b, void* c) \ +{ \ + RunFunctionFmt(ref_zxdg_output_v1_listener_##A->description, "ppp", a, b, c); \ +} \ +static my_zxdg_output_v1_listener_t my_zxdg_output_v1_listener_fct_##A = { \ + (uintptr_t)my_zxdg_output_v1_listener_logical_position_##A, \ + (uintptr_t)my_zxdg_output_v1_listener_logical_size_##A, \ + (uintptr_t)my_zxdg_output_v1_listener_done_##A, \ + (uintptr_t)my_zxdg_output_v1_listener_name_##A, \ + (uintptr_t)my_zxdg_output_v1_listener_description_##A, \ }; SUPER() #undef GO @@ -562,4 +562,3 @@ EXPORT int my_wl_proxy_add_listener(x64emu_t* emu, void* proxy, void** l, void* } #include "wrappedlib_init.h" - |