mcst-linux-kernel/patches-2024.06.26/Native_SDK-4.1/0001.Fix_Bug126734.patch

16 lines
432 B
Diff

--- a/Framework/PVRShell/OS/X11/ShellOS.cpp 2020-12-03 16:47:05.944742065 +0300
+++ b/Framework/PVRShell/OS/X11/ShellOS.cpp 2020-12-03 16:47:04.408706960 +0300
@@ -212,7 +212,11 @@
};
static Keys::Enum getKeyFromX11Code(int keycode)
{
- Keys::Enum key = X11_To_Keycode[keycode];
+ Keys::Enum key = X11_To_Keycode[0];
+ if (0 < keycode && keycode < 255)
+ {
+ key = X11_To_Keycode[keycode];
+ }
return key;
}