diff options
author | Daniel Borca <[email protected]> | 2004-01-13 08:46:12 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2004-01-13 08:46:12 +0000 |
commit | d0753661073125dad9aaaa6a37385b5f84a50a40 (patch) | |
tree | 261059780924c22efd28cc1f2475adafca3de56a /src/mesa/drivers/glide/fxwgl.c | |
parent | 66304ec6d12350073a339a54d308d625c3923125 (diff) |
small fixes
Diffstat (limited to 'src/mesa/drivers/glide/fxwgl.c')
-rw-r--r-- | src/mesa/drivers/glide/fxwgl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/drivers/glide/fxwgl.c b/src/mesa/drivers/glide/fxwgl.c index cf2d820bc74..7b323dd6171 100644 --- a/src/mesa/drivers/glide/fxwgl.c +++ b/src/mesa/drivers/glide/fxwgl.c @@ -325,7 +325,16 @@ wglCreateContext(HDC hdc) } #if FX_DEBUG + /* always log when debugging */ freopen("MESA.LOG", "w", stderr); +#else + /* log only if user wants */ + { + char *env = getenv("MESA_FX_INFO"); + if (env && env[0] == 'r') { + freopen("MESA.LOG", "w", stderr); + } + } #endif { @@ -707,8 +716,8 @@ wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR * ppfd) fprintf(pix_file, "dwLayerMask = %d\n",ppfd->dwLayerMask); fprintf(pix_file, "dwVisibleMask = %d\n",ppfd->dwVisibleMask); fprintf(pix_file, "dwDamageMask = %d\n",ppfd->dwDamageMask); - } fclose(pix_file); + } #endif #if 1 || QUAKE2 |