From 4eaf4bfe215572e82b8ffab029e3527ae910f507 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 10 Dec 2013 14:09:37 -0800 Subject: [PATCH] Fill in the begin/end counting on win32. --- src/dispatch_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dispatch_common.c b/src/dispatch_common.c index cf2a398..002180b 100644 --- a/src/dispatch_common.c +++ b/src/dispatch_common.c @@ -134,7 +134,7 @@ struct api { * is trying to resolve, but given that it's basically just for * informative error messages, we shouldn't need to care. */ - int begin_count; + long begin_count; }; static struct api api = { @@ -420,7 +420,7 @@ PUBLIC void epoxy_glBegin(GLenum primtype) { #ifdef _WIN32 -#warning missing locking + InterlockedIncrement(&api.begin_count); #else pthread_mutex_lock(&api.mutex); api.begin_count++; @@ -436,7 +436,7 @@ epoxy_glEnd(void) epoxy_glEnd_unwrapped(); #ifdef _WIN32 -#warning missing locking + InterlockedDecrement(&api.begin_count); #else pthread_mutex_lock(&api.mutex); api.begin_count--;