[SDL] is SDL slow or?
Neil Bradley
nb at synthcom.com
Thu Nov 21 15:32:02 PST 2002
> I think the problem is 'back = SDL_DisplayFormat(tmpSurface);' both back and
> tmpSurface are global. I never get any msg from 'if(back == NULL)'.
> tmpSurface=SDL_LoadBMP("träd.bmp");
> if(tmpSurface == NULL){printf( "SDL error: %s\n", SDL_GetError());}
> if(tmpSurface !=
Well, if you get NULL back you probably don't want to keep running as the
code currently does. ;-)
Remember that printf is buffered output, so it may crash the app before it
has a chance to get dumped to the console.
This is one of the aspects of SDL that I don't like - it automatically
will do pixel conversion for you without your knowledge. This results in
really slow performance. The emulator I ported to using SDL had major
speed problems because of it and I had no idea why until I REALLY dug into
it. Of course the alternative is getting errors when blitting two
nonidentical surfaces but that seems preferable to having really sluggish
performance.
-->Neil
-------------------------------------------------------------------------------
Neil Bradley In the land of the blind, the one eyed man is not
Synthcom Systems, Inc. king - he's a prisoner.
ICQ #29402898
More information about the SDL
mailing list