Skip to content

Commit

Permalink
rg_input: Made debounce level configurable (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
ducalex committed Nov 29, 2024
1 parent d6a1205 commit 49a26a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions components/retro-go/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,7 @@
#ifndef RG_SCREEN_PARTIAL_UPDATES
#define RG_SCREEN_PARTIAL_UPDATES 1
#endif

#ifndef RG_GAMEPAD_DEBOUNCE_LEVEL
#define RG_GAMEPAD_DEBOUNCE_LEVEL 0x03
#endif
2 changes: 1 addition & 1 deletion components/retro-go/rg_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ bool rg_input_read_gamepad_raw(uint32_t *out)

static void input_task(void *arg)
{
const uint8_t debounce_level = 0x03;
const uint8_t debounce_level = RG_GAMEPAD_DEBOUNCE_LEVEL;
uint8_t debounce[RG_KEY_COUNT];
uint32_t local_gamepad_state = 0;
uint32_t state;
Expand Down

0 comments on commit 49a26a8

Please sign in to comment.