Fix Alt key modifier on Linux

This commit is contained in:
David Capello 2017-11-29 15:39:44 -03:00
parent daf2672dbd
commit d67b083e42

View File

@ -1,5 +1,5 @@
// SHE library
// Copyright (C) 2012-2016 David Capello
// Copyright (C) 2012-2017 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -202,6 +202,12 @@ public:
}
bool isKeyPressed(KeyScancode scancode) override {
#ifdef ALLEGRO_UNIX
if ((scancode == kKeyAlt) &&
(key_shifts & KB_ALT_FLAG)) {
return true;
}
#endif
return key[she_to_alleg_scancode(scancode)] ? true: false;
}