mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-16 00:02:23 +02:00
G2 support
This commit is contained in:
@@ -32,6 +32,25 @@ local STICK_OFF = 0.3
|
||||
|
||||
-- Raw joystick defaults + NX overrides live in src/core/GamepadMap.lua
|
||||
-- (see RAW_BUTTON_BINDINGS / NX_RAW_BUTTON_BINDINGS and #620 / #632).
|
||||
--
|
||||
-- SELECT ON A PLAYSTATION PAD, checked rather than assumed. There is no
|
||||
-- button called "select" in SDL's game-controller vocabulary: the small
|
||||
-- left-hand menu button is `back` on every family, and GamepadMap's
|
||||
-- DEFAULT_GAMEPAD_BINDINGS maps it to GB SELECT. The DualSense's CREATE
|
||||
-- button (and the DualShock 4's SHARE) is that button -- the controller
|
||||
-- database LOVE 11.5 ships spells the DualSense row
|
||||
-- "PS5 Controller,a:b1,b:b2,back:b8,...,misc1:b13,start:b9" -- so a
|
||||
-- recognized pad delivers it here as gamepadpressed(_, "back") and needs no
|
||||
-- entry of its own. What it also has, and what LOVE 11.x has no name for at
|
||||
-- all, is the TOUCHPAD click (SDL_CONTROLLER_BUTTON_TOUCHPAD) and the mute
|
||||
-- key (`misc1`): neither reaches love.gamepadpressed, so neither can be bound,
|
||||
-- and a player reaching for the touchpad expecting SELECT will find nothing.
|
||||
-- Not a mapping this file can add -- the event never arrives.
|
||||
--
|
||||
-- An unrecognized PlayStation pad falls to the raw path instead, where SHARE /
|
||||
-- CREATE is generic-HID button 9 and RAW_BUTTON_BINDINGS[9] is already
|
||||
-- "select". Both roads reach SELECT; the one road that did not was Gold's,
|
||||
-- where src/core/Game2.lua used to answer `back` with love.event.quit().
|
||||
|
||||
local HAT_DIRECTIONS = {
|
||||
u = { "up" }, d = { "down" }, l = { "left" }, r = { "right" },
|
||||
|
||||
Reference in New Issue
Block a user