aardappel / lobster

The Lobster Programming Language
http://strlen.com/lobster
2.25k stars 119 forks source link

Don't reset gl_button frame counter on repeats #184

Closed Dheu3 closed 2 years ago

Dheu3 commented 2 years ago

Most game code doesn't care about repeats. But they do care about when a button is pressed versus when it is held, and for how long. Repeats reset the counter, making it seem like a button was pressed when it wasn't. If a program actually wants repeats it can use gl_key_repeat or use the gl_button counter.

aardappel commented 2 years ago

Did you test that this change actually does anything? Because Set (where your change is) only gets called from updatebutton if repeat is false.

Dheu3 commented 2 years ago

Thanks, looks like it was fixed recently already. I'll update