From 9aace0d85fcad35e27195620b782381f83862421 Mon Sep 17 00:00:00 2001 From: milek7 Date: Fri, 18 Aug 2017 15:58:08 +0200 Subject: [PATCH] fix linux crash (maybe not correct, but does not crash) --- EvLaunch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EvLaunch.cpp b/EvLaunch.cpp index 4f247c78..6e1dc704 100644 --- a/EvLaunch.cpp +++ b/EvLaunch.cpp @@ -53,6 +53,9 @@ int vk_to_glfw_key( int const Keycode ) { #ifdef _WINDOWS auto const code = VkKeyScan( Keycode ); +#else + auto const code = (short int)Keycode; +#endif char key = code & 0xff; char shiftstate = ( code & 0xff00 ) >> 8; @@ -63,7 +66,6 @@ int vk_to_glfw_key( int const Keycode ) { key = GLFW_KEY_0 + key - '0'; } return key + ( shiftstate << 8 ); -#endif } bool TEventLauncher::Load(cParser *parser)