GLFWGamepadLookup Namespace
Definition
Functions Index
| constexpr unsigned int | toArrayIndex (const helios::input::types::Gamepad gamepadId) noexcept |
|
Internal method to safely compute an array index for the specified gamepadId, adhering to the logic arrayIndex = log_2(gamepadId). More... | |
| int | from (const helios::input::types::Gamepad gamepadId) noexcept |
|
Provides a lookup for converting helios gamepad ids glfw-specific gamepad ids. More... | |
Functions
from()
| inline noexcept |
Provides a lookup for converting helios gamepad ids glfw-specific gamepad ids.
- Parameters
-
gamepadId The helios gamepad id to map to the gamepad ids registered by GLFW
- Returns
A gamepad-id in glfw space.
Definition at line 37 of file GLFWGamepadLookup.ixx.
References helios::input::types::FOUR, helios::input::types::ONE, helios::input::types::THREE, toArrayIndex and helios::input::types::TWO.
Referenced by helios::ext::glfw::input::GLFWInputAdapter::isConnected and helios::ext::glfw::input::GLFWInputAdapter::updateGamepadState.
toArrayIndex()
| constexpr noexcept |
Internal method to safely compute an array index for the specified gamepadId, adhering to the logic arrayIndex = log_2(gamepadId).
- Parameters
-
gamepadId The gamepadId for which the array index should be returned.
- Returns
the array index for the specified gamepadId.
Definition at line 25 of file GLFWGamepadLookup.ixx.
Referenced by from and helios::ext::glfw::input::GLFWInputAdapter::gamepadState.
The documentation for this namespace was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.