X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fkeygrabber.cpp;h=87fc6404dda44590fdc5a1d65c8927c5ca32ebb5;hb=d45cbbf10d32c4b44a924e19b0f4ee2fbe51b46c;hp=b9b285c5248574f47355dfbfd14bbdb5942ddeb7;hpb=0d7e70c5e34e691b15365901951700f43242065f;p=virtualjaguar diff --git a/src/gui/keygrabber.cpp b/src/gui/keygrabber.cpp index b9b285c..87fc640 100644 --- a/src/gui/keygrabber.cpp +++ b/src/gui/keygrabber.cpp @@ -7,7 +7,7 @@ // JLH = James Hammons // // Who When What -// --- ---------- ------------------------------------------------------------- +// --- ---------- ------------------------------------------------------------ // JLH 07/18/2011 Created this file // @@ -62,8 +62,11 @@ void KeyGrabber::keyPressEvent(QKeyEvent * e) void KeyGrabber::CheckGamepad(void) { - // How do we determine which joystick it is, if more than one? - // Possibly by a combobox selecting the stick you want to configure... + // How do we determine which joystick it is, if more than one? As it turns + // out, we don't really have to care. It's up to the user to play nice with + // the interface because while we can enforce a 'first user to press a + // button wins' type of thing, it doesn't really buy you anything that you + // couldn't get by having the users involved behave like nice people. :-P Gamepad::Update(); if (!buttonDown) @@ -73,6 +76,9 @@ void KeyGrabber::CheckGamepad(void) if (button == -1) return; +// Do it so that it sets the button on button down, not release :-P + key = button; + accept(); buttonDown = true; } else @@ -80,8 +86,8 @@ void KeyGrabber::CheckGamepad(void) if (Gamepad::CheckButtonPressed() == button) return; - key = button; - accept(); +// key = button; +// accept(); buttonDown = false; } }