diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-10-12 18:39:09 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-10-12 18:40:31 +0200 |
| commit | b6cd19b78bf3cce7cdc55c4210f5174eb8b76e28 (patch) | |
| tree | 9e4cd0c62f25f42145ac0e8f80c8caa82789d38c /src/wrapped32/wrappedlibgl.c | |
| parent | 6a3a19da68b6d4d59d368172f2f3e411326258fd (diff) | |
| download | box64-b6cd19b78bf3cce7cdc55c4210f5174eb8b76e28.tar.gz box64-b6cd19b78bf3cce7cdc55c4210f5174eb8b76e28.zip | |
[BOX32] More work on libX11 and friends, using more shadow structure like Screen and Visual (help wine, probably other too)
Diffstat (limited to 'src/wrapped32/wrappedlibgl.c')
| -rw-r--r-- | src/wrapped32/wrappedlibgl.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/wrapped32/wrappedlibgl.c b/src/wrapped32/wrappedlibgl.c index 8a45afe2..d520a6a8 100644 --- a/src/wrapped32/wrappedlibgl.c +++ b/src/wrapped32/wrappedlibgl.c @@ -16,8 +16,7 @@ #include "librarian.h" #include "callback.h" #include "gltools.h" -#include "libtools/my_x11_defs.h" -#include "libtools/my_x11_defs_32.h" +#include "libtools/my_x11_conv.h" extern const char* libglName; #define LIBNAME libgl @@ -28,8 +27,6 @@ extern const char* libglName; void* getDisplay(void* d); // define in 32bits wrappedx11.c -void convert_XVisualInfo_to_32(void* d, void* s); -void convert_XVisualInfo_to_64(void* d, void* s); // FIXME: old wrapped* type of file, cannot use generated/wrappedlibgltypes.h void* getGLProcAddress32(x64emu_t* emu, glprocaddress_t procaddr, const char* rname); EXPORT void* my32_glXGetProcAddress(x64emu_t* emu, void* name) @@ -498,7 +495,7 @@ static void* my32_glXGetVisualFromFBConfig_##A(x64emu_t* emu, void* dpy, void* c if(!res) \ return NULL; \ my_XVisualInfo_32_t* vinfo = (my_XVisualInfo_32_t*)res; \ - convert_XVisualInfo_to_32(vinfo, res); \ + convert_XVisualInfo_to_32(dpy, vinfo, res); \ return vinfo; \ } SUPER() @@ -526,7 +523,7 @@ static void* my32_glXChooseVisual_##A(x64emu_t* emu, void* dpy, int screen, int* if(!res) \ return NULL; \ my_XVisualInfo_32_t* vinfo = (my_XVisualInfo_32_t*)res; \ - convert_XVisualInfo_to_32(vinfo, res); \ + convert_XVisualInfo_to_32(dpy, vinfo, res); \ return vinfo; \ } SUPER() @@ -551,7 +548,7 @@ static void* my32_glXCreateContext_##A(x64emu_t* emu, void* dpy, my_XVisualInfo_ if(!my32_glXCreateContext_fct_##A) \ return NULL; \ my_XVisualInfo_t info_l = {0}; \ - convert_XVisualInfo_to_64(&info_l, info); \ + convert_XVisualInfo_to_64(dpy, &info_l, info); \ return my32_glXCreateContext_fct_##A (dpy, &info_l, shared, direct); \ } SUPER() @@ -946,7 +943,7 @@ EXPORT void* my32_glXGetVisualFromFBConfig(x64emu_t* emu, void* dpy, void* confi void* res = my->glXGetVisualFromFBConfig(dpy, config); if(!res) return NULL; my_XVisualInfo_32_t* vinfo = (my_XVisualInfo_32_t*)res; - convert_XVisualInfo_to_32(vinfo, res); + convert_XVisualInfo_to_32(dpy, vinfo, res); return vinfo; } @@ -955,14 +952,14 @@ EXPORT void* my32_glXChooseVisual(x64emu_t* emu, void* dpy, int screen, int* att void* res = my->glXChooseVisual(dpy, screen, attr); if(!res) return NULL; my_XVisualInfo_32_t* vinfo = (my_XVisualInfo_32_t*)res; - convert_XVisualInfo_to_32(vinfo, res); + convert_XVisualInfo_to_32(dpy, vinfo, res); return vinfo; } EXPORT void* my32_glXCreateContext(x64emu_t* emu, void* dpy, my_XVisualInfo_32_t* info, void* shared, int direct) { my_XVisualInfo_t info_l = {0}; - convert_XVisualInfo_to_64(&info_l, info); + convert_XVisualInfo_to_64(dpy, &info_l, info); return my->glXCreateContext(dpy, &info_l, shared, direct); } |