I've used
GetPointerPressed() in many scenarios before and never had an issue but when used with
goto (yes, i know. Please don't judge me!) it remains persistent.
I have some test code where I need a different resolution each time I run the code. I thought a simply goto would enable me to change the resolution at will whilst the code was running - It's the first time I've used goto in around 30 years but maybe I've finally found a valid use for goto but please let's not turn this into another thread about why goto and/or gosub should never be used!
Here's some simple test code:
restart:
w = random(500, 1000)
h = random(500, 1000)
SetVirtualResolution(w, h)
SetWindowSize(w, h, 0)
do
if GetPointerPressed() then goto restart
print(str(ScreenFPS()))
sync()
loop
That should simply run until the pointer is pressed, then change resolution and continue running again but when you click the pointer the code gets trapped in an endless loop of resolution changes.
(Press F5 in the IDE to stop it)