MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / fconfig_setprobeglxfromdpy

Function fconfig_setprobeglxfromdpy

server/fakerconfig.cpp:606–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604
605
606void fconfig_setprobeglxfromdpy(Display *dpy)
607{
608 CriticalSection::SafeLock l(fcmutex);
609
610 if(fconfig.probeglx < 0)
611 {
612 FakerConfig fc = fconfig;
613
614 fconfig_setcompressfromdpy(dpy, fc);
615
616 if(strlen(fc.transport) != 0 || fc.transvalid[RRTRANS_VGL] == 1)
617 {
618 int majorOpcode, firstEvent, firstError;
619
620 // XQuartz and Cygwin/X do not support stereo visuals, so there is no
621 // point in probing the 2D X server's visuals.
622 if(strstr(_XServerVendor(dpy), "Cygwin")
623 || _XQueryExtension(dpy, "Apple-DRI", &majorOpcode, &firstEvent,
624 &firstError)
625 || _XQueryExtension(dpy, "Apple-WM", &majorOpcode, &firstEvent,
626 &firstError))
627 fconfig.probeglx = 0;
628 else
629 fconfig.probeglx = 1;
630 }
631 else
632 fconfig.probeglx = 0;
633 }
634}
635
636
637#define PRCONF_INT(i) vglout.println(#i " = %d", fc.i)

Callers 1

buildVisAttribTableFunction · 0.85

Calls 1

Tested by

no test coverage detected