wined3d: add WINED3DPRESENT_INTERVAL_ONE flag (fix bug 9584)
stefandoesinger at gmx.at
Fri Sep 7 12:10:39 CDT 2007
Am Freitag, 7. September 2007 18:29:02 schrieb Louis. Lenders:
> I added this initially as a hack to get mame running, but what i understood
> from discussion on IRC, there's no way we can check the graphics card's for
> this capability now, and adding it as default (so without checking) would
> be rather harmless.
Short answer: Patch is ok with me
We can check if opengl supports vsync(which is what this flag does). WineD3D
implements vsync using GLX_SGI_video_sync. So if this extension is supported,
we should set the flag. If it is not supported, do not set it. Our WGL
implementation does not forward the GLX extension yet, so we do not support
vsync at the moment, so setting this flag means essentially lying to the app.
However, I think it is safe to pretend vsync support. The worst that may
happen is that the game renders with a higher framerate, and the hardware
consumes more power instead of beeing idle. I think both cases are better
then not running the game at all.
There's one game which runs into internal race conditions if vsync does not
work(need for speed 3), but that game doesn't even care to check that flag.
More information about the wine-patches