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

Function fconfig_setcompressfromdpy

server/fakerconfig.cpp:498–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496
497
498static void fconfig_setcompressfromdpy(Display *dpy, FakerConfig &fc)
499{
500 if(fc.compress < 0)
501 {
502 bool useSunRay = false;
503 Atom atom = None;
504 if((atom = XInternAtom(dpy, "_SUN_SUNRAY_SESSION", True)) != None)
505 useSunRay = true;
506 const char *dstr = DisplayString(dpy);
507 if((strlen(dstr) && dstr[0] == ':') || (strlen(dstr) > 5
508 && !strnicmp(dstr, "unix", 4)))
509 {
510 if(useSunRay) fconfig_setcompress(fc, RRCOMP_XV);
511 else fconfig_setcompress(fc, RRCOMP_PROXY);
512 }
513 else
514 {
515 if(useSunRay) fconfig_setcompress(fc, RRCOMP_YUV);
516 else fconfig_setcompress(fc, RRCOMP_JPEG);
517 }
518 }
519}
520
521
522void fconfig_setdefaultsfromdpy(Display *dpy)

Callers 2

Calls 1

fconfig_setcompressFunction · 0.85

Tested by

no test coverage detected