Skip to content

Latest commit

 

History

History
61 lines (55 loc) · 3.09 KB

NOTES.md

File metadata and controls

61 lines (55 loc) · 3.09 KB

13 Feb

  • Looking at linux sound to try fix quake linux. Need oss /dev/dsp device, but oss has been replaced by ALSA (see below). ALSA replaced OSS, when OSS went proprietary, but subsequently OSS4 was released under opensource, but the integration has been minimal

10 April

  • Fixed GLX initialization (extension limit ed8974a08fceab21e126bbe88f36479406cd4db2)
  • Fixed full screen GL (fe4e67025e7b76b2c697877b137252ea61f1c2a3)
  • TODO: Restoring video mode on shutdown is not functioning (desktop is left at whatever resolution game ran at)

wip:

diff --git a/WinQuake/gl_vidlinuxglx.c b/WinQuake/gl_vidlinuxglx.c
index 3f5dd95..31b9b86 100644
--- a/WinQuake/gl_vidlinuxglx.c
+++ b/WinQuake/gl_vidlinuxglx.c
@@ -444,13 +444,24 @@ void VID_Shutdown(void)
                return;
        IN_DeactivateMouse();
        if (dpy) {
-               if (ctx)
+               XSync(dpy, False);
+               if (ctx) {
+                       printf("Found context, destroying...\n");
                        glXDestroyContext(dpy, ctx);
-               if (win)
+               }
+               if (win) {
+                       printf("Found window, destroying...\n");
                        XDestroyWindow(dpy, win);
-               if (vidmode_active)
+               }
+// This seems to hang, unsure why
+#define ATTEMPT_TO_FIX_X_GLX_BUG
+#ifdef ATTEMPT_TO_FIX_X_GLX_BUG
+               if (vidmode_active) {
+                       printf("Restoring video mode...\n");
                        XF86VidModeSwitchToMode(dpy, scrnum, vidmodes[0]);
+               }
                XCloseDisplay(dpy);
+#endif
        }
        vidmode_active = false;
        dpy = NULL;