Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Assets/SInput/Scripts/CommonGamepadBindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static void ReloadCommonMaps() {
//check for partial name matches with this gamepad slot
for (int i = 0; i < commonMappings.Count; i++) {
for (int k = 0; k < commonMappings[i].partialNames.Count; k++) {
if (!mappingMatch && gamepads[g].Contains(commonMappings[i].partialNames[k])) {
if (!mappingMatch && gamepads[g].Contains(commonMappings[i].partialNames[k].ToUpper())) {
mappingMatch = true;
mappingSlots[i].slots.Add(g);
}
Expand Down Expand Up @@ -187,4 +187,4 @@ public static List<DeviceInput> GetApplicableMaps(CommonGamepadInputs commonInpu
}

}
}
}
8 changes: 4 additions & 4 deletions Assets/SInput/Scripts/Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ void UpdateControlState(int i, InputDeviceSlot slot) {
controlStates[i].repeatPressed = false;
if (controlStates[i].pressed) controlStates[i].repeatPressed = true;//repeat press returns true on first frame down
if (controlStates[i].held) {
controlStates[i].holdTime += Time.deltaTime;
controlStates[i].repeatTime -= Time.deltaTime;
controlStates[i].holdTime += Time.unscaledDeltaTime;
controlStates[i].repeatTime -= Time.unscaledDeltaTime;
if (controlStates[i].holdTime>Sinput.buttonRepeatWait && controlStates[i].repeatTime < 0f) {
controlStates[i].repeatTime = Sinput.buttonRepeat;
controlStates[i].repeatPressed = true;
Expand Down Expand Up @@ -225,8 +225,8 @@ void UpdateAnyControlState() {
controlStates[0].repeatPressed = false;
if (controlStates[0].pressed) controlStates[0].repeatPressed = true;//repeat press returns true on first frame down
if (controlStates[0].held) {
controlStates[0].holdTime += Time.deltaTime;
controlStates[0].repeatTime -= Time.deltaTime;
controlStates[0].holdTime += Time.unscaledDeltaTime;
controlStates[0].repeatTime -= Time.unscaledDeltaTime;
if (controlStates[0].holdTime > Sinput.buttonRepeatWait && controlStates[0].repeatTime < 0f) {
controlStates[0].repeatTime = Sinput.buttonRepeat;
controlStates[0].repeatPressed = true;
Expand Down
2 changes: 1 addition & 1 deletion Assets/SInput/Scripts/SInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public static void SinputUpdate() {
//count down till we can stop zeroing inputs
for (int i = 0; i < _totalPossibleDeviceSlots; i++) {
if (zeroInputs[i]) {
zeroInputWaits[i] -= Time.deltaTime;
zeroInputWaits[i] -= Time.unscaledDeltaTime;
if (zeroInputWaits[i] <= 0f) zeroInputs[i] = false;
}
}
Expand Down
8 changes: 4 additions & 4 deletions Assets/SInput/Scripts/SmartControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ public void Update(){
if (gravity > 0f) {
if (rawValues[slot] == 0f || (rawValues[slot] < controlValues[slot] && controlValues[slot] > 0f) || (rawValues[slot] > controlValues[slot] && controlValues[slot] < 0f)) {
if (controlValues[slot] > 0f) {
controlValues[slot] -= gravity * Time.deltaTime;
controlValues[slot] -= gravity * Time.unscaledDeltaTime;
if (controlValues[slot] < 0f) controlValues[slot] = 0f;
if (controlValues[slot] < rawValues[slot]) controlValues[slot] = rawValues[slot];
} else if (controlValues[slot] < 0f) {
controlValues[slot] += gravity * Time.deltaTime;
controlValues[slot] += gravity * Time.unscaledDeltaTime;
if (controlValues[slot] > 0f) controlValues[slot] = 0f;
if (controlValues[slot] > rawValues[slot]) controlValues[slot] = rawValues[slot];
}
Expand All @@ -111,13 +111,13 @@ public void Update(){
//move value towards target value
if (rawValues[slot] < 0f) {
if (controlValues[slot] > rawValues[slot]) {
controlValues[slot] -= speed * Time.deltaTime;
controlValues[slot] -= speed * Time.unscaledDeltaTime;
if (controlValues[slot] < rawValues[slot]) controlValues[slot] = rawValues[slot];
}
}
if (rawValues[slot] > 0f) {
if (controlValues[slot] < rawValues[slot]) {
controlValues[slot] += speed * Time.deltaTime;
controlValues[slot] += speed * Time.unscaledDeltaTime;
if (controlValues[slot] > rawValues[slot]) controlValues[slot] = rawValues[slot];
}
}
Expand Down