Fix: sym->sym accidentally changed to sym prevented keys working with SDL.

This commit is contained in:
Peter Nelson 2024-04-08 17:07:55 +01:00 committed by Peter Nelson
parent 74e09abf76
commit cdfffb551c
2 changed files with 2 additions and 2 deletions

View File

@ -310,7 +310,7 @@ static uint ConvertSdlKeyIntoMy(SDL_Keysym *sym, char32_t *character)
bool unprintable = false;
for (const auto &map : _vk_mapping) {
if (IsInsideBS(sym, map.vk_from, map.vk_count)) {
if (IsInsideBS(sym->sym, map.vk_from, map.vk_count)) {
key = sym->sym - map.vk_from + map.map_to;
unprintable = map.unprintable;
break;

View File

@ -438,7 +438,7 @@ static uint ConvertSdlKeyIntoMy(SDL_keysym *sym, char32_t *character)
uint key = 0;
for (const auto &map : _vk_mapping) {
if (IsInsideBS(sym, map.vk_from, map.vk_count)) {
if (IsInsideBS(sym->sym, map.vk_from, map.vk_count)) {
key = sym->sym - map.vk_from + map.map_to;
break;
}