libgui 3.00
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
WiiInputDriver Class Reference

Wii InputDriver: a GameCube's PAD input (OgcInputDriver) plus WPAD (Wiimote, Nunchuk, Classic Controller, Wii U Pro Controller) and a libwiidrc channel that lets a Wii app read a Wii U GamePad. More...

#include <WiiInputDriver.h>

Inheritance diagram for WiiInputDriver:
[legend]

Protected Member Functions

void initHardware () override
 Extension points for a console with more input hardware than GameCube pads.
 
void scanHardware () override
 Called once per frame before the channels are read: poll the extra hardware.
 
void readChannel (int channel, InputPadData &pad) override
 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)
 
bool isSystemRumbleAllowed () const override
 False if the console's own settings disable controller rumble.
 
void driveRumble (int channel, bool on) override
 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

- Public Member Functions inherited from OgcInputDriver
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 Attributes inherited from InputDriver
bool rumbleEnabled = true
 see setRumbleEnabled()
 
int wiimoteOrientation = WIIMOTE_ORIENTATION_VERTICAL
 see setWiimoteOrientation()
 

Detailed Description

Wii InputDriver: a GameCube's PAD input (OgcInputDriver) plus WPAD (Wiimote, Nunchuk, Classic Controller, Wii U Pro Controller) and a libwiidrc channel that lets a Wii app read a Wii U GamePad.

Definition at line 18 of file WiiInputDriver.h.

Constructor & Destructor Documentation

◆ ~WiiInputDriver()

WiiInputDriver::~WiiInputDriver ( )
override

Definition at line 23 of file WiiInputDriver.cpp.

Member Function Documentation

◆ driveRumble()

void WiiInputDriver::driveRumble ( int channel,
bool on )
overrideprotectedvirtual

Drives the rumble motor of any controller other than the GameCube pad on channel; called every frame (and with false on shutdown)

Reimplemented from OgcInputDriver.

Definition at line 47 of file WiiInputDriver.cpp.

◆ initHardware()

void WiiInputDriver::initHardware ( )
overrideprotectedvirtual

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 from OgcInputDriver.

Definition at line 28 of file WiiInputDriver.cpp.

◆ isSystemRumbleAllowed()

bool WiiInputDriver::isSystemRumbleAllowed ( ) const
overrideprotectedvirtual

False if the console's own settings disable controller rumble.

Reimplemented from OgcInputDriver.

Definition at line 43 of file WiiInputDriver.cpp.

◆ readChannel()

void WiiInputDriver::readChannel ( int channel,
InputPadData & pad )
overrideprotectedvirtual

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 from OgcInputDriver.

Definition at line 149 of file WiiInputDriver.cpp.

◆ scanHardware()

void WiiInputDriver::scanHardware ( )
overrideprotectedvirtual

Called once per frame before the channels are read: poll the extra hardware.

Reimplemented from OgcInputDriver.

Definition at line 38 of file WiiInputDriver.cpp.


The documentation for this class was generated from the following files: