From: José Fonseca Date: Sun, 31 May 2009 02:51:33 +0000 (-0700) Subject: wgl: Fix debugging output. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be7c56be06183239008b168181aa6f1c78591579;p=mesa.git wgl: Fix debugging output. --- diff --git a/src/gallium/state_trackers/wgl/icd/stw_icd.c b/src/gallium/state_trackers/wgl/icd/stw_icd.c index 62af7652116..347f40aa06b 100644 --- a/src/gallium/state_trackers/wgl/icd/stw_icd.c +++ b/src/gallium/state_trackers/wgl/icd/stw_icd.c @@ -54,7 +54,15 @@ DrvCreateLayerContext( HDC hdc, INT iLayerPlane ) { - return stw_create_layer_context( hdc, iLayerPlane ); + DHGLRC r; + + r = stw_create_layer_context( hdc, iLayerPlane ); + + if (DBG) + debug_printf( "%s( %p, %i ) = %u\n", + __FUNCTION__, hdc, iLayerPlane, r ); + + return r; } DHGLRC APIENTRY @@ -68,7 +76,15 @@ BOOL APIENTRY DrvDeleteContext( DHGLRC dhglrc ) { - return stw_delete_context( dhglrc ); + BOOL r; + + r = stw_delete_context( dhglrc ); + + if (DBG) + debug_printf( "%s( %u ) = %u\n", + __FUNCTION__, dhglrc, r ); + + return r; } BOOL APIENTRY @@ -126,7 +142,7 @@ DrvGetProcAddress( r = stw_get_proc_address( lpszProc ); if (DBG) - debug_printf( "%s( \", __FUNCTION__%s\" ) = %p\n", lpszProc, r ); + debug_printf( "%s( \"%s\" ) = %p\n", __FUNCTION__, lpszProc, r ); return r; } @@ -515,14 +531,16 @@ DrvSetContext( DHGLRC dhglrc, PFN_SETPROCTABLE pfnSetProcTable ) { - if (DBG) - debug_printf( "%s( 0x%p, %u, 0x%p )\n", - __FUNCTION__, hdc, dhglrc, pfnSetProcTable ); - + PGLCLTPROCTABLE r = (PGLCLTPROCTABLE)&cpt; + if (!stw_make_current( hdc, dhglrc )) - return NULL; + r = NULL; - return (GLCLTPROCTABLE *)&cpt; + if (DBG) + debug_printf( "%s( 0x%p, %u, 0x%p ) = %p\n", + __FUNCTION__, hdc, dhglrc, pfnSetProcTable, r ); + + return r; } int APIENTRY