forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SDL C++ problem

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
zeGouky



Joined: 31 Oct 2005
Posts: 2

PostPosted: Mon Oct 31, 2005 4:13 am    Post subject: SDL C++ problem Reply with quote

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
View user's profile Send private message
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Mon Oct 31, 2005 7:58 am    Post subject: Reply with quote

SDL_Init returns -1 on an error or 0 on success.

So you aren't running SDL_quit when you should.
Back to top
View user's profile Send private message
zeGouky



Joined: 31 Oct 2005
Posts: 2

PostPosted: Mon Oct 31, 2005 8:45 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group