Hello,
I am trying to fix the lack of vertical sync when running w:a in wine. Here's what I did so far:
https://github.com/pisto/wkWineVSyncI need some feedback, because right now I do get vsync (so a capped framerate at 60 Hz), but I see a fixed tear in the upper part of the screen.
Installation
Place as any Wormkit module in your w:a folder. Make sure you activate vertical sync in the advanced options menu. The module should be compatible with any version of w:a (probably even ancient ones), future ones included (barring catastrophic changes in the DirectDraw engine).
Technical trivia
w:a in wine seems to be single buffered, and the API that it uses to have vertical sync regardless in Windows is a stub in wine. Yet there exist a similar API (
http://www.opengl.org/registry/specs/SGI/video_sync.txt), which I'm calling explicitly in the module. It is and old API and probably being lesser and lesser honored by recent drivers: the proper way to have vertical sync is to use double buffering and set the swap control, but that means a big modification in either w:a or wine.
Compiling
The makefile should take care of everything for you. If you install the package that contains wineg++, whatever that is in your distro, you should be good. The source uses lightly C++11 (only auto typed variables if I recall correctly), so you cannot compile it with an archaic gcc or clang.