El ds 28 de 05 de 2011 a les 10:33 -0700, en/na Bill Kendrick va
> On Sat, May 28, 2011 at 12:40:36PM +0200, Pere Pujal i Carabantes wrote:
> > Hi all!
> > I've just improved the support for painting with a joystick, Can
> > somebody test?
> Thanks Pere, very exciting! I just tested with a Sony PlayStation 2
> control pad, connected to my laptop's USB via an older (original PlayStation
> era) adapter.
> The analog control worked fine. Pressing any button acts as clicking
> (X, O, square, triangle, the L1, L2, R1 and R2 shoulder buttons,
> Select, Start, and even pushing in on the analog controller -- though that
> I only noticed accidentally. Options to fine-tune would be nice.
> And maybe even connect some buttons to keypresses... e.g., L1 for ^Z undo,
> R1 for ^R redo? :) )
It detects ANY button and sends a mouse button event, this is in
Are there a mapping from L1, R1... to SDL button 0, button 1... ?
If different devices does different mappings, then we will go into
And, in any case, which buttons should be mapped to which actions?
> The digital control worked, but only moves the mouse pointer one pixel
> in any direction. (So I need to release, and press again, to move it
> another pixel, etc.)
So it is detected by SDL as a Hat, it does move just a pixel on purpose,
to allow more precition when placing the pointer, do you think this must
> I have a Stelladapter, which lets me use Atari 2600 (Commodore 64, etc.)
> joysticks on my PC, but it's hiding somewhere in a closet. (Ironically,
> there are two Atari joysticks sitting on the counter next to me. ;) )
> > Specially I am interested in the ball motion as my joystick hasn't a
> > ball.
> I don't have a "real PC joystick", and honestly, I'm not even sure what
> a ball is. (I _think_ I know what a hat is. :) )
I had to buy a joystick to mentor last year, now it is full of dust ;)
I "supose" that a ball is something similar to the trackball devices
from some times ago.
> > Also, I am interested too if the defaults values are good, now they are
> > the same as Ankit left in GSOC, in my joystick they work right, but the
> > 3200 low motion treshold seems too high, but I think too that used
> > joysticks may trigger unwanted motion events.
> I tried with the defaults, and it worked fine. This kind of thing will
> probably require a lot of testing and feedback from a much larger
> collection of people than even just us developers. (How often do I use
> any kind of "joystick" with my own PC? Basically never!)
> OTOH, I think I can track down a few folks who use Tux Paint with
> physically disabled users, who have been wanting joystick functionality...
> I can see if they can help beta test, if we can get builds made for them.
> > Also the default slowness is adapted to my box, so it should be tested
> > too.
> > commandline:
> > --joystick-slowness 0-500 default 15
> > --joystick-threshold 0-32766 default 3200
> > --joystick-maxsteps 0-7 default 7
> PS - I see you edited OPTIONS.txt. You should edit html/OPTIONS.html,
> and then run "make" in the "docs/" directory to regenerate the TXT version.
> (It invokes "links" browser with "-dump" option, and redirect's (>) the
> output to the TXT file.)
> Other docs that are HTML based (and TXT is generated) are:
> Oh, and I also added the options to the man page (src/manpage/tuxpaint.1)
Oh, OK, nice to know :)