]> git.cworth.org Git - apitrace/blobdiff - glws_wgl.cpp
Add "apitrace trim" command.
[apitrace] / glws_wgl.cpp
index 63ce5fea1444748ef2f6c3956d1a732cb3fdef6d..59f47866331288521bc0de700f178ed3947e4238 100644 (file)
@@ -162,6 +162,14 @@ public:
 
     void swapBuffers(void) {
         SwapBuffers(hDC);
+
+        // Drain message queue to prevent window from being considered
+        // non-responsive
+        MSG msg;
+        while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+            TranslateMessage(&msg);
+            DispatchMessage(&msg);
+        }
     }
 };
 
@@ -199,7 +207,11 @@ cleanup(void) {
 }
 
 Visual *
-createVisual(bool doubleBuffer) {
+createVisual(bool doubleBuffer, Profile profile) {
+    if (profile != PROFILE_COMPAT) {
+        return NULL;
+    }
+
     Visual *visual = new Visual();
 
     visual->doubleBuffer = doubleBuffer;