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 Library question

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



Joined: 02 Jun 2007
Posts: 26

PostPosted: Thu Aug 23, 2007 3:14 am    Post subject: SDL Library question Reply with quote

Can anyone tell me if there is some SDL event that we can trap. I'll explain what I would like to do exactly.

In my main loop I would like to be able to trap the events like when the joystick is moving so this way I would only paint the "mouse" pointer when they actually move the mouse.

I hope you guys understand.

BTW: I do know there is a SDL_Event but I think it's mainly used for computer programming I think.

BTW 2: I do have alot of problem with the darn SDL Library can anyone direct me toward maybe another library that I could use to show Icons, Text and be able to change to another ttf font.

Cheers
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Thu Aug 23, 2007 7:11 am    Post subject: Reply with quote

http://svn.ps2dev.org/filedetails.php?repname=psp&path=%2Ftrunk%2FSDL%2Ftest%2Ftestjoystick.c&rev=0&sc=0

And the important bit:
Code:

                while ( SDL_PollEvent(&event) ) {
                        switch (event.type) {
                            case SDL_JOYAXISMOTION:
                                printf("Joystick %d axis %d value: %d\n",
                                       event.jaxis.which,
                                       event.jaxis.axis,
                                       event.jaxis.value);
                                break;


You have to open the joystick first, read through the file I linked and you should pick it up.
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