Repository navigation
hotfix 1.3.1: the add dialog, alone=1, and Ctrl+R in the browser - #3058
Merged
Merged
Conversation
Native export has preferred the running executable since aff61f9, and that executable is the full client: alone=1 was ignored there, so a game exported without editors came out as the whole IDE, editors included. The flag now decides before the local template is tried — alone=1 always downloads /export/<dir>/<system><lang>, the way the html export already did — and the "local native template failed" line is not printed when no attempt was made. alone=0 is unchanged. Verified with bin/release/check-export-stubs.sh against dev: 23 passed, 0 failed, the alone paths editorless and byte-equal to the served stubs, the free paths still carrying the editors. Before the fix the same export printed "using local native template..." and wrote the 12.7 MB client with SPRITE EDITOR in it; after it writes the 3.5 MB served stub plus the cartridge. Co-Authored-By: Claude Code <noreply@anthropic.com>
sokol bubbles character keys on purpose — the browser needs them to make text — and consumes every other key itself. A Ctrl combination on a character key rides that bubble: Ctrl+R is RUN in the studio, and Chrome reloaded the tab instead of running the cart. A user met it as "the game runs for a few seconds and resets", the page coming back to CLICK TO PLAY. The layer now consumes Ctrl on a character key, except Ctrl+C/X/V — sokol reads a paste from the page's own paste event, which Ctrl+V's default action raises — and except Ctrl+Alt, which is AltGr on the layouts that need it: the studio reads AltGr through its own fallback, and SDL consumed it too, so the old web build typed a space there. Verified in an isolated Chrome over CDP: 1.3.0 reported defaultPrevented false for Ctrl+R and this build true; Ctrl+V, Ctrl+Alt and a plain letter stay false; F5 and the arrows stay consumed by the layer itself. The machine still gets every key — F5 switched the studio to the music editor and `help` typed into the console in the same session. Co-Authored-By: Claude Code <noreply@anthropic.com>
The dialog's callback called dynCall, which emscripten no longer emits: the 1.2.0 web build declared it, the 1.3.0 one (the sokol web layer of #3048) does not, and everything else that used it now goes through getWasmTableEntry. Picking a file therefore threw "dynCall is not defined" before onAddFile ran and the file never reached the machine. #3018 fixed the sibling (writeArrayToMemory) but not this. Why: the page's popup hands the file back through the console's EM_ASM, and the web layer's other callbacks are exported calls (tic80_insets, sokol_start) — tic80_add_file is the same shape. Co-Authored-By: Claude Code <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.
The three reports the 1.3.0 release brought in yesterday. Two came from users on Chrome, and the owner could not reproduce one of them on macOS at all — which turned out to be the clue.
The add dialog never got the file
In the browser,
addlooked like a missing dialog on the site's player: the Go site's player partial had lost the#add-modalmarkup its Node predecessor carried. The server half is fixed in tic80-server (a41a425 player: the console's add-file popup is back,cff130f) and deploys with the site.With the markup back, picking a file still did nothing: the popup's callback called
dynCall, which emscripten no longer emits — the 1.2.0 web build declared it, the sokol web layer (#3048) does not, and everything else that used it goes throughgetWasmTableEntrynow. The picker threw "dynCall is not defined" beforeonAddFileran, so the file never reached the machine. #3018 fixed the sibling (writeArrayToMemory) but not this. That half is the first commit here.alone=1 exported the editors anyway
A pro user: "the final game includes the editors even if you use alone=1. It creates a bigger final exe and 'breaks' one of the pro features (export without editors)."
Native export has preferred the running executable for a same-platform export since
aff61f94— and that executable is the full client.alonewas honored only in the server-download path, so the flag never had a chance. It now decides before the local template is tried:alone=1always downloads/export/<dir>/<system><lang>, the way the html export already did.Ctrl+R reloaded the player page
A user on Chrome/Windows: "it runs for 3 seconds and resets." What he saw was the page coming back to CLICK TO PLAY: Ctrl+R is RUN in the studio, and the browser reloaded the tab instead. SDL's emscripten backend consumed Ctrl combinations (and the function keys, Tab, Backspace and the arrows) for the 1.2 web build; sokol bubbles character keys by design — the browser needs them to make text — and a Ctrl combination rides one.
The layer now consumes Ctrl on a character key, except Ctrl+C/X/V (sokol reads a paste from the page's own paste event, which Ctrl+V's default action raises) and except Ctrl+Alt, which is AltGr on the layouts that need it and a character the studio reads through its own fallback.
Verified
bin/release/check-export-stubs.shagainst dev with a PRO client: 23 passed, 0 failed — everyalone=1path editorless and byte-equal to what the site serves, every free path still carrying the editors. Before the fix the same export printed "using local native template..." and wrote the 12.7 MB client withSPRITE EDITORin it; after it writes the 3.5 MB served stub plus the cartridge.defaultPrevented=false, this branchtrue; Ctrl+V, Ctrl+Alt and a plain letter stayfalse; F5 and the arrows stay consumed by the layer itself. The machine still gets every key — F5 switched the studio to the music editor andhelptyped into the console in the same session.The web artifacts (
tic80-html, the per-language players) carry the keyboard fix to the site; the release is cut frommain.🤖 Generated with Claude Code