From f5f9e60b3c50532db862adb5fb77071aea5c1290 Mon Sep 17 00:00:00 2001 From: Shane McGovern Date: Wed, 26 Aug 2026 12:49:01 +0100 Subject: [PATCH] fix(input): resolve 1:1 Nintendo face button mapping on SBC/PortMaster devices --- src/core/GamepadMap.lua | 8 ++------ src/import/RomImporter.lua | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/core/GamepadMap.lua b/src/core/GamepadMap.lua index a63f851e..fe1fe88c 100644 --- a/src/core/GamepadMap.lua +++ b/src/core/GamepadMap.lua @@ -63,12 +63,6 @@ local function nxActive() end if love and love._os == "NX" then return true end if love and love.system and love.system.getOS() == "NX" then return true end - if os.getenv("XBOX_LAYOUT") == "1" then return false end - local h = os.getenv("HANDHELD") == "1" or os.getenv("PORTMASTER") == "1" - or os.getenv("POKEPORT_HANDHELD") == "1" or os.getenv("TRIMUI") == "1" - or os.getenv("MUOS") == "1" or os.getenv("KNULLI") == "1" - or os.getenv("NINTENDO_LAYOUT") == "1" - if h then return true end return false end @@ -95,6 +89,8 @@ function GamepadMap.mapLauncherButton(button) elseif button == "y" then return "x" elseif button == "back" then return "select" end + elseif button == "back" then + return "select" end return button end diff --git a/src/import/RomImporter.lua b/src/import/RomImporter.lua index abddb2f2..c3be0744 100644 --- a/src/import/RomImporter.lua +++ b/src/import/RomImporter.lua @@ -3202,7 +3202,7 @@ function RomImporter:gamepadpressed(_, button) end -- Y button toggle between Native Controller Navigation and Virtual Pointer Cursor: - if action == "y" or button == "y" or button == "x" then + if action == "y" or button == "y" then self._padCursorActive = not self._padCursorActive if okKit then Kit._ringShown = not self._padCursorActive end self._cursorModeToast = self._padCursorActive and "Cursor Navigation [Y]" or "Controller Menu Navigation [Y]"