[PATCH 09/13] Keymap: accept also (0x prefixed) hex values for scancodes |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- Subject: [PATCH 09/13] Keymap: accept also (0x prefixed) hex values for scancodes
- From: Eero Tamminen <oak@xxxxxxxxxxxxxx>
- Date: Sun, 21 Nov 2021 20:08:16 +0200
---
src/keymap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/keymap.c b/src/keymap.c
index e5200739..0e29a34f 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -631,7 +631,7 @@ static bool HostSpecToKeymap(const char *spec, KeyMapping* mapping)
Log_Printf(LOG_WARN, "extra '%s', PC/SDL scancode already set\n", token);
return false;
}
- scancode = strtol(token, &endptr, 10);
+ scancode = strtol(token, &endptr, 0);
if (!scancode)
{
Log_Printf(LOG_ERROR, "invalid PC/SDL scancode '%s'\n", token);
@@ -712,7 +712,7 @@ static bool GuestSpecToKeymap(const char *spec, KeyMapping* mapping)
Log_Printf(LOG_WARN, "extra '%s', ST scancode already set\n", token);
return false;
}
- scancode = strtol(token, &endptr, 10);
+ scancode = strtol(token, &endptr, 0);
if (!scancode)
{
Log_Printf(LOG_ERROR, "invalid ST scancode '%s'\n", token);
--
2.30.2
--------------6125158E9D8E923B9ED57408
Content-Type: text/x-patch; charset=UTF-8;
name="0008-Support-for-specifying-PC-SDL-key-modifiers-in-the-m.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0008-Support-for-specifying-PC-SDL-key-modifiers-in-the-m.pa";
filename*1="tch"