mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-27 08:51:27 +02:00
fix(input): resolve 1:1 Nintendo face button mapping on SBC/PortMaster devices
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]"
|
||||
|
||||
Reference in New Issue
Block a user