Remove superfluous simulated shift key up/down events

Setting the shift modifier flag alone is sufficient for current GFE versions
This commit is contained in:
Cameron Gutman 2021-03-20 10:38:15 -05:00
parent 5843dff278
commit 523f1df98b

View File

@ -1084,7 +1084,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
byte modifiers = getModifierState(event);
if (KeyboardTranslator.needsShift(event.getKeyCode())) {
modifiers |= KeyboardPacket.MODIFIER_SHIFT;
conn.sendKeyboardInput((short) 0x8010, KeyboardPacket.KEY_DOWN, modifiers);
}
conn.sendKeyboardInput(translated, KeyboardPacket.KEY_DOWN, modifiers);
}
@ -1150,9 +1149,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
modifiers |= KeyboardPacket.MODIFIER_SHIFT;
}
conn.sendKeyboardInput(translated, KeyboardPacket.KEY_UP, modifiers);
if (KeyboardTranslator.needsShift(event.getKeyCode())) {
conn.sendKeyboardInput((short) 0x8010, KeyboardPacket.KEY_UP, getModifierState(event));
}
}
return true;