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

Wii U InputDriver: VPAD for the GamePad (stick, buttons, and touch, channel 0 only) plus KPAD/WPAD for up to 4 Wiimotes/Nunchuks/Classic/ Pro Controllers. More...

#include <WutInputDriver.h>

Inheritance diagram for WutInputDriver:
[legend]

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.
 
void openHomeButtonOverlay ()
 Opens the Wii U system HOME-button overlay on demand.
 
- 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
 

Additional Inherited Members

- Protected Attributes inherited from InputDriver
bool rumbleEnabled = true
 see setRumbleEnabled()
 
int wiimoteOrientation = WIIMOTE_ORIENTATION_VERTICAL
 see setWiimoteOrientation()
 

Detailed Description

Wii U InputDriver: VPAD for the GamePad (stick, buttons, and touch, channel 0 only) plus KPAD/WPAD for up to 4 Wiimotes/Nunchuks/Classic/ Pro Controllers.

GamePad touch is mapped onto the unified cursor/button fields; IR pointer position is smoothed to counter KPADReadEx sampling faster/noisier than the UI update rate.

Definition at line 18 of file WutInputDriver.h.

Constructor & Destructor Documentation

◆ WutInputDriver()

WutInputDriver::WutInputDriver ( )

Definition at line 180 of file WutInputDriver.cpp.

◆ ~WutInputDriver()

WutInputDriver::~WutInputDriver ( )
override

Definition at line 195 of file WutInputDriver.cpp.

Member Function Documentation

◆ init()

void WutInputDriver::init ( )
overridevirtual

Initializes the controller subsystem.

Implements InputDriver.

Definition at line 199 of file WutInputDriver.cpp.

◆ openHomeButtonOverlay()

void WutInputDriver::openHomeButtonOverlay ( )

Opens the Wii U system HOME-button overlay on demand.

HOME itself is reported to the app as INPUT_BTN_HOME and is not handled by the OS.

Definition at line 220 of file WutInputDriver.cpp.

◆ setContinuousRumble()

void WutInputDriver::setContinuousRumble ( int channel,
bool continuous )
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 230 of file WutInputDriver.cpp.

◆ setRumble()

void WutInputDriver::setRumble ( int channel,
bool rumble )
overridevirtual

Requests a rumble event on the specified controller channel.

Implements InputDriver.

Definition at line 224 of file WutInputDriver.cpp.

◆ shutdown()

void WutInputDriver::shutdown ( )
overridevirtual

Shuts the controller subsystem down.

Implements InputDriver.

Definition at line 208 of file WutInputDriver.cpp.

◆ update()

void WutInputDriver::update ( )
overridevirtual

Polls the hardware and dispatches InputPadData payloads to the UI.

Implements InputDriver.

Definition at line 234 of file WutInputDriver.cpp.


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