aboutsummaryrefslogtreecommitdiff
path: root/wglarb.c
diff options
context:
space:
mode:
Diffstat (limited to 'wglarb.c')
-rw-r--r--wglarb.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/wglarb.c b/wglarb.c
index ba543d6..a8bc126 100644
--- a/wglarb.c
+++ b/wglarb.c
@@ -33,7 +33,9 @@ static DWORD wglarb_intermediary_lock(void)
if( !wglarb_intermediary_mutex ) {
/* Between testing for the validity of the mutex handle,
* creating a new mutex handle and using the interlocked
- * exchange there is a race. */
+ * exchange there is a race... */
+
+ /* //// START \\\\ */
HANDLE const new_mutex =
CreateMutex(NULL, TRUE, NULL);
@@ -44,6 +46,8 @@ static DWORD wglarb_intermediary_lock(void)
new_mutex,
NULL );
+ /* //// FINISH \\\\ */
+
if( dst_mutex ) {
/* In this case we lost the race and another thread
* beat this thread in creating a mutex object.
@@ -85,7 +89,6 @@ static BOOL wglarb_intermediary_create_Wnd(void)
wc.lpszClassName = WGLARB_INTERMEDIARY_CLASS;
RegisterClass(&wc);
- /* Create a temporaray context to get address of wgl extensions. */
wglarb_intermediary_hWnd =
CreateWindowEx(
WGLARB_INTERMEDIARY_EXSTYLE,
@@ -95,7 +98,7 @@ static BOOL wglarb_intermediary_create_Wnd(void)
0,0,0,0,
NULL,NULL,
hInstance,
- NULL);
+ NULL );
if( !wglarb_intermediary_hWnd ) {
FALSE;
@@ -160,7 +163,7 @@ static BOOL wglarb_intermediary_makecurrent(HDC *hOrigDC, HGLRC *hOrigRC)
*hOrigRC = wglGetCurrentContext();
if( !wglarb_intermediary_hRC
- && !wglarb_intermediary_create_RC() ) {
+ && !wglarb_intermediary_create_RC() ) {
return FALSE;
}
@@ -184,8 +187,8 @@ HGLRC WINAPI wglarb_CreateContextAttribsARB(
}
PFNWGLCREATECONTEXTATTRIBSARBPROC impl =
- (PFNWGLCREATECONTEXTATTRIBSARBPROC) wglGetProcAddress(
- "wglCreateContextAttribsARB");
+ (PFNWGLCREATECONTEXTATTRIBSARBPROC)
+ wglGetProcAddress("wglCreateContextAttribsARB");
HGLRC ret = NULL;
if( impl ) {
@@ -218,13 +221,13 @@ BOOL WINAPI wglarb_ChoosePixelFormatARB(
PFNWGLCHOOSEPIXELFORMATARBPROC impl = NULL;
- impl = (PFNWGLCHOOSEPIXELFORMATARBPROC) wglGetProcAddress(
- "wglChoosePixelFormatARB");
+ impl = (PFNWGLCHOOSEPIXELFORMATARBPROC)
+ wglGetProcAddress("wglChoosePixelFormatARB");
if( !impl ) {
/* WGL_EXT_pixel_format uses the same function prototypes
* as the WGL_ARB_pixel_format extension */
- impl = (PFNWGLCHOOSEPIXELFORMATARBPROC) wglGetProcAddress(
- "wglChoosePixelFormatEXT");
+ impl = (PFNWGLCHOOSEPIXELFORMATARBPROC)
+ wglGetProcAddress("wglChoosePixelFormatEXT");
}
BOOL ret = FALSE;