1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-09 14:47:02 +02:00

Linux AZERTY keyboard layout support

This commit is contained in:
XProger
2021-01-03 16:39:21 +03:00
parent 26d226a6df
commit 87bb787032
2 changed files with 6 additions and 6 deletions

View File

@@ -6301,7 +6301,7 @@ namespace TR {
for (int j = 0; j < animTex.count; j++)
animTex.textures[j] = *(ptr++);
}
delete animTexBlock;
delete[] animTexBlock;
}
if (version & (VER_TR4 | VER_TR5)) {

View File

@@ -78,7 +78,7 @@ void sndFree() {
}
// Input
InputKey keyToInputKey(XKeyEvent event) {
InputKey keyToInputKey(Display *dpy, XKeyEvent event) {
KeySym code = XLookupKeysym(&event, 0);
if (code == XK_Shift_R) code = XK_Shift_L;
@@ -96,7 +96,7 @@ InputKey keyToInputKey(XKeyEvent event) {
};
for (int i = 0; i < COUNT(codes); i++) {
if (codes[i] == code) {
if (XKeysymToKeycode(dpy, codes[i]) == event.keycode) {
return (InputKey)(ikLeft + i);
}
}
@@ -350,7 +350,7 @@ void WndProc(const XEvent &e,Display*dpy,Window wnd) {
toggle_fullscreen(dpy,wnd);
break;
}
Input::setDown(keyToInputKey(e.xkey), e.type == KeyPress);
Input::setDown(keyToInputKey(dpy, e.xkey), e.type == KeyPress);
break;
case ButtonPress :
case ButtonRelease : {