From 8710e9b8c8a276f306caa254b803e864ebca02f4 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Mon, 6 May 2024 16:50:49 +0100 Subject: [PATCH] Fix #12608: SDL keycode to vkey mapping --- src/video/sdl2_v.cpp | 2 +- src/video/sdl_v.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index 93a74a2b13..08723ef3b6 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -246,7 +246,7 @@ struct SDLVkMapping { const bool unprintable; constexpr SDLVkMapping(SDL_Keycode vk_first, SDL_Keycode vk_last, uint8_t map_first, [[maybe_unused]] uint8_t map_last, bool unprintable) - : vk_from(vk_first), vk_count(vk_first - vk_last + 1), map_to(map_first), unprintable(unprintable) + : vk_from(vk_first), vk_count(vk_last - vk_first + 1), map_to(map_first), unprintable(unprintable) { assert((vk_last - vk_first) == (map_last - map_first)); } diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index 2e069271f6..17041ab064 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -378,7 +378,7 @@ struct SDLVkMapping { const uint8_t map_to; constexpr SDLVkMapping(SDLKey vk_first, SDLKey vk_last, uint8_t map_first, [[maybe_unused]] uint8_t map_last) - : vk_from(vk_first), vk_count(vk_first - vk_last + 1), map_to(map_first) + : vk_from(vk_first), vk_count(vk_last - vk_first + 1), map_to(map_first) { assert((vk_last - vk_first) == (map_last - map_first)); }