GameCube InputDriver, and the base of WiiInputDriver: PAD (GameCube), the per-frame channel loop, merging the per-hardware state, and menu rumble. More...
#include <OgcInputDriver.h>
Public Member Functions | |
| void | init () override |
| Initializes the controller subsystem. | |
| void | shutdown () override |
| Shuts the controller subsystem down. | |
| void | update () override |
| Polls the hardware and dispatches InputPadData payloads to the UI. | |
| void | setRumble (int channel, bool rumble) override |
| Requests a rumble event on the specified controller channel. | |
| void | setContinuousRumble (int channel, bool continuous) override |
| Holds a channel's motor on (or releases it) until changed. Drivers cap an unbroken run and insert a short gap so the motor is not driven continuously. | |
Public Member Functions inherited from InputDriver | |
| void | setRumbleEnabled (bool enabled) |
| Globally enables or disables rumble requested through setRumble(). | |
| bool | isRumbleEnabled () const |
| void | setWiimoteOrientation (int orientation) |
| int | getWiimoteOrientation () const |
Protected Member Functions | |
| virtual void | initHardware () |
| Extension points for a console with more input hardware than GameCube pads. | |
| virtual void | scanHardware () |
| Called once per frame before the channels are read: poll the extra hardware. | |
| virtual void | readChannel (int channel, InputPadData &pad) |
Called once per channel per frame: add the extra hardware's state for channel to pad (each device in the slot of its own hardware profile) | |
| virtual bool | isSystemRumbleAllowed () const |
| False if the console's own settings disable controller rumble. | |
| virtual void | driveRumble (int channel, bool on) |
Drives the rumble motor of any controller other than the GameCube pad on channel; called every frame (and with false on shutdown) | |
Additional Inherited Members | |
Protected Attributes inherited from InputDriver | |
| bool | rumbleEnabled = true |
| see setRumbleEnabled() | |
| int | wiimoteOrientation = WIIMOTE_ORIENTATION_VERTICAL |
| see setWiimoteOrientation() | |
GameCube InputDriver, and the base of WiiInputDriver: PAD (GameCube), the per-frame channel loop, merging the per-hardware state, and menu rumble.
Consoles with more hardware (the Wii) derive from it and use the protected hooks.
Definition at line 20 of file OgcInputDriver.h.
| OgcInputDriver::OgcInputDriver | ( | ) |
Definition at line 43 of file OgcInputDriver.cpp.
|
override |
Definition at line 50 of file OgcInputDriver.cpp.
|
inlineprotectedvirtual |
Drives the rumble motor of any controller other than the GameCube pad on channel; called every frame (and with false on shutdown)
Reimplemented in WiiInputDriver.
Definition at line 51 of file OgcInputDriver.h.
|
overridevirtual |
Initializes the controller subsystem.
Implements InputDriver.
Definition at line 54 of file OgcInputDriver.cpp.
|
inlineprotectedvirtual |
Extension points for a console with more input hardware than GameCube pads.
The defaults do nothing, which is exactly a GameCube. Called from init() after the GameCube pads are up
Reimplemented in WiiInputDriver.
Definition at line 37 of file OgcInputDriver.h.
|
inlineprotectedvirtual |
False if the console's own settings disable controller rumble.
Reimplemented in WiiInputDriver.
Definition at line 47 of file OgcInputDriver.h.
|
inlineprotectedvirtual |
Called once per channel per frame: add the extra hardware's state for channel to pad (each device in the slot of its own hardware profile)
Reimplemented in WiiInputDriver.
Definition at line 44 of file OgcInputDriver.h.
|
inlineprotectedvirtual |
Called once per frame before the channels are read: poll the extra hardware.
Reimplemented in WiiInputDriver.
Definition at line 40 of file OgcInputDriver.h.
|
overridevirtual |
Holds a channel's motor on (or releases it) until changed. Drivers cap an unbroken run and insert a short gap so the motor is not driven continuously.
Implements InputDriver.
Definition at line 75 of file OgcInputDriver.cpp.
|
overridevirtual |
Requests a rumble event on the specified controller channel.
Implements InputDriver.
Definition at line 69 of file OgcInputDriver.cpp.
|
overridevirtual |
Shuts the controller subsystem down.
Implements InputDriver.
Definition at line 60 of file OgcInputDriver.cpp.
|
overridevirtual |
Polls the hardware and dispatches InputPadData payloads to the UI.
Implements InputDriver.
Definition at line 79 of file OgcInputDriver.cpp.