[SDL] Simple question: why SDL cannot set a videomode with the refresh rate too?

Gabriel Gambetta mystml at adinet.com.uy
Sun Apr 6 11:31:39 PDT 2008


Simple but utterly wrong - that has nothing to do with the refresh rate of
the video mode.

I needed to set the refresh rate by hand - in Windows this code should do
the trick:

DEVMODE pDevMode;
memset(&pDevMode, 0, sizeof(DEVMODE));
pDevMode.dmSize = sizeof(DEVMODE);
pDevMode.dmDisplayFrequency = 60;
pDevMode.dmFields = DM_DISPLAYFREQUENCY;
ChangeDisplaySettings(&pDevMode, CDS_FULLSCREEN);

Looking through the windx5 driver code, apparently it's selecting the mode
with the highest refresh rate for each resolution, so I guess it's
technically possible. I don't know why this isn't exposed.

--Gabriel



On Sun, Apr 6, 2008 at 5:02 AM, Marek Rehora <m.rehora at gmail.com> wrote:

> Simple answer: because SDL doesn't refresh the screen automaticaly.
> Refresh of the screen is done on your demand.
>
> On 04/04/2008, José Renato <jrcmilanez at gmail.com> wrote:
> >
> > Simple question: why SDL cannot set a videomode with the refresh rate
> > too?
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >
>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080406/66186f63/attachment.html 


More information about the SDL mailing list