libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
OgcInputDriver.h
1/****************************************************************************
2 * Platform Abstraction Layer (OGC driver)
3 * Daryl Borth 2026
4 * OgcInputDriver.h
5 ***************************************************************************/
6#pragma once
7#include "../InputDriver.h"
8
13class OgcInputDriver : public InputDriver
14{
15 public:
16 OgcInputDriver();
17 ~OgcInputDriver() override;
18
19 void init() override;
20 void shutdown() override;
21 void update() override;
22 void setRumble(int channel, bool rumble) override;
23 void setContinuousRumble(int channel, bool continuous) override;
24
25 private:
26 bool rumbleRequest[4];
27 int menuRumbleFrames[4]; // frames left in the current menu "tick" (0 = idle)
28 int menuRumbleGapFrames[4]; // frames left in the enforced silent gap after a tick
29 bool continuousRumble[4]; // setContinuousRumble() state
30 int continuousRumbleCount[4];// consecutive frames the motor has been driven
31 int silenceFrames[4]; // frames left in the forced rest after a long continuous run
32};
Platform input backend GuiElements delegate to, via the per-channel InputController objects update() ...
Definition InputDriver.h:22
void update() override
Polls the hardware and dispatches InputPadData payloads to the UI.
void shutdown() override
Shuts the controller subsystem down.
void init() override
Initializes the controller subsystem.
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 s...
void setRumble(int channel, bool rumble) override
Requests a rumble event on the specified controller channel.