- In testsprite.c: main(), I changed
videoflags = SDL_SWSUFACE|SDL_ANYFORMAT;
to
videoflags = SDL_HWSURFACE|SDL_FULLSCREEN|SDL_DOUBLEBUF|SDL_ANYFORMAT;
In the examples I’ve seen, they usually set both SDL_SWSURFACE and
SDL_HWSURFACE, rather than one or the other. I’m not sure if there’s any
good reason behind that, but might be something worth trying. Maybe I should
look at the source and see what’s going on…
However I’m getting serious tearing and a frame rate
vastly exceeding the monitor refresh rate which. A printf
debug statement confirms SDL_Flip() is being executed.
My environment is Windows 2000 Professional, libSDL 1.1.8 for MinGW,
and DirectX 8 (which shouldn’t matter right?).
What is this MinGW I keep hearing about? From the context you are using it,
it sounds like some alternative to Win32 or something.
- In the course of exploring this, I also discovered what
may be a bug in testsprites.c when using the -fast flag.
In FastestFlags(),
SDL_Surface *screen = SDL_GetVideoSurface();
puts NULL in *screen causing a crash when attempting to
read screen->h and screen->pitch. At this point,
SDL_SetVideoMode in main() has not yet been executed, could
this be the cause?
That definately does sound like a bug. Any time you get a pointer back from
any function, you should always check it for NULL before attempting to
dereferencing it.
- What is the SDL Parachute and how can it be of help?
I think it’s a crash guard system designed to clean up the state of things if
the program crashes, like for example, switching you back to Windows mode
instead of leaving you in DirectX mode even though the program isn’t running
anymore. For me in linux, it only seems to get in the way by not allowing
the system to produce a core dump. Made it impossible to debug my
application. Luckily I found out about the SDL_NOPARACHUTE option.
- libSDL rocks! Even if it were only a DirectX wrapper, it
would already be a very welcome alternative to that @##%!#
API, the fact that it’s cross-platform just blows my mind!
Keep up the good work!
Yes, seems pretty cool so far. It’s the only library I’ve seen that allows
full screen mode under X. Doesn’t seem to switch to 8 bit mode, though. I’m
guessing this isn’t currently possible due to an X limitation. If that’s not
the case, could someone explain to me how I can get this working?
Anyway, I haven’t tried playing with it under Windows yet, but eventually I
will.On Tuesday 06 March 2001 03:40, you wrote: