Skip to content

Commit 49a26a8

Browse files
committed
rg_input: Made debounce level configurable (#171)
1 parent d6a1205 commit 49a26a8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

components/retro-go/config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,7 @@
144144
#ifndef RG_SCREEN_PARTIAL_UPDATES
145145
#define RG_SCREEN_PARTIAL_UPDATES 1
146146
#endif
147+
148+
#ifndef RG_GAMEPAD_DEBOUNCE_LEVEL
149+
#define RG_GAMEPAD_DEBOUNCE_LEVEL 0x03
150+
#endif

components/retro-go/rg_input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ bool rg_input_read_gamepad_raw(uint32_t *out)
196196

197197
static void input_task(void *arg)
198198
{
199-
const uint8_t debounce_level = 0x03;
199+
const uint8_t debounce_level = RG_GAMEPAD_DEBOUNCE_LEVEL;
200200
uint8_t debounce[RG_KEY_COUNT];
201201
uint32_t local_gamepad_state = 0;
202202
uint32_t state;

0 commit comments

Comments
 (0)