ddraw: Implement ForceRefreshRate registry entry for overriding DirectX refresh rate
Denver Gingerich
denver at ossguy.com
Fri Mar 7 17:52:23 CST 2008
On Fri, Mar 7, 2008 at 6:14 PM, Stefan Dösinger <stefan at codeweavers.com> wrote:
> Am Freitag, 7. März 2008 22:29:01 schrieb Denver Gingerich:
>
> > The DirectX refresh rate override feature that this patch implements is
> > described in main.c below.
> >
> > In order for the override to take effect only on SetDisplayMode and not on
> > RestoreDisplayMode it was necessary to move the functionality of
> > SetDisplayMode into a helper function (DDRAW_SetDisplayMode) and let
> > IDirectDrawImpl_SetDisplayMode and IDirectDrawImpl_RestoreDisplayMode call
> > the helper function.
> I have two concerns:
>
> First, do you have an application that needs this, or is this just for making
> this aspect of ddraw compatible with Windows? There's nothing wrong with that
> in principle, but I am curious
I described my reasoning to some extent in the following message/threads:
http://www.winehq.org/pipermail/wine-patches/2008-March/050965.html
http://www.winehq.org/pipermail/wine-devel/2008-March/063147.html
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.
> I do not really like the name DDRAW_SetDisplayMode. It somewhat goes away from
> the convention by starting with DDRAW, but yet it does not tell more about
> what the function does.
I modeled this after DDRAW_Create in dlls/ddraw/main.c. It seemed
like using a DDRAW_ prefix might specify a helper function so I went
with it. But I will admit it didn't seem that standard.
I couldn't really think of anything better than SetDisplayMode for a
suffix. Setting the display mode is what it does, after all. I could
rename it to something like SetDisplayModeHelper. Does that seem
reasonable? Are there other suggestions?
Denver
More information about the wine-devel
mailing list