XFree86 4.3.0, SDL 1.2.5 refresh rates

Message: 1

hello,

I can’t seem to get the following sdl defines to do their job for me,
although I defined them right before including sdl.h:

// Print all SDL errors to stderr.txt
#define SDL_DEBUG

Try SDL_putenv(“SDL_DEBUG=1”);On Sunday, April 13, 2003, at 03:01 PM, sdl-request at libsdl.org wrote:

From: “Blake D”
To:
Date: Sat, 12 Apr 2003 17:22:26 -0700
Subject: [SDL] SDL debug and leak defines not working for me
Reply-To: sdl at libsdl.org

i found a few threads in April
http://www.libsdl.org/pipermail/sdl/2003-April/053539.html
http://www.libsdl.org/pipermail/sdl/2003-April/053528.html
http://www.libsdl.org/pipermail/sdl/2003-April/053505.html

but after that i wasnt able to find mention of choosing refresh rates with
libsdl …
Gentoo was utilizing the patch here:
http://www.libsdl.org/pipermail/sdl/2003-April/053584.html
and rather than update it for 1.2.6 i was hoping to see the work integrated
officially into libsdl …

so the question is, has anything official come of this work ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030916/8d663dbc/attachment.pgp

Well, I’m the person who wrote the patch for SDL 1.2.5, and it was
integrated into SDL cvs at the time. It seems that someone else later
submitted a patch that either backed out the code I added, or extended on
it a little.

So SDL 1.2.6 does have a fix for refresh rates in that it always uses the
highest one reported by X, just like the behaviour of X 4.2. This was my
intention; to return SDL to X 4.2 functionality.

As for using the highest possible refresh rate supported by the monitor,
the problem is that X doesn’t always return that. For example, since I
have Windows installed (for testing cross-platform code), I know that my
monitor can do 800x600 at 150 Hz. It is returned by the monitor, and is
not a hacked modeline in Windows.

In Linux under X 4.3, the highest reported refresh rate for this
resolution is 85 Hz. So SDL can only use that, because as far as its
concerned, that is the highest refresh rate that exists. So I think
the problem is in X.

Long story short: SDL 1.2.6 does give the maximum refresh rate at a
particular resolution, as it did under X 4.2. But X isn’t giving all the
possible refresh rates, so SDL can’t do much about it.

SteveOn Tuesday 16 September 2003 09:29 pm, Mike Frysinger wrote:

i found a few threads in April
http://www.libsdl.org/pipermail/sdl/2003-April/053539.html
http://www.libsdl.org/pipermail/sdl/2003-April/053528.html
http://www.libsdl.org/pipermail/sdl/2003-April/053505.html

but after that i wasnt able to find mention of choosing refresh rates
with libsdl …
Gentoo was utilizing the patch here:
http://www.libsdl.org/pipermail/sdl/2003-April/053584.html
and rather than update it for 1.2.6 i was hoping to see the work
integrated officially into libsdl …

so the question is, has anything official come of this work ?
-mike

well that answers my original question, but i’m also curious as to whether the
refresh rate can be manipulated via environment variables as mentioned here:
http://www.libsdl.org/pipermail/sdl/2003-April/053555.html
-mike
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030916/03e0d33e/attachment.pgpOn Tuesday 16 September 2003 20:30, Stephen Anthony wrote:

Long story short: SDL 1.2.6 does give the maximum refresh rate at a
particular resolution, as it did under X 4.2. But X isn’t giving all the
possible refresh rates, so SDL can’t do much about it.

Honestly, I don’t know. The patch I submitted did have partial support
for that, but for some reason it was either backed out or otherwise
modified.

I am curious, why do you want to be able to select the refresh rate? Is
it so that you can get a lower one than normal? If so, then I guess that
has its uses.

But if you’ll be trying to select a higher rate, remember that SDL only
sees certain refresh rates. For example, if if only sees 85 Hz as the
highest rate, then it makes no difference if you specify to use 100 Hz.
It won’t exist, and you won’t get it (even if the monitor can do it).

The idea of my patch was to offer the ability to filter from among the
modes that SDL gets. It wouldn’t have the ability to magically get all
modes that the monitor can handle. That’s a job for X.

If enough people ask for this feature, maybe I’ll create another patch
(and hopefully it will stick in CVS this time :slight_smile:

SteveOn September 16, 2003 10:16 pm, Mike Frysinger wrote:

On Tuesday 16 September 2003 20:30, Stephen Anthony wrote:

Long story short: SDL 1.2.6 does give the maximum refresh rate at a
particular resolution, as it did under X 4.2. But X isn’t giving all
the possible refresh rates, so SDL can’t do much about it.

well that answers my original question, but i’m also curious as to
whether the refresh rate can be manipulated via environment variables
as mentioned here:
http://www.libsdl.org/pipermail/sdl/2003-April/053555.html
-mike

That would be me.

I changed it back to match X4.2 as you said, but your patch hadn’t
look at the problem with X4.3 and SDL.

Basically SDL read the modes backwards and all the other libraries read
it forwards and worked as normal with X4.3. Read the CVS. (Ignoring the
second patch comments where I mixed horizontal and vertical - late night
:slight_smile:

Any modelines in XF86Config will come before any X4.3 adds. If you want
a refresh rate put it in XF86Config. Do you use a different refresh for
games compared to desktop use? Or wait for SDL2.On Wed, 2003-09-17 at 11:27, Stephen Anthony wrote:

On September 16, 2003 10:16 pm, Mike Frysinger wrote:

On Tuesday 16 September 2003 20:30, Stephen Anthony wrote:

Long story short: SDL 1.2.6 does give the maximum refresh rate at a
particular resolution, as it did under X 4.2. But X isn’t giving all
the possible refresh rates, so SDL can’t do much about it.

well that answers my original question, but i’m also curious as to
whether the refresh rate can be manipulated via environment variables
as mentioned here:
http://www.libsdl.org/pipermail/sdl/2003-April/053555.html
-mike

Honestly, I don’t know. The patch I submitted did have partial support
for that, but for some reason it was either backed out or otherwise
modified.


Alan.

“One must never be purposelessnessnesslessness.”
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030917/2f510734/attachment.pgp