diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-05-09 18:06:52 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-05-09 18:06:52 +0200 |
| commit | 6ef734960abfb83501cf2236ae41624c0375f570 (patch) | |
| tree | c4870f8113a7dd23fdd4c1fbd26d7796fb6b6317 /src/include | |
| parent | 244e3eafdf05ddef3b75c88c362ffc62ffbf2584 (diff) | |
| download | box64-6ef734960abfb83501cf2236ae41624c0375f570.tar.gz box64-6ef734960abfb83501cf2236ae41624c0375f570.zip | |
Some refactor on wrapped lib handling, to limit calloc/free used and get more straight forward usage of native wrapped functions (ported from box86)
Diffstat (limited to 'src/include')
| -rwxr-xr-x | src/include/box64context.h | 8 | ||||
| -rwxr-xr-x | src/include/wrappedlibs.h | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/include/box64context.h b/src/include/box64context.h index 371fdce3..1a4fd077 100755 --- a/src/include/box64context.h +++ b/src/include/box64context.h @@ -140,14 +140,6 @@ typedef struct box64context_s { void* sdl2freerw; library_t *sdl2mixerlib; library_t *x11lib; - library_t *libxcb; - library_t *libxcbxfixes; - library_t *libxcbshape; - library_t *libxcbshm; - library_t *libxcbrandr; - library_t *libxcbimage; - library_t *libxcbkeysyms; - library_t *libxcbxtest; library_t *zlib; library_t *vorbisfile; library_t *vorbis; diff --git a/src/include/wrappedlibs.h b/src/include/wrappedlibs.h index f78dcfb2..d593f3f4 100755 --- a/src/include/wrappedlibs.h +++ b/src/include/wrappedlibs.h @@ -4,11 +4,16 @@ typedef struct library_s library_t; typedef struct box64context_s box64context_t; +typedef struct wlib_s wlib_t; typedef int (*wrappedlib_init_t)(library_t * lib, box64context_t* box64); // 0 = success typedef void (*wrappedlib_fini_t)(library_t * lib); typedef int (*wrappedlib_get_t)(library_t* lib, const char* name, uintptr_t *offs, uintptr_t *sz, int version, const char* vername, int local); +void setNeededLibs(wlib_t* wlib, int n, ...); +#define SETALT(A) lib->altmy = strdup(#A) +#define SETALTPREFIX(A) lib->priv.w.altprefix = strdup(A) + typedef struct wrappedlib_s { const char* name; wrappedlib_init_t init; |