Well, i experienced the same FPS problem in my SDL application that i am developing for the XBOX. These lines fixed it for me, i am getting constant 58 fps (instead of 5-6 fps) now.
This should be somewhere in the video initialization code:
CODE
screen = SDL_SetVideoMode(640, 480, 16, SDL_FULLSCREEN | SDL_SWSURFACE);
Search for SDL_Flip(), replace it with:
CODE
SDL_UpdateRect(screen, 0, 0, 0, 0);
Hope this helps...
This post has been edited by freakdave: May 27 2011, 07:40 PM
QUOTE
Thank you very much Freakdave, I will definitely test that. It's very interesting because it is supposed that "SDL_Flip()" does the same that "SDL_UpdateRect(screen, 0, 0, 0, 0)"... Are you talking about XDK or OpenXDK?
Besides, I was not awared that using SDL_SWSURFACE was better than SDL_HWSURFACE in a Xbox. Again, is this related to XDK or OpenXDK?
I am talking about libSDLx (XDK) in both cases:
SDL_Flip() is meant to be used with the SDL_DOUBLEBUF flag, it swaps the display (background, foreground) buffers for systems that support double buffering.
On systems that do not support double buffering, SDL_Flip will do the same as SDL_UpdateRect(screen, 0, 0, 0, 0).
In terms of speed, you should use SDL_HWSURFACE in combination with the SDL_DOUBLEBUF flag -> http://sdl.beuc.net/...DL_SetVideoMode
HOWEVER, for a decent frame rate on the XBOX (XDK, libSDLx) you might want to use the setup provided in my last post.