aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--src/library_glfw.js6
2 files changed, 6 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 6d5798cd..e0038c77 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -135,4 +135,6 @@ a license to everyone to use it as detailed in LICENSE.)
* Dan Dascalescu <dNOSPAMdascalescu@gmail.com>
* Thomas Borsos <thomasborsos@gmail.com>
* Ori Avtalion <ori@avtalion.name>
+* Guillaume Blanc <guillaumeblanc.sc@gmail.com>
+
diff --git a/src/library_glfw.js b/src/library_glfw.js
index f72aeb24..0b3fccd4 100644
--- a/src/library_glfw.js
+++ b/src/library_glfw.js
@@ -130,9 +130,11 @@ var LibraryGLFW = {
onKeyChanged: function(event, status) {
var key = GLFW.DOMToGLFWKeyCode(event.keyCode);
- if (key && GLFW.keyFunc) {
+ if (key) {
GLFW.keys[key] = status;
- Runtime.dynCall('vii', GLFW.keyFunc, [key, status]);
+ if (GLFW.keyFunc) {
+ Runtime.dynCall('vii', GLFW.keyFunc, [key, status]);
+ }
}
},