From e9a532160518377e0701be7e346930ac2240d1e6 Mon Sep 17 00:00:00 2001 From: Robin Date: Sat, 3 Sep 2022 16:48:19 +0800 Subject: [PATCH] menu patches Swap A/B for confirm/cancel Set X for clear (instead of Y) For rg552/rg503 correctly assign dpad buttons for menu control --- .../lzdoom/patches/RG503/001-fixes.patch | 61 +++++++++++++++++++ .../lzdoom/patches/RG552/001-fixes.patch | 61 +++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 packages/games/emulators/lzdoom/patches/RG503/001-fixes.patch create mode 100644 packages/games/emulators/lzdoom/patches/RG552/001-fixes.patch diff --git a/packages/games/emulators/lzdoom/patches/RG503/001-fixes.patch b/packages/games/emulators/lzdoom/patches/RG503/001-fixes.patch new file mode 100644 index 000000000..80a738664 --- /dev/null +++ b/packages/games/emulators/lzdoom/patches/RG503/001-fixes.patch @@ -0,0 +1,61 @@ +diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp +index 2af6616fa0..cf6ff999d1 100644 +--- a/src/menu/menu.cpp ++++ b/src/menu/menu.cpp +@@ -666,17 +666,17 @@ bool M_Responder (event_t *ev) + ch = ev->data1; + switch (ch) + { +- case KEY_JOY2: ++ case KEY_JOY1: //B button on rg552/rg503 + case KEY_PAD_A: + mkey = MKEY_Back; + break; + +- case KEY_JOY1: ++ case KEY_JOY2: //A button on rg552/rg503 + case KEY_PAD_B: + mkey = MKEY_Enter; + break; + +- case KEY_JOY4: ++ case KEY_JOY3: //X button on rg552/rg503 + case KEY_PAD_X: + mkey = MKEY_Clear; + break; +@@ -695,7 +695,7 @@ bool M_Responder (event_t *ev) + case KEY_PAD_LTHUMB_UP: + case KEY_JOYAXIS2MINUS: + case KEY_JOYPOV1_UP: +- case KEY_JOY9: ++ case KEY_JOY14: //Dpad up on rg552/rg503 + mkey = MKEY_Up; + break; + +@@ -703,7 +703,7 @@ bool M_Responder (event_t *ev) + case KEY_PAD_LTHUMB_DOWN: + case KEY_JOYAXIS2PLUS: + case KEY_JOYPOV1_DOWN: +- case KEY_JOY10: ++ case KEY_JOY15: //Dpad down on rg552/rg503 + mkey = MKEY_Down; + break; + +@@ -711,7 +711,7 @@ bool M_Responder (event_t *ev) + case KEY_PAD_LTHUMB_LEFT: + case KEY_JOYAXIS1MINUS: + case KEY_JOYPOV1_LEFT: +- case KEY_JOY11: ++ case KEY_JOY16: //Dpad left on rg552/rg503 + mkey = MKEY_Left; + break; + +@@ -719,7 +719,7 @@ bool M_Responder (event_t *ev) + case KEY_PAD_LTHUMB_RIGHT: + case KEY_JOYAXIS1PLUS: + case KEY_JOYPOV1_RIGHT: +- case KEY_JOY12: ++ case KEY_JOY17: //Dpad right on rg552/rg503 + mkey = MKEY_Right; + break; + } diff --git a/packages/games/emulators/lzdoom/patches/RG552/001-fixes.patch b/packages/games/emulators/lzdoom/patches/RG552/001-fixes.patch new file mode 100644 index 000000000..80a738664 --- /dev/null +++ b/packages/games/emulators/lzdoom/patches/RG552/001-fixes.patch @@ -0,0 +1,61 @@ +diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp +index 2af6616fa0..cf6ff999d1 100644 +--- a/src/menu/menu.cpp ++++ b/src/menu/menu.cpp +@@ -666,17 +666,17 @@ bool M_Responder (event_t *ev) + ch = ev->data1; + switch (ch) + { +- case KEY_JOY2: ++ case KEY_JOY1: //B button on rg552/rg503 + case KEY_PAD_A: + mkey = MKEY_Back; + break; + +- case KEY_JOY1: ++ case KEY_JOY2: //A button on rg552/rg503 + case KEY_PAD_B: + mkey = MKEY_Enter; + break; + +- case KEY_JOY4: ++ case KEY_JOY3: //X button on rg552/rg503 + case KEY_PAD_X: + mkey = MKEY_Clear; + break; +@@ -695,7 +695,7 @@ bool M_Responder (event_t *ev) + case KEY_PAD_LTHUMB_UP: + case KEY_JOYAXIS2MINUS: + case KEY_JOYPOV1_UP: +- case KEY_JOY9: ++ case KEY_JOY14: //Dpad up on rg552/rg503 + mkey = MKEY_Up; + break; + +@@ -703,7 +703,7 @@ bool M_Responder (event_t *ev) + case KEY_PAD_LTHUMB_DOWN: + case KEY_JOYAXIS2PLUS: + case KEY_JOYPOV1_DOWN: +- case KEY_JOY10: ++ case KEY_JOY15: //Dpad down on rg552/rg503 + mkey = MKEY_Down; + break; + +@@ -711,7 +711,7 @@ bool M_Responder (event_t *ev) + case KEY_PAD_LTHUMB_LEFT: + case KEY_JOYAXIS1MINUS: + case KEY_JOYPOV1_LEFT: +- case KEY_JOY11: ++ case KEY_JOY16: //Dpad left on rg552/rg503 + mkey = MKEY_Left; + break; + +@@ -719,7 +719,7 @@ bool M_Responder (event_t *ev) + case KEY_PAD_LTHUMB_RIGHT: + case KEY_JOYAXIS1PLUS: + case KEY_JOYPOV1_RIGHT: +- case KEY_JOY12: ++ case KEY_JOY17: //Dpad right on rg552/rg503 + mkey = MKEY_Right; + break; + }