From 429263a90e55ed2c5f86af98a6c3d1bde43c3148 Mon Sep 17 00:00:00 2001
From: David Gow <[EMAIL REDACTED]>
Date: Wed, 9 Jun 2021 14:42:49 +0800
Subject: [PATCH] Propagate KEY{UP,DOWN} even if keycode is SDLK_UNKNOWN
Now that we have scancode and unicode values available, it's worth
actually handling keys which might not have an SDLK_ value in SDL 1.2.
---
src/SDL12_compat.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index dbc64b5..fdc57f0 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -2647,9 +2647,6 @@ EventFilter20to12(void *data, SDL_Event *event20)
return 1; /* ignore 2.0-style key repeat events */
}
event12.key.keysym.sym = Keysym20to12(event20->key.keysym.sym);
- if (event12.key.keysym.sym == SDLK12_UNKNOWN) {
- return 1; /* drop it if we can't map it */
- }
KeyState[event12.key.keysym.sym] = event20->key.state;
@@ -2672,9 +2669,6 @@ EventFilter20to12(void *data, SDL_Event *event20)
}
PendingKeydownEvent.key.keysym.sym = Keysym20to12(event20->key.keysym.sym);
- if (PendingKeydownEvent.key.keysym.sym == SDLK12_UNKNOWN) {
- return 1; /* drop it if we can't map it */
- }
KeyState[PendingKeydownEvent.key.keysym.sym] = event20->key.state;