SDL_FULLSCREEN troubles, please help!

“When your app loses focus in fullscreen mode, all of
its hardware
surfaces are trashed. When the app regains focus, you
probably
reload all your surfaces. Did you forget to free the
old surfaces by
any chance?”

As far as I know, I dont make any surfaces but the one
created with SDL_SetVideoMode.
this is happening with a plain black opengl window.

I tried freeing surfaces and everything.
Its not just my programs, it also happens with ANY SDL
demos I find online as well.
If you have an exception, Id love to see it.
Or even better a demo or code snippet showing just a
plain opengl window that can
switch between fullscreen, lose focus, then go back,
all without leaking memory.
When I try to free the screen surface pointer on a
loss of focus, and recreate it, my monitor makes funny
sounds and I still lose the system resources…

Im at my wits end with this, I was doing so good until
this problem came up, and nobody seems willing to
help, instead they complain about me like
I havent tried every solution I could think of
before coming here.
Also people wondering what version of SDL Im using, I
thought it would be assumed that Im using the latest
version. I always use the newer versions of
everything!
people dont fix bugs for nothing! ;D__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

Hi Jason,

The ‘you lose all your surfaces’ snippet was in all likelihood from someone
who did not realize you were using OpenGL.

It is not necessary, nor advisable to manually release the surface created
when setting the video mode (see the online docs for verification on that
point).

Unfortunately, I’m running Windows2000 and not ME, so I cannot look into
your problem. The leak you describe definitely does NOT happen with my W2K
systems. I’m using the 1.2.3 and 1.2.4 pre-compiled DLLs. One system has a
Mesa 4.0.3 driver, one has a GF2MX with detonator 40.41, one has a
Radeon8500 (driver version recent, but unknown - that system is offline
right now). Each system is at SP3.

I used to have a 98 system configured, I think I ran SDL 1.2.2 on that
one… maybe 1.2.1? I task switch from my full-screen SDL applications as a
matter of course, and am confident the problem did not occur there either
(GF2MX, detonator was in the 30 series… 30.8x, maybe).

My limited experience with WindowsME has found it to be one of the least
pleasant Windows releases available. I strongly prefer 98 if I have to work
with the Win9x flavor of operating systems. The 9x series of operating
system is not recommended for development work, either. Release testing,
yes. Development, no.

My suggestion would be to get a true fullscreen application that uses OpenGL
without SDL and which allows you to switch focus to another application.
One possibility would be HalfLife, or any of the Quake-flavored games. If
this has the same problem, then you’ve got a driver issue.

Since there is no history on this post, and since I’m not going to go
digging, it would be good to know your video card and driver version as
well.

Im at my wits end with this, I was doing so good until
this problem came up, and nobody seems willing to
help, instead they complain about me like
I havent tried every solution I could think of
before coming here.

Admittedly, you do state that you have tried ‘everything’ in your original
post, but you must admit this is rather vague. ‘Everything’ can mean
anything to any number of people, and it is not helpful in diagnosing your
problem. Without details, the reader must assume ‘everything’ is minimal.
If you provide code for a minimal test case which exhibits the issue, that
is also helpful.

When posting a request for help to a newsgroup, you should not assume that
the readers will go out and search for ‘various’ applications and test the
problem. We’re all volunteers out here. Make it easy for people to help
you and they will.

Also people wondering what version of SDL Im using, I
thought it would be assumed that Im using the latest
version. I always use the newer versions of
everything!

While it would ne nice to be able to assume that everyone posting to the
newsgroup with a question had the latest versions of everything, one can
never assume that the original poster was even aware of the lastest updates
to the library or his/her system drivers.

Additionally, by not posting the versions you are using, it is difficult for
people looking back at your post to determine what versions you are
running - ‘latest’ applies to the date of your post, and an unknown number
of updates may have been provided in the meantime. Latest may also refer to
the then-current distribution, or it may refer to the then-current CVS
snapshot.

Finally, please re-read your previous post (the one I’m responding to) and
evaluate the tone of your message. While it is definitely frustrating to be
unable to find the help you need, your tone comes across as whingy and
irritated. When speaking to a volunteer audience, this tone is not helpful.

Hopefully with the additional details you can provide, we can help to
resolve your issue.

In the meantime, best of luck.
– Jeff