View Single Post
Old 03-16-12, 05:58 PM   #30
brebs
Registered User
 
Join Date: Jul 2007
Posts: 38
Smile Re: Wine + VSync forced in nvidia-settings doesn't work

This patch seems to work, to force vsync on in wine 1.4
Code:
diff -Naur wine-1.4.orig/dlls/wined3d/context.c wine-1.4/dlls/wined3d/context.c
--- wine-1.4.orig/dlls/wined3d/context.c	2012-03-07 23:11:48.000000000 +0700
+++ wine-1.4/dlls/wined3d/context.c	2012-03-17 04:39:55.203775940 +0700
@@ -1466,7 +1466,7 @@
 
     if (gl_info->supported[WGL_EXT_SWAP_CONTROL])
     {
-        if (!GL_EXTCALL(wglSwapIntervalEXT(swap_interval)))
+        if (!GL_EXTCALL(wglSwapIntervalEXT(1)))
             ERR("wglSwapIntervalEXT failed to set swap interval %d for context %p, last error %#x\n",
                 swap_interval, ret, GetLastError());
     }
diff -Naur wine-1.4.orig/dlls/winex11.drv/opengl.c wine-1.4/dlls/winex11.drv/opengl.c
--- wine-1.4.orig/dlls/winex11.drv/opengl.c	2012-03-07 23:11:48.000000000 +0700
+++ wine-1.4/dlls/winex11.drv/opengl.c	2012-03-17 04:38:41.975660369 +0700
@@ -3478,7 +3478,7 @@
         if (pglXSwapIntervalSGI)
         {
             wine_tsx11_lock();
-            ret = !pglXSwapIntervalSGI(interval);
+            ret = !pglXSwapIntervalSGI(1);
             wine_tsx11_unlock();
         }
         else
brebs is offline   Reply With Quote