summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2004-01-16 06:59:50 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2004-01-16 06:59:50 +0000
commit48e89df25bb3f54a719f4c11fb51254206fc71a6 (patch)
tree46e503041c455fcc9f66a9096ce1cd1a55fac5ff /src/mesa
parent546214f3c8aa7c63df8c77267dab16831dc7f884 (diff)
fixed refresh rate control in Glide wrapper
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dos/dmesa.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dos/dmesa.c b/src/mesa/drivers/dos/dmesa.c
index 33c17c144e..5432371386 100644
--- a/src/mesa/drivers/dos/dmesa.c
+++ b/src/mesa/drivers/dos/dmesa.c
@@ -1115,9 +1115,11 @@ DMesaVisual DMesaCreateVisual (GLint width,
freopen("MESA.LOG", "w", stderr);
}
- if (((env = getenv("FX_GLIDE_REFRESH")) == NULL) || !atoi(env)) {
- /* FX_GLIDE_REFRESH=0 has a special meaning for DJGPP Glide3x
- * (switch via VESA, using default refresh) and we'll not override that.
+ if (refresh && (((env = getenv("FX_GLIDE_REFRESH")) == NULL) || !atoi(env))) {
+ /* if we are passed non-zero value for refresh, we need to override
+ * default refresh rate. However, if FX_GLIDE_REFRESH is already set
+ * to 0, we won't override it, because it has a special meaning for
+ * DJGPP Glide3x (switch via VESA, using BIOS default refresh).
*/
char tmp[256];
sprintf(tmp, "FX_GLIDE_REFRESH=%u", refresh);