diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
| commit | 6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch) | |
| tree | f085049b9615a7d03cca5de40adb6529d6c13e11 /src/game/client/io/gamepad.hh | |
| parent | f40d09cb8f712e87691af4912f3630d92d692779 (diff) | |
| download | voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2 voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip | |
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/game/client/io/gamepad.hh')
| -rw-r--r-- | src/game/client/io/gamepad.hh | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/game/client/io/gamepad.hh b/src/game/client/io/gamepad.hh index 9c56894..5f76277 100644 --- a/src/game/client/io/gamepad.hh +++ b/src/game/client/io/gamepad.hh @@ -1,10 +1,7 @@ #pragma once -namespace io -{ constexpr static int INVALID_GAMEPAD_AXIS = INT_MAX; constexpr static int INVALID_GAMEPAD_BUTTON = INT_MAX; -} // namespace io namespace config { @@ -14,23 +11,21 @@ class Float; struct GLFWgamepadstate; -namespace io::gamepad +namespace gamepad { extern bool available; extern config::Float deadzone; extern config::Boolean active; extern GLFWgamepadstate state; extern GLFWgamepadstate last_state; -} // namespace io::gamepad +} // namespace gamepad -namespace io::gamepad +namespace gamepad { void init(void); void update_late(void); -} // namespace io::gamepad +} // namespace gamepad -namespace io -{ // This simulates buttons using axes. When an axis // value exceeds 1.5 times the deadzone, the event is // queued with a GLFW_PRESS action, when it falls back @@ -47,4 +42,3 @@ struct GamepadButtonEvent final { int action; int button; }; -} // namespace io |
