Extended joystick enumerations. The core event handling now supports

8 joysticks with 20 buttons (and 2 axis) each.  That should be more than
enough for now (famous last words).

Of course, this doesn't mean that whatever system you run Stella under
can have 8 joysticks with 20 buttons.  It means that *IF* your system
does have a 20-button joystick, then Stella can handle it without
a recompile.

This was mainly included for those people that have gamepads with
hats, throttles, etc.  There shouldn't be more than 20 of those
per gamepad, so each would be mapped to a button.

For now, the event handling core only knows about buttons and
left/right, up/down axis events (which can be considered a button
as well).  It will be up to the frontends to map whatever your
gamepad has (hat, wheel, etc.) to something that Stella can
understand (a button).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@196 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2003-09-30 18:46:12 +00:00
parent 87ba3c0b1e
commit bcd76bddfc
2 changed files with 7 additions and 4 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: StellaEvent.hxx,v 1.6 2003-09-29 18:10:56 stephena Exp $
// $Id: StellaEvent.hxx,v 1.7 2003-09-30 18:46:12 stephena Exp $
//============================================================================
#ifndef STELLAEVENT_HXX
@ -28,7 +28,7 @@
by the frontends directly.
@author Stephen Anthony
@version $Id: StellaEvent.hxx,v 1.6 2003-09-29 18:10:56 stephena Exp $
@version $Id: StellaEvent.hxx,v 1.7 2003-09-30 18:46:12 stephena Exp $
*/
class StellaEvent
{
@ -80,6 +80,7 @@ class StellaEvent
enum JoyStick
{
JSTICK_0, JSTICK_1, JSTICK_2, JSTICK_3,
JSTICK_4, JSTICK_5, JSTICK_6, JSTICK_7,
LastJSTICK
};
@ -88,6 +89,8 @@ class StellaEvent
JAXIS_UP, JAXIS_DOWN, JAXIS_LEFT, JAXIS_RIGHT,
JBUTTON_0, JBUTTON_1, JBUTTON_2, JBUTTON_3, JBUTTON_4,
JBUTTON_5, JBUTTON_6, JBUTTON_7, JBUTTON_8, JBUTTON_9,
JBUTTON_10, JBUTTON_11, JBUTTON_12, JBUTTON_13, JBUTTON_14,
JBUTTON_15, JBUTTON_16, JBUTTON_17, JBUTTON_18, JBUTTON_19,
LastJCODE
};
};

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: UserInterface.cxx,v 1.7 2003-09-30 01:22:45 stephena Exp $
// $Id: UserInterface.cxx,v 1.8 2003-09-30 18:46:12 stephena Exp $
//============================================================================
#include <sstream>
@ -666,7 +666,7 @@ UserInterface::RemapMenuItem UserInterface::ourRemapMenu[57] = {
/**
This array must be initialized in a specific order, matching
there initialization in StellaEvent::KeyCode.
their initialization in StellaEvent::KeyCode.
The other option would be to create an array of structures
(in StellaEvent.hxx) containing event/string pairs.