libgui
3.00
libgui is a GUI library for the GameCube, Wii, and Wii U
Loading...
Searching...
No Matches
OgcInputUtil.h
1
/****************************************************************************
2
* Platform Abstraction Layer (OGC driver)
3
* Daryl Borth 2026
4
* OgcInputUtil.h
5
*
6
* Small helpers shared by the GameCube/Wii input code (OgcInputDriver, the
7
* Wii extension drivers and the USB controller adapters).
8
***************************************************************************/
9
#pragma once
10
11
static
inline
float
OgcClampf(
float
v,
float
lo,
float
hi) {
12
return
(v < lo) ? lo : (v > hi) ? hi : v;
13
}
14
16
static
inline
float
OgcStickToFloat(
int
v) {
17
return
OgcClampf((
float
)v / 128.0f, -1.0f, 1.0f);
18
}
source
drivers
ogc
OgcInputUtil.h
Generated by
1.13.2