| 515 | } |
| 516 | |
| 517 | float NormalizeAxisValue(const int16 axisVal) |
| 518 | { |
| 519 | // Normalize [-32768..32767] -> [-1..1] |
| 520 | const float norm = axisVal <= 0 ? 32768.0f : 32767.0f; |
| 521 | return float(axisVal) / norm; |
| 522 | } |
| 523 | |
| 524 | bool SDLInput::HandleEvent(SDLWindow* window, SDL_Event& event) |
| 525 | { |