Initialize data2 to zero for ev_keyup events, rather than just letting
them have junk values. Subversion-branch: /branches/v2-branch Subversion-revision: 2749
This commit is contained in:
parent
51526b9a4a
commit
33703db6c4
1 changed files with 8 additions and 0 deletions
|
|
@ -756,6 +756,14 @@ void I_GetEvent(void)
|
|||
event.type = ev_keyup;
|
||||
event.data1 = TranslateKey(&sdlevent.key.keysym);
|
||||
|
||||
// data2 is just initialized to zero for ev_keyup.
|
||||
// For ev_keydown it's the shifted Unicode character
|
||||
// that was typed, but if something wants to detect
|
||||
// key releases it should do so based on data1
|
||||
// (key ID), not the printable char.
|
||||
|
||||
event.data2 = 0;
|
||||
|
||||
if (event.data1 != 0)
|
||||
{
|
||||
D_PostEvent(&event);
|
||||
|
|
|
|||
Loading…
Reference in a new issue