winex11: Silence a noisy winediag ERR in xrandr12_init_modes

André Hentschel nerv at dawncrow.de
Mon May 5 15:53:47 CDT 2014


If you have a bad nvidia driver, you get spammed with this, reading it one time is enough (even if it didn't made me switch to Nouveau)
---
 dlls/winex11.drv/xrandr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c
index fc09020..30f6f06 100644
--- a/dlls/winex11.drv/xrandr.c
+++ b/dlls/winex11.drv/xrandr.c
@@ -443,8 +443,9 @@ static int xrandr12_init_modes(void)
      * configuration. */
     if (output_info->nmode == 1 && XQueryExtension( gdi_display, "NV-CONTROL", &i, &j, &ret ))
     {
-        ERR_(winediag)("Broken NVIDIA RandR detected, falling back to RandR 1.0. "
-                       "Please consider using the Nouveau driver instead.\n");
+        static int once;
+        if (!once++) ERR_(winediag)("Broken NVIDIA RandR detected, falling back to RandR 1.0. "
+                                    "Please consider using the Nouveau driver instead.\n");
         ret = -1;
         goto done;
     }
-- 
1.8.1.2




More information about the wine-patches mailing list