Skip to content

Commit

Permalink
[BOX32][WRAPPER] Hacked some support for libGLX_nvidia.so.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Oct 13, 2024
1 parent 1936052 commit 59ba2fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/library_list_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ GO("ld-linux.so.2", ldlinux)

GO("libGL.so", libgl)
GO("libGL.so.1", libgl)
GO("libGLX_nvidia.so.0", libgl)
GO("libGLU.so.1", libglu)
GO("libSDL-1.2.so.0", sdl1)
GO("libSDL2-2.0.so.0", sdl2)
Expand Down
9 changes: 8 additions & 1 deletion src/wrapped32/wrappedlibgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,14 @@ static void* find_glVDPAUUnmapSurfacesNV_Fct(void* fct)

#undef SUPER

#define PRE_INIT if(box64_libGL) {lib->w.lib = dlopen(box64_libGL, RTLD_LAZY | RTLD_GLOBAL); lib->path = strdup(box64_libGL);} else
#define PRE_INIT \
if(box64_libGL) { \
lib->w.lib = dlopen(box64_libGL, RTLD_LAZY | RTLD_GLOBAL); \
lib->path = strdup(box64_libGL); \
} else if(strstr(lib->name, "libGLX_nvidia.so.0")) { \
lib->w.lib = dlopen("libGLX_nvidia.so.0", RTLD_LAZY | RTLD_GLOBAL); \
if(lib->w.lib) lib->path = strdup("libGLX_nvidia.so.0"); \
}
#define CUSTOM_INIT \
my_lib = lib; \
lib->w.priv = dlsym(lib->w.lib, "glXGetProcAddress"); \
Expand Down

0 comments on commit 59ba2fc

Please sign in to comment.