diff options
author | Simon Howard | 2009-06-13 17:10:18 +0000 |
---|---|---|
committer | Simon Howard | 2009-06-13 17:10:18 +0000 |
commit | 356cc402cac65af3b617c6fb025cccc335a17251 (patch) | |
tree | 60f6d4294485595cb20346ae496f4aa15e1c171a | |
parent | d4863b4c4ac47766b5fd3b8b0949be7af792e3d0 (diff) | |
download | chocolate-doom-356cc402cac65af3b617c6fb025cccc335a17251.tar.gz chocolate-doom-356cc402cac65af3b617c6fb025cccc335a17251.tar.bz2 chocolate-doom-356cc402cac65af3b617c6fb025cccc335a17251.zip |
Don't post zero key events.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1602
-rw-r--r-- | src/i_video.c | 11 |
1 files 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; /* |