Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/macx
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2010-04-26 19:29:43 +0400
committerMikkel Krautz <mikkel@krautz.dk>2010-04-26 19:35:10 +0400
commit7d8d6cddcd0149b2c5af5bbcf975e1b5399d6e97 (patch)
tree817c376c15b4ac2a556a2b73bb49e2a804636204 /macx
parent6d3567b96ffce1e88cad410ab42df3fac2b91009 (diff)
Don't try to do overlay stuff if we're in an invalid GL context. Bump overlay version once again.
Diffstat (limited to 'macx')
-rw-r--r--macx/osax/osax.plist2
-rw-r--r--macx/overlay/overlay.m11
2 files changed, 12 insertions, 1 deletions
diff --git a/macx/osax/osax.plist b/macx/osax/osax.plist
index 9fcb585b4..2b5bc22ec 100644
--- a/macx/osax/osax.plist
+++ b/macx/osax/osax.plist
@@ -36,6 +36,6 @@
</dict>
</dict>
<key>MumbleOverlayLoaderVersion</key>
- <integer>3</integer>
+ <integer>4</integer>
</dict>
</plist>
diff --git a/macx/overlay/overlay.m b/macx/overlay/overlay.m
index ed67bfa3e..485d1f20f 100644
--- a/macx/overlay/overlay.m
+++ b/macx/overlay/overlay.m
@@ -522,6 +522,17 @@ void CGLFlushDrawableOverride(CGLContextObj ctx) {
Context *c = contexts;
+ /* Sometimes, we can get a FlushDrawable where the current context is NULL.
+ * Also, check that the context CGLFlushDrawable was called on is the active context.
+ * If it isn't, who knows what context we're drawing on?
+ *
+ * Maybe we should even use CGLSetCurrentContext() to switch to the context that's being
+ * flushed?
+ */
+ CGLContextObj current = CGLGetCurrentContext();
+ if (current == NULL || ctx != current)
+ goto skip;
+
GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);
int width = viewport[2];