| View previous topic :: View next topic |
| Author |
Message |
zeGouky
Joined: 31 Oct 2005 Posts: 2
|
Posted: Mon Oct 31, 2005 4:13 am Post subject: SDL C++ problem |
|
|
Hi people,
i'm actually having some problems using the SDL with C++ code.
I have already search the forum and found a topic with a solution :
| Code: |
extern "C" int SDL_main( int argc, char *argv[] );
int SDL_main( int argc, char *argv[] ) {
|
but when i run my app on my PSP the screen go black and nothing happen. I have done this small test :
| Code: |
int SDL_main( int argc, char *argv[] ) {
int result;
result = SDL_Init( SDL_INIT_VIDEO |
SDL_INIT_AUDIO |
SDL_INIT_TIMER |
SDL_INIT_JOYSTICK );
if( !result )
exit(-1);
SDL_Quit();
return 0;
}
|
The app should init and shutdown right away but the psp is showing black screen and nothing ...
If anyone can help i really appreciate.
Thanks |
|
| Back to top |
|
 |
rinco
Joined: 21 Jan 2005 Posts: 255 Location: Canberra, Australia
|
Posted: Mon Oct 31, 2005 7:58 am Post subject: |
|
|
SDL_Init returns -1 on an error or 0 on success.
So you aren't running SDL_quit when you should. |
|
| Back to top |
|
 |
zeGouky
Joined: 31 Oct 2005 Posts: 2
|
Posted: Mon Oct 31, 2005 8:45 am Post subject: |
|
|
thanks for the reply,
anyway i found the problem , it was 2~3 problems and also a makefile setting. Everything is running fine but SDL is very slow on the PSP :-/
Thanks |
|
| Back to top |
|
 |
|