Skip to content

fix(Timer): ensure joypad input states are explicitly checked for boo…#113

Draft
hugou74130 wants to merge 2 commits into
mupen64:mainfrom
hugou74130:fix/TAS-joypad
Draft

fix(Timer): ensure joypad input states are explicitly checked for boo…#113
hugou74130 wants to merge 2 commits into
mupen64:mainfrom
hugou74130:fix/TAS-joypad

Conversation

@hugou74130
Copy link
Copy Markdown
Contributor

Fixed a rather silly bug: if you head to the TAS section and touch the joypad while a sheet is launching, the app crashes. The cause: joypad.get() returns nil for unpressed buttons instead of false, but ugui.toggle_button uses a strict assertion that expects a boolean — since nil isn't one, it crashes. Fix: used Joypad.input.X == true to force a boolean value.

wtf.mp4

@hugou74130 hugou74130 marked this pull request as draft April 26, 2026 13:43
@FramePerfection
Copy link
Copy Markdown
Collaborator

I'm not sure what's really happening here, and while I think this fix would work, I don't think it should be necessary.

I can reproduce a crash involving the timer view myself, but that's triggered by a Z input value that is 1 instead of true (within a collection of many Z values that are correctly either true or false).
I have absolutely no idea how that happened, but I'd advise that you look through your own semantic workflow sheet files, and check if there are any suspicious values like nil or non-boolean values for buttons or the like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants