https://bugs.winehq.org/show_bug.cgi?id=39911
Bug ID: 39911 Summary: dxd9 PresentationInterval not propagated on device Reset Product: Wine Version: 1.9.0 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: zakk@rsdio.com
Background: The steam game XIIZeal relies on vsync to run the game engine timing; under wine (on OSX) fullscreen runs at an unlimited speed, while on windows it runs at the refresh rate of your display.
Looking into this this is the sequence of events as best I can tell:
It creates a D3D9 Device with PresentationInterval set to D3DPRESENT_INTERVAL_IMMEDIATE Wine creates the device, swap chain, OpenGL context and eventually calls wglSwapInterval(0).
Then the game does a device Reset, in that reset the PresentationInterval is set to D3DPRESENT_INTERVAL_ONE. Wine does not ever call wglSwapInterval(1) after this reset, thus the framerate is never limited.
If I hack up wined3d_device_reset() to call wglSwapInterval() based on the PresentationInterval the game behaves as expected. However I don't know if this is the best way to approach this issue.