btnp seems to completely stop working iff _update60 is used instead of the normal _update
- run the program below
- press Esc
- type some sort of statement (for some reason the bug only occurs if you type something before typing resume) e.g. ?"hello"
- type resume
- push or hold down the button (O)
expected: "pushed" will appear onscreen
actual: "pushed" no longer appears onscreen
function _update60() pushed = btnp(4) end function _draw() cls() if pushed then print("pushed", 52, 60, 8) end end
btnp() also bugs out a bit with the regular update, but doesn't stop working completely.
With the reproduction code above, if you swap _update60 to _update and follow the steps, you can see that
- A quick button press will no longer register, and
- When holding, the text appears, but it blinks a lot faster.
I briefly mentioned this here:
But nice to have this too clearly stated and with a good reproduction method.
I noticed that after a resume, in _update btnp(X) does not work, but btnp(O) works fine. To be more specific, this only happens after entering a console command.
Steps to reproduce:
1) Hit Esc to halt cartridge
2) Enter a console command (could be anything like 'dir')
3) Enter 'resume' command
4) btnp(X) no longer registers key presses
[Please log in to post a comment]