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

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

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 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

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.

–GabrielOn 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 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

I believe he?s talking about the monitor refresh rate (60hz, 80hz etc) but
for most situations, you shouldn?t have to even worry about this so not sure
why he would want it.

Heck, maybe he just wants to turn vsync off though :P_____

From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Marek Rehora
Sent: Sunday, April 06, 2008 1:03 AM
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] Simple question: why SDL cannot set a videomode with
therefresh rate too?

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 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

Good evening!

First, thanks for you help and interest!

The main idea is to select a resolution from a list of custom modelines,
all of them for arcade monitors (15.75 Khz of horizontal scan and 50/60
Hz for vertical scan).

For example, how do I select a custom modeline added at my /etc/fb.modes
like this:

320x240x60.00 @ 15.750kHz

mode "320x240x60.11"
geometry 320 240 320 240 16
timings 165344 24 8 15 4 32 3
hsync low
vsync low
endmode

I should select the 320x240x60.11 mode, but if I have another mode like
320x240x85, SDL can understand these two entries?

I’m working only with linux framebuffer console and it’s important for
arcade game emulators.

Thanks in advice!