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:
@@ -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)) {
|
||||
|
@@ -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 : {
|
||||
|
Reference in New Issue
Block a user