From 6c47ba501b771ff35a8939a32887f75ab9284bdb Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 20 Oct 2024 01:50:33 +0200 Subject: [PATCH] fixed ijkl scrolling keys in SDL2 --- control.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/control.cpp b/control.cpp index 5bf246d7..e07e2c01 100644 --- a/control.cpp +++ b/control.cpp @@ -1016,7 +1016,11 @@ EX void mainloopiter() { ld t = (ticks - lastticks) * shiftmul / 1000.; lastticks = ticks; + #if CAP_SDL2 + #define dkey(x) keystate[int(x - 'a' + 4)] && DEFAULTNOR(x - 'a' + 4) + #else #define dkey(x) keystate[int(x)] && DEFAULTNOR(x) + #endif if(dkey('d')) full_rotate_camera(0, -t); if(dkey('a')) full_rotate_camera(0, t);