[aseprite] 163/196: Fix Alt+key on Linux (fix #83 and #191)
Tobias Hansen
thansen at moszumanska.debian.org
Wed Apr 20 18:50:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 1b28c8e482c9f50d6ea81ebf38baf2b39661b643
Author: David Capello <davidcapello at gmail.com>
Date: Fri Apr 8 18:19:07 2016 -0300
Fix Alt+key on Linux (fix #83 and #191)
---
src/she/alleg4/she.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/she/alleg4/she.cpp b/src/she/alleg4/she.cpp
index 48c4ed1..37e1407 100644
--- a/src/she/alleg4/she.cpp
+++ b/src/she/alleg4/she.cpp
@@ -224,6 +224,15 @@ void error_message(const char* msg)
bool is_key_pressed(KeyScancode scancode)
{
+ if (scancode == kKeyLShift || scancode == kKeyRShift) {
+ return key_shifts & KB_SHIFT_FLAG;
+ }
+ else if (scancode == kKeyLControl || scancode == kKeyRControl) {
+ return key_shifts & KB_CTRL_FLAG;
+ }
+ else if (scancode == kKeyAlt) {
+ return key_shifts & KB_ALT_FLAG;
+ }
return key[scancode] ? true: false;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list