mirror of https://github.com/OpenTTD/OpenTTD.git
Fix: sym->sym accidentally changed to sym prevented keys working with SDL.
This commit is contained in:
parent
74e09abf76
commit
cdfffb551c
|
@ -310,7 +310,7 @@ static uint ConvertSdlKeyIntoMy(SDL_Keysym *sym, char32_t *character)
|
||||||
bool unprintable = false;
|
bool unprintable = false;
|
||||||
|
|
||||||
for (const auto &map : _vk_mapping) {
|
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;
|
key = sym->sym - map.vk_from + map.map_to;
|
||||||
unprintable = map.unprintable;
|
unprintable = map.unprintable;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -438,7 +438,7 @@ static uint ConvertSdlKeyIntoMy(SDL_keysym *sym, char32_t *character)
|
||||||
uint key = 0;
|
uint key = 0;
|
||||||
|
|
||||||
for (const auto &map : _vk_mapping) {
|
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;
|
key = sym->sym - map.vk_from + map.map_to;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue