public setRumble ( byte rightLightFastMotor, byte leftHeavySlowMotor ) : void | ||
rightLightFastMotor | byte | |
leftHeavySlowMotor | byte | |
Результат | void |
//sets the rumble adjusted with rumble boost public virtual void setRumble(byte heavyMotor, byte lightMotor, int deviceNum) { byte boost = getRumbleBoost(deviceNum); uint lightBoosted = ((uint)lightMotor * (uint)boost) / 100; if (lightBoosted > 255) { lightBoosted = 255; } uint heavyBoosted = ((uint)heavyMotor * (uint)boost) / 100; if (heavyBoosted > 255) { heavyBoosted = 255; } if (deviceNum < 4) { DS4Device device = DS4Controllers[deviceNum]; if (device != null) { device.setRumble((byte)lightBoosted, (byte)heavyBoosted); } } }
public virtual void touchButtonUp(object sender, TouchpadEventArgs arg) { pushed = DS4Controls.None; upperDown = leftDown = rightDown = multiDown = false; dev.setRumble(0, 0); dev.getCurrentState(s); if (s.Touch1 || s.Touch2) { synthesizeMouseButtons(); } }