diff options
| author | rajdakin <rajdakin@gmail.com> | 2024-02-10 15:06:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-10 15:06:08 +0100 |
| commit | b527ebbf5be0949df3b9dcf0806109acc8119476 (patch) | |
| tree | d9687f665b8e3a1facc15be822463bf7d274dacd /src/wrapped/wrappedsdl2.c | |
| parent | ad55cfde7f61395618991543694b35183f9c6ad7 (diff) | |
| download | box64-b527ebbf5be0949df3b9dcf0806109acc8119476.tar.gz box64-b527ebbf5be0949df3b9dcf0806109acc8119476.zip | |
Wrapped libraries refactor (#1257)
* [MISC] Removed a warning caused by tab/space mismatch * [WRAPPED] Factored out `getMy` and `freeMy` calls * [WRAPPED] Small cleanup of the init header * [WRAPPED] Factored out `SETALT` * [WRAPPED] Factored out needed libs
Diffstat (limited to 'src/wrapped/wrappedsdl2.c')
| -rw-r--r-- | src/wrapped/wrappedsdl2.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/wrapped/wrappedsdl2.c b/src/wrapped/wrappedsdl2.c index 930264c6..d12cea24 100644 --- a/src/wrapped/wrappedsdl2.c +++ b/src/wrapped/wrappedsdl2.c @@ -820,17 +820,17 @@ EXPORT void my2_SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, uint16_t *vend, u } } +#undef HAS_MY + +#define ALTMY my2_ + #define CUSTOM_INIT \ box64->sdl2lib = lib; \ getMy(lib); \ box64->sdl2allocrw = my->SDL_AllocRW; \ - box64->sdl2freerw = my->SDL_FreeRW; \ - SETALT(my2_); \ - setNeededLibs(lib, 4, \ - "libdl.so.2", \ - "libm.so.6", \ - "librt.so.1", \ - "libpthread.so.0"); + box64->sdl2freerw = my->SDL_FreeRW; + +#define NEEDED_LIBS "libdl.so.2", "libm.so.6", "librt.so.1", "libpthread.so.0" #define CUSTOM_FINI \ my->SDL_Quit(); \ @@ -841,5 +841,4 @@ EXPORT void my2_SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, uint16_t *vend, u my_context->sdl2allocrw = NULL; \ my_context->sdl2freerw = NULL; - #include "wrappedlib_init.h" |