|
openMSX
|
Uses an SDL joystick to emulate an MSX joystick. More...
#include <Joystick.hh>


Public Member Functions | |
| Joystick (MSXEventDistributor &eventDistributor, StateChangeDistributor &stateChangeDistributor, CommandController &commandController, SDL_Joystick *joystick) | |
| virtual | ~Joystick () |
| virtual const std::string & | getName () const |
| virtual string_ref | getDescription () const |
| virtual void | plugHelper (Connector &connector, EmuTime::param time) |
| virtual void | unplugHelper (EmuTime::param time) |
| virtual byte | read (EmuTime::param time) |
| virtual void | write (byte value, EmuTime::param time) |
| template<typename Archive > | |
| void | serialize (Archive &ar, unsigned version) |
Public Member Functions inherited from openmsx::JoystickDevice | |
| virtual byte | read (EmuTime::param time)=0 |
| Read from the joystick device. | |
| virtual void | write (byte value, EmuTime::param time)=0 |
| Write a value to the joystick device. | |
| virtual string_ref | getClass () const |
| A pluggable belongs to a certain class. | |
Public Member Functions inherited from openmsx::Pluggable | |
| Pluggable () | |
| virtual | ~Pluggable () |
| virtual const std::string & | getName () const |
| Name used to identify this pluggable. | |
| virtual string_ref | getDescription () const =0 |
| Description for this pluggable. | |
| void | plug (Connector &connector, EmuTime::param time) |
| This method is called when this pluggable is inserted in a connector. | |
| void | unplug (EmuTime::param time) |
| This method is called when this pluggable is removed from a conector. | |
| Connector * | getConnector () const |
| Get the connector this Pluggable is plugged into. | |
| bool | isPluggedIn () const |
| Returns true if this pluggable is currently plugged into a connector. | |
Static Public Member Functions | |
| static void | registerAll (MSXEventDistributor &eventDistributor, StateChangeDistributor &stateChangeDistributor, CommandController &commandController, PluggingController &controller) |
| Register all available SDL joysticks. | |
Additional Inherited Members | |
Protected Member Functions inherited from openmsx::Pluggable | |
| virtual void | plugHelper (Connector &newConnector, EmuTime::param time)=0 |
| virtual void | unplugHelper (EmuTime::param time)=0 |
| void | setConnector (Connector *conn) |
Static Protected Attributes inherited from openmsx::JoystickDevice | |
| static const int | JOY_UP = 0x01 |
| static const int | JOY_DOWN = 0x02 |
| static const int | JOY_LEFT = 0x04 |
| static const int | JOY_RIGHT = 0x08 |
| static const int | JOY_BUTTONA = 0x10 |
| static const int | JOY_BUTTONB = 0x20 |
Private Member Functions inherited from openmsx::MSXEventListener | |
| virtual | ~MSXEventListener () |
| virtual void | signalEvent (const std::shared_ptr< const Event > &event, EmuTime::param time)=0 |
| This method gets called when an event you are subscribed to occurs. | |
| MSXEventListener () | |
Private Member Functions inherited from openmsx::StateChangeListener | |
| virtual void | signalStateChange (const std::shared_ptr< StateChange > &event)=0 |
| This method gets called when a StateChange event occurs. | |
| virtual void | stopReplay (EmuTime::param time)=0 |
| This method gets called when we switch from replayed events to live events. | |
| StateChangeListener () | |
| virtual | ~StateChangeListener () |
Uses an SDL joystick to emulate an MSX joystick.
Definition at line 23 of file Joystick.hh.
| openmsx::Joystick::Joystick | ( | MSXEventDistributor & | eventDistributor, |
| StateChangeDistributor & | stateChangeDistributor, | ||
| CommandController & | commandController, | ||
| SDL_Joystick * | joystick | ||
| ) |
Definition at line 146 of file Joystick.cc.
References openmsx::TclObject::addListElement(), openmsx::TclObject::getString(), StringOp::toString(), and xrange().
|
virtual |
Definition at line 183 of file Joystick.cc.
References openmsx::EmuTime::dummy(), openmsx::Pluggable::isPluggedIn(), and unplugHelper().
|
virtual |
Definition at line 199 of file Joystick.cc.
|
virtual |
Definition at line 194 of file Joystick.cc.
|
virtual |
Definition at line 204 of file Joystick.cc.
|
virtual |
Definition at line 227 of file Joystick.cc.
|
static |
Register all available SDL joysticks.
Definition at line 30 of file Joystick.cc.
References ad_printf, PLATFORM_ANDROID, and openmsx::PluggingController::registerPluggable().
Referenced by openmsx::PluggableFactory::createAll().
| void openmsx::Joystick::serialize | ( | Archive & | ar, |
| unsigned | version | ||
| ) |
Definition at line 338 of file Joystick.cc.
References openmsx::Pluggable::isPluggedIn().
|
virtual |
Definition at line 219 of file Joystick.cc.
References openmsx::MSXEventDistributor::unregisterEventListener(), and openmsx::StateChangeDistributor::unregisterListener().
Referenced by ~Joystick().
|
virtual |
Definition at line 232 of file Joystick.cc.
1.8.1.2