[2/2] winex11: Multiply the error tolerance by the table caused error magnification
André Hentschel
nerv at dawncrow.de
Sun Sep 18 12:07:33 CDT 2011
some lines above that hunk you'll see:
/* compute differential (error estimate) for this entry */
/* some games use table-based logarithms that magnifies the error by 128 */
r_e = -r_lx * 128 / (c * r_lx * r_lx);
---
dlls/gdi32/tests/dc.c | 2 +-
dlls/winex11.drv/xvidmode.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c
index 9e2b3eb..9420f78 100644
--- a/dlls/gdi32/tests/dc.c
+++ b/dlls/gdi32/tests/dc.c
@@ -765,7 +765,7 @@ static void test_gamma(void)
ramp[0][0] = 0;
for (i = 1; i < 256; i++) ramp[0][i] = ramp[0][i - 1] + 512;
ret = SetDeviceGammaRamp(hdc, &ramp);
- todo_wine ok(ret, "SetDeviceGammaRamp failed\n");
+ ok(ret, "SetDeviceGammaRamp failed\n");
/* cleanup: set old ramp again */
ret = SetDeviceGammaRamp(hdc, &oldramp);
diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c
index 2d8a4eb..1f13737 100644
--- a/dlls/winex11.drv/xvidmode.c
+++ b/dlls/winex11.drv/xvidmode.c
@@ -335,7 +335,7 @@ static BOOL ComputeGammaFromRamp(WORD ramp[256], float *gamma)
return FALSE;
}
/* check that the gamma is reasonably uniform across the ramp */
- if (g_max - g_min > 0.1) {
+ if (g_max - g_min > 12.8) {
ERR("ramp not uniform (max=%f, min=%f, avg=%f), rejected\n", g_max, g_min, g_avg);
return FALSE;
}
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list