From 2d94e73539d4ce5de7b998184c2fc0acb23eed1e Mon Sep 17 00:00:00 2001 From: neonloop Date: Sun, 22 Jan 2023 22:53:47 +0000 Subject: Fixes conflict between letter and menu action On some devices, buttons are mapped to letter keys. During file selection, libpicofe would respond to the button press and the letter press, this could cause a freeze. Instead, button presses should never be treated as letter presses. --- patches/libpicofe/0003-avoid-button-conflict.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 patches/libpicofe/0003-avoid-button-conflict.patch (limited to 'patches/libpicofe') diff --git a/patches/libpicofe/0003-avoid-button-conflict.patch b/patches/libpicofe/0003-avoid-button-conflict.patch new file mode 100644 index 0000000..c7ff40e --- /dev/null +++ b/patches/libpicofe/0003-avoid-button-conflict.patch @@ -0,0 +1,17 @@ +diff --git a/in_sdl.c b/in_sdl.c +index a84c781..22d3b01 100644 +--- a/in_sdl.c ++++ b/in_sdl.c +@@ -476,10 +476,8 @@ static int in_sdl_menu_translate(void *drv_data, int keycode, char *charcode) + else + { + for (i = 0; i < map_len; i++) { +- if (map[i].key == keycode) { +- ret = map[i].pbtn; +- break; +- } ++ if (map[i].key == keycode) ++ return map[i].pbtn; + } + + if (charcode != NULL && (unsigned int)keycode < SDLK_LAST && -- cgit v1.2.3