Repository navigation
Gatilhos analógicos com o curso inteiro e jogador na primeira entrada do controle - #109
Merged
Merged
Conversation
…apping The trigger axes (LTRIGGER/BRAKE, RTRIGGER/GAS) reached the guest as a button past half way, on P1 and on P2-P4, and the core turned a pressed trigger into 255: no throttle or brake control in racing games (#97, #104). A trigger now sends its travel as the guest's 0-255 byte (dead zone 0.02), and the core passes the value through; a digital press (the touch controls, an L2/R2 key) is still full. Keystrokes see a trigger pressed past XInput's threshold (> 0x1F, as Edge's SDL driver), and the previous key state moves only on a transition, so a KEYDOWN isn't flagged as a repeat. Holding LT for the gyro aim counts from that threshold too. Following XenDroid's take on it (rfandango/XenDroid#81, not merged there). The axes follow the key mapping of L2 and R2, which a pad in analog mode doesn't send as keys: on the guest's LT or RT they keep their travel, on another button they press it past half way, and left unbound they drive nothing. They send only changes and never release what they didn't press, so a trigger at rest leaves alone LT held by a digital ZL key. The key capture of the mapping screen, a dialog, takes a trigger pushed past half in its own window as L2 or R2 (#97: the mapping didn't see the trigger at all). A pad that sends a trigger both as an axis and as a key past a point of its own has the key, and its release, ignored once the axis has moved; the very first press can still get there before the axis's first sample. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A controller took the next player as Android listed it. A handheld that lists its controls twice, one device sending nothing (likely the raw controls behind its own mapping service), gave that one P1 and the device that does send input P2: on the AYN Thor the game ignored the built-in controls, and the controller test showed both as connected with only P2 reading input (#76). A controller now takes a player with its first key press (Back aside), or a deliberate push of a stick, trigger or hat (past half, as for putting the touch controls aside, so a worn stick's drift doesn't take one): the one it held before when still free, else the lowest free one. The controls that play are P1, and a device that never sends input takes none. Until then nothing it sends goes to the game, as its sticks at rest would release P1's. Every player taken: it plays as P1, as before. The Controls area and the controller test show players in that order from the controllers' first press in the app; a game takes them by the first press in the game. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The simulator and the controls documentation still said players go in the order the controllers connect. The simulator takes its English from the app's own pt-BR and English pairs when the text is exactly the same, so its texts that followed xd_ctl_who_order and ct_intro had lost their English, and the site's strict build failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Corrige os bugs de controle relatados nas issues: gatilhos analógicos que viravam botão (#97, #104) e controles embutidos que o Android lista duas vezes, como os do AYN Thor (#76).
Gatilhos analógicos (#97, #104)
Os eixos dos gatilhos (
LTRIGGER/BRAKE,RTRIGGER/GAS) chegavam ao jogo como botão a partir da metade, no P1 e no P2–P4, e o núcleo transformava um gatilho apertado em 255. Nos jogos de corrida não havia controle do acelerador nem do freio.Jogador na primeira entrada (#76)
Cada controle pegava o próximo jogador na ordem em que o Android listava os dispositivos. Um portátil que lista os controles duas vezes, um dos dispositivos sem mandar nada, dava P1 ao mudo e P2 ao que de fato manda as entradas. No AYN Thor, o jogo ignorava os controles embutidos, e o teste de controles mostrava os dois conectados com só o P2 lendo.
Não deu para ver a captura anexada na #76 daqui, então a regra não depende do nome nem dos IDs dos dispositivos do Thor.
O Edge não cobre isto: a entrada no Android é toda deste fork.
Testes
ctlfix2, ded64f181d1: APK assinado, nenhum aviso de compilação nas linhas alteradas. O commit seguinte só mexe emwebsite/.tools/test-native-logic.shpassam, com o NDK.gamepadecompanionpassam neste tip (29 classes, 142 testes), com os novosAnalogTriggersTest(5) eControllerUseTest(2), e oSlotInputRouterTest(5) e oControllerTestModelTest(4) atualizados para as regras novas.Analog triggers stay analog in games, and handhelds whose built-in controls Android lists twice, such as the AYN Thor, play as P1.
🛠️ Fixed
Os gatilhos analógicos continuam analógicos nos jogos, e portáteis cujos controles embutidos o Android lista duas vezes, como o AYN Thor, jogam como P1.
🛠️ Corrigido
🤖 Generated with Claude Code