mirror of
https://github.com/ptitSeb/box86.git
synced 2025-03-02 11:38:02 +00:00
Added option to disable the hack to force X11 GLX Extension beeing detected (help wine stuff while gl4es is not uet compatible)
This commit is contained in:
parent
042d55f734
commit
12ec1309bb
5
USAGE.md
5
USAGE.md
@ -74,6 +74,11 @@ To call XInitThreads when loading X11 (for old Loki games with Loki_Compat lib)
|
||||
* 0 : default, don't force call XInitThreads
|
||||
* 1 : Call XInitThreads as soon as libX11 is loaded
|
||||
|
||||
#### BOX86_X11GLX
|
||||
To Force libX11 GLX extension to be present
|
||||
* 0 : Disable the force.
|
||||
* 1 : default, GLX will always be present when using XQueryExtension
|
||||
|
||||
#### BOX86_DYNAREC_DUMP
|
||||
* 0 : Disable Dynarec blocks dump (default)
|
||||
* 1 : Enable Dynarec blocks dump
|
||||
|
12
src/main.c
12
src/main.c
@ -68,6 +68,7 @@ int box86_dynarec_trace = 0;
|
||||
int x11color16 = 0;
|
||||
#endif
|
||||
int x11threads = 0;
|
||||
int x11glx = 1;
|
||||
int allow_missing_libs = 0;
|
||||
int fix_64bit_inodes = 0;
|
||||
int box86_steam = 0;
|
||||
@ -296,6 +297,17 @@ void LoadLogEnv()
|
||||
if(x11threads)
|
||||
printf_log(LOG_INFO, "Try to Call XInitThreads if libX11 is loaded\n");
|
||||
}
|
||||
p = getenv("BOX86_X11GLX");
|
||||
if(p) {
|
||||
if(strlen(p)==1) {
|
||||
if(p[0]>='0' && p[1]<='0'+1)
|
||||
x11glx = p[0]-'0';
|
||||
}
|
||||
if(x11glx)
|
||||
printf_log(LOG_INFO, "Hack to force libX11 GLX extension present\n");
|
||||
else
|
||||
printf_log(LOG_INFO, "Disabled Hack to force libX11 GLX extension present\n");
|
||||
}
|
||||
p = getenv("BOX86_LIBGL");
|
||||
if(p)
|
||||
libGL = strdup(p);
|
||||
|
@ -19,7 +19,8 @@
|
||||
const char* libx11Name = "libX11.so.6";
|
||||
#define LIBNAME libx11
|
||||
|
||||
extern int x11threads;
|
||||
int x11threads;
|
||||
int x11glx;
|
||||
|
||||
typedef int (*XErrorHandler)(void *, void *);
|
||||
void* my_XSetErrorHandler(x86emu_t* t, XErrorHandler handler);
|
||||
@ -804,7 +805,7 @@ EXPORT int my_XQueryExtension(x86emu_t* emu, void* display, char* name, int* maj
|
||||
x11_my_t *my = (x11_my_t *)lib->priv.w.p2;
|
||||
|
||||
int ret = my->XQueryExtension(display, name, major, first_event, first_error);
|
||||
if(!ret && name && !strcmp(name, "GLX")) {
|
||||
if(!ret && name && !strcmp(name, "GLX") && x11glx) {
|
||||
// hack to force GLX to be accepted, even if not present
|
||||
// left major and first_XXX to default...
|
||||
ret = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user