fix(input): resolve 1:1 Nintendo face button mapping on SBC/PortMaster devices

This commit is contained in:
Shane McGovern
2026-08-26 12:49:01 +01:00
parent 247ec919ea
commit f5f9e60b3c
2 changed files with 3 additions and 7 deletions
+2 -6
View File
@@ -63,12 +63,6 @@ local function nxActive()
end end
if love and love._os == "NX" then return true 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 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 return false
end end
@@ -95,6 +89,8 @@ function GamepadMap.mapLauncherButton(button)
elseif button == "y" then return "x" elseif button == "y" then return "x"
elseif button == "back" then return "select" elseif button == "back" then return "select"
end end
elseif button == "back" then
return "select"
end end
return button return button
end end
+1 -1
View File
@@ -3202,7 +3202,7 @@ function RomImporter:gamepadpressed(_, button)
end end
-- Y button toggle between Native Controller Navigation and Virtual Pointer Cursor: -- 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 self._padCursorActive = not self._padCursorActive
if okKit then Kit._ringShown = not self._padCursorActive end if okKit then Kit._ringShown = not self._padCursorActive end
self._cursorModeToast = self._padCursorActive and "Cursor Navigation [Y]" or "Controller Menu Navigation [Y]" self._cursorModeToast = self._padCursorActive and "Cursor Navigation [Y]" or "Controller Menu Navigation [Y]"