FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

gamepad support?

 
Post new topic   Reply to topic     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Sun May 06, 2007 2:56 pm    Post subject: gamepad support? Reply with quote

I noticed there is no support for gamepads / joysticks in arc (right?) and didn't find a ticket for it.

If it is wanted and nobody has planned on working on it, shall I implement it and send you a patch?
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Sun May 06, 2007 5:02 pm    Post subject: Reply with quote

If your up to it, you could implement it. I could attempt to implement it but I do not have a gamepad or a joystick.

Here's a link to SDL's API doc wiki

http://www.libsdl.org/cgi/docwiki.cgi/SDL_20API

I would definitely add it if you made a patch.

I'm going to add a ticket anyway...

http://www.dsource.org/projects/arclib/ticket/53#preview
Back to top
View user's profile Send private message AIM Address
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Sun May 06, 2007 5:49 pm    Post subject: Reply with quote

Ok I'll try to have it done soon, I think I can fit it in this week. I will follow the design of current mouse and keyboard implementation.
Back to top
View user's profile Send private message
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Sun May 13, 2007 10:14 am    Post subject: Reply with quote

I've made the patch and send it to Clay.

If anybody else wants to take a look, it's here: http://lutger.ifastnet.com/joystick_patch.zip

Included are the original files checked out today with the modified files and diffs. I don't have any experience with making patches, so please tell me if it should be done in a different manner.

I'm not 100% satisfied with the result, but it should work and do anything you would want. (Except for trackballs and hats). Feel free to give critique if you take a look at it.
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Sun May 13, 2007 9:32 pm    Post subject: Reply with quote

thanks!
Back to top
View user's profile Send private message AIM Address
ChristianK



Joined: 26 Sep 2006
Posts: 159
Location: Berlin, Germany

PostPosted: Mon May 14, 2007 1:39 pm    Post subject: Reply with quote

Thanks from me too!

Clay is currently gone and I'm pretty busy too, but rest assured that we'll look at and integrate your work eventually. Gamepad/Joystick support is too nice a feature to not have it.
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue May 22, 2007 11:28 am    Post subject: Reply with quote

I added the patch without any modifications and did a quick unittest test. Since I do not have any joysticks, the only thing I could test is that it could not find any joysticks Wink

I haven't had time to critique it, but from what I saw it looks like a good job, and only minor changes (if any) would need to be applied in the future. Thanks again!

~ Clay
Back to top
View user's profile Send private message AIM Address
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Tue May 22, 2007 3:37 pm    Post subject: Reply with quote

It is my pleasure to contribute Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 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