ddraw: Implement ForceRefreshRate registry entry for overriding DirectX refresh rate
denver at ossguy.com
Sat Mar 8 08:32:40 CST 2008
On Sat, Mar 8, 2008 at 5:33 AM, Stefan Dösinger <stefan at codeweavers.com> wrote:
> Am Samstag, 8. März 2008 00:52:23 schrieb Denver Gingerich:
> > Basically, I am running an application that calls SetDisplayMode and
> > doesn't specify a refresh rate. ChangeDisplaySettingsEx picks the
> > first mode that matches the bpp, and resolution, and that mode just so
> > happens to have a bad refresh rate for me. So I want a way to
> > override it.
> Fair enough. I can't argue that using this key for that is wrong, since it
> exists as-is on Windows, but it doesn't really attack the root of the
> problem. You'll run into the same issue again with d3d8/9 apps or apps that
> use ChangeDisplaySettingsEx directly with a refresh rate of 0
The problem is that Windows doesn't attack the root of the problem so
Wine can't either. The previous patch I sent  changed the behavior
of ChangeDisplaySettingsEx and even allowed you to customize the
refresh rate at different resolutions, which I felt was attacking the
root of the problem. But since Windows doesn't do it that way, the
patch was rejected.
Some limited testing has revealed that Windows usually picks the first
mode that matches the bpp and resolution when no refresh rate is given
to ChangeDisplaySettingsEx. I will post the complete results of my
tests when I get around to it.
The only way I've found to force a refresh rate for a program that
uses ChangeDisplaySettingsEx is to change the available refresh rates
of the monitor, which is essentially changing the list of modes
available. Changing the list of modes is not something Wine handles.
Rather, it's up to the libraries it uses (like Xrandr) to modify the
So I think we're stuck with leaving ChangeDisplaySettingsEx as it is
and implementing what hacks Windows has for DirectX applications so
that we can at least get a partial fix.
More information about the wine-devel