From 356cc402cac65af3b617c6fb025cccc335a17251 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 13 Jun 2009 17:10:18 +0000 Subject: Don't post zero key events. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1602 --- src/i_video.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/i_video.c b/src/i_video.c index aaefd922..3412051b 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -502,13 +502,20 @@ void I_GetEvent(void) 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; /* -- cgit v1.2.3