Skip to content

Commit

Permalink
Input: Assert reset bit on correct combo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryzee119 committed Oct 9, 2020
1 parent 4c5ee88 commit 2ff1c76
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,13 @@ uint16_t input_get_buttons(uint8_t id, uint32_t *raw_buttons, int32_t *raw_axis,
return 0;
}

//Assert reset bit if L+R+START is pressed. Start bit is cleared.
if ((*n64_buttons & N64_LB) && (*n64_buttons & N64_RB) && (*n64_buttons & N64_ST))
{
*n64_buttons &= ~N64_ST;
*n64_buttons |= N64_RES;
}

//Output the raw data too
if (raw_buttons) *raw_buttons = _buttons;
for (uint32_t i = 0; i < max_axis; i ++)
Expand Down

0 comments on commit 2ff1c76

Please sign in to comment.