Skip to content

Commit

Permalink
- Clamp triggers to trigger level.
Browse files Browse the repository at this point in the history
- Force trigger level when button is pressed.
  • Loading branch information
Extrems committed Aug 23, 2024
1 parent fe5301d commit a2990ae
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cube/patches/base/pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@
void CheckStatus(s32 chan, PADStatus *status)
{
if (*VAR_TRIGGER_LEVEL > 0) {
if (status->triggerL >= *VAR_TRIGGER_LEVEL)
if (status->button & PAD_BUTTON_L)
status->triggerL = *VAR_TRIGGER_LEVEL;
if (status->triggerL >= *VAR_TRIGGER_LEVEL) {
status->triggerL = *VAR_TRIGGER_LEVEL;
status->button |= PAD_BUTTON_L;
if (status->triggerR >= *VAR_TRIGGER_LEVEL)
}

if (status->button & PAD_BUTTON_R)
status->triggerR = *VAR_TRIGGER_LEVEL;
if (status->triggerR >= *VAR_TRIGGER_LEVEL) {
status->triggerR = *VAR_TRIGGER_LEVEL;
status->button |= PAD_BUTTON_R;
}
}

u8 igr_type = *VAR_IGR_TYPE & ~0x80;
Expand Down

0 comments on commit a2990ae

Please sign in to comment.