1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 13:07:16 +00:00

fixed ijkl scrolling keys in SDL2

This commit is contained in:
Zeno Rogue 2024-10-20 01:50:33 +02:00
parent b756266ebe
commit 6c47ba501b

View File

@ -1016,7 +1016,11 @@ EX void mainloopiter() {
ld t = (ticks - lastticks) * shiftmul / 1000.; ld t = (ticks - lastticks) * shiftmul / 1000.;
lastticks = ticks; 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) #define dkey(x) keystate[int(x)] && DEFAULTNOR(x)
#endif
if(dkey('d')) full_rotate_camera(0, -t); if(dkey('d')) full_rotate_camera(0, -t);
if(dkey('a')) full_rotate_camera(0, t); if(dkey('a')) full_rotate_camera(0, t);