1
0
forked from 0ad/0ad

Fix keys like F11 triggering two events when sent from Atlas to the game engine

This was SVN commit r8987.
This commit is contained in:
Ykkrosh 2011-02-25 23:53:09 +00:00
parent f0ea32cb8d
commit 92e84a9112

View File

@ -180,7 +180,9 @@ private:
}
else
{
POST_MESSAGE(GuiCharEvent, (GetSDLKeyFromWxKeyCode(evt.GetKeyCode()), evt.GetUnicodeKey()));
// Slight hack: Only pass 'normal' keys; special keys will generate a KeyDown/KeyUp event instead
if (evt.GetKeyCode() < 256)
POST_MESSAGE(GuiCharEvent, (GetSDLKeyFromWxKeyCode(evt.GetKeyCode()), evt.GetUnicodeKey()));
evt.Skip();
}