epsilon checking on brightness and contrast cvars
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 26 Sep 2000 19:25:13 +0000 (19:25 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 26 Sep 2000 19:25:13 +0000 (19:25 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@47 d7cf8633-e32d-0410-b094-e92efae38249

gl_screen.c

index 717a04fde41716e18ee81f39017f205512a1b472..ad3691a3a5e9297589a2c1e4543619740757faca 100644 (file)
@@ -796,11 +796,11 @@ void GL_BrightenScreen()
        glDisable(GL_TEXTURE_2D);
        glEnable(GL_BLEND);
        f = brightness.value = bound(1.0f, brightness.value, 5.0f);
-       if (f > 1)
+       if (f >= 1.01f)
        {
                glBlendFunc (GL_DST_COLOR, GL_ONE);
                glBegin (GL_TRIANGLES);
-               while (f > 1)
+               while (f >= 1.01f)
                {
                        if (f >= 2)
                                glColor3f (1, 1, 1);
@@ -815,7 +815,7 @@ void GL_BrightenScreen()
        }
        glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        contrast.value = bound(0.2, contrast.value, 1.0);
-       if (contrast.value < 1.0f)
+       if (contrast.value < 0.99f)
        {
                glBegin (GL_TRIANGLES);
                glColor4f (1, 1, 1, 1-contrast.value);