GLFWGamepadLookup.ixx File
GLFW gamepad mapping helpers. More...
Included Headers
#include <GLFW/glfw3.h>
#include <array>
#include <bit>
#include <helios.input.types.Gamepad>
Namespaces Index
| namespace | helios |
| namespace | ext |
|
Platform-specific extensions and backend implementations. More... | |
| namespace | glfw |
|
GLFW-specific implementations. More... | |
| namespace | input |
|
GLFW input handling. More... | |
| namespace | GLFWGamepadLookup |
Description
GLFW gamepad mapping helpers.
File Listing
The file content with the documentation metadata removed is:
15export namespace helios::ext::glfw::input::GLFWGamepadLookup {
25 constexpr unsigned int toArrayIndex(const helios::input::types::Gamepad gamepadId) noexcept {
37 inline int from(const helios::input::types::Gamepad gamepadId) noexcept {
39 static constexpr std::array<int, helios::input::types::Gamepad::size_> HELIOS_GAMEPAD_TO_GLFW=[] {
42 map[toArrayIndex(helios::input::types::Gamepad::ONE)] = GLFW_JOYSTICK_1;
43 map[toArrayIndex(helios::input::types::Gamepad::TWO)] = GLFW_JOYSTICK_2;
44 map[toArrayIndex(helios::input::types::Gamepad::THREE)] = GLFW_JOYSTICK_3;
45 map[toArrayIndex(helios::input::types::Gamepad::FOUR)] = GLFW_JOYSTICK_4;
50 return HELIOS_GAMEPAD_TO_GLFW[toArrayIndex(gamepadId)];
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.