Don't send a bunch of duplicate controller packets if a button is being held down

This commit is contained in:
Cameron Gutman 2014-11-19 19:05:59 -08:00
parent 9fcd641143
commit e3a477a243

View File

@ -607,8 +607,12 @@ public class ControllerHandler {
emulatingButtonFlags |= ControllerHandler.EMULATING_SPECIAL;
}
sendControllerInputPacket();
// Send a new input packet if this is the first instance of a button down event
// or anytime if we're emulating a button
if (event.getRepeatCount() == 0 || emulatingButtonFlags != 0) {
sendControllerInputPacket();
}
return true;
}