shithub: choc

Download patch

ref: 356cc402cac65af3b617c6fb025cccc335a17251
parent: d4863b4c4ac47766b5fd3b8b0949be7af792e3d0
author: Simon Howard <fraggle@gmail.com>
date: Sat Jun 13 13:10:18 EDT 2009

Don't post zero key events.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1602

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -502,13 +502,20 @@
                     event.data2 = sdlevent.key.keysym.unicode;
                 }
 
-                D_PostEvent(&event);
+                if (event.data1 != 0)
+                {
+                    D_PostEvent(&event);
+                }
                 break;
 
             case SDL_KEYUP:
                 event.type = ev_keyup;
                 event.data1 = TranslateKey(&sdlevent.key.keysym);
-                D_PostEvent(&event);
+
+                if (event.data1 != 0)
+                {
+                    D_PostEvent(&event);
+                }
                 break;
 
                 /*