Fix key modifiers when we draw on Skia/Win (fix #954)

This commit is contained in:
David Capello 2016-02-12 12:23:34 -03:00
parent 228c96b943
commit 882a67fb6a

View File

@ -475,7 +475,7 @@ namespace she {
ev.setType(Event::KeyDown);
ev.setModifiers(get_modifiers_from_last_win32_message());
ev.setScancode(win32vk_to_scancode(vk));
ev.setRepeat(lparam & 0xffff);
ev.setRepeat(MAX(0, (lparam & 0xffff)-1));
if (charsInBuffer < 1) {
ev.setUnicodeChar(0);
@ -497,7 +497,7 @@ namespace she {
ev.setModifiers(get_modifiers_from_last_win32_message());
ev.setScancode(win32vk_to_scancode(wparam));
ev.setUnicodeChar(0);
ev.setRepeat(lparam & 0xffff);
ev.setRepeat(MAX(0, (lparam & 0xffff)-1));
queueEvent(ev);
// TODO If we use native menus, this message should be given