From 122524bd1965345c3421aea42c3c2131dc790256 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 18 Aug 2023 09:12:10 +0200 Subject: [PATCH] Fix linux build --- Source/Engine/Platform/Linux/LinuxPlatform.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/Engine/Platform/Linux/LinuxPlatform.cpp b/Source/Engine/Platform/Linux/LinuxPlatform.cpp index 5a74d8f68..ab314ab72 100644 --- a/Source/Engine/Platform/Linux/LinuxPlatform.cpp +++ b/Source/Engine/Platform/Linux/LinuxPlatform.cpp @@ -2191,6 +2191,7 @@ bool LinuxPlatform::Init() // Initialize "X11 keycode" -> "Flax KeyboardKeys" map KeyCodeMap.Resize(desc->max_key_code + 1); + Platform::MemoryClear(KeyCodeMap.Get(), KeyCodeMap.Count() * sizeof(KeyboardKeys)); XkbFreeNames(desc, XkbKeyNamesMask, 1); X11::XkbFreeKeyboard(desc, 0, 1); for (int32 keyIdx = (int32)KeyboardKeys::None; keyIdx < MAX_uint8; keyIdx++) @@ -2206,10 +2207,6 @@ bool LinuxPlatform::Init() KeyCodeMap[keyCode] = key; } } - else - { - KeyCodeMap[keyCode] = KeyboardKeys::None; - } } Input::Mouse = Impl::Mouse = New();