Search found 4 matches

by gotzmann
Wed Jan 11, 2023 3:27 pm
Forum: Support and Development
Topic: Infinite loop prevent keyboard scan
Replies: 7
Views: 1267

Re: Infinite loop prevent keyboard scan

BrotSagtMist wrote: Wed Jan 11, 2023 2:39 pm What? I just said its easy. Its adding 3 lines.
I might fix my local game code easy peasy.

But I can't fix the original games which will be downloaded by the users of emulator from other locations.

My main goal is to fix emulator, not the game itself.
by gotzmann
Wed Jan 11, 2023 12:30 pm
Forum: Support and Development
Topic: Infinite loop prevent keyboard scan
Replies: 7
Views: 1267

Re: Infinite loop prevent keyboard scan

You will need to put keyboard scanning inside this loop on your own. see love.run essentially you just need to copy the event pump and call parts. Yep! I've had high hopes it's possible to fix Love2D or emulator to avoid fixing the games ("the cartridges") itself, but do not see the easy ...
by gotzmann
Wed Jan 11, 2023 12:28 pm
Forum: Support and Development
Topic: Infinite loop prevent keyboard scan
Replies: 7
Views: 1267

Re: Infinite loop prevent keyboard scan

About separate thread scanning keyboard: Love have some multi-thread support https://love2d.org/wiki/love.thread , but it is rather poor. And the wiki says that: ...love.keyboard, love.mouse, and love.touch modules have several restrictions and therefore can only be used in the main thread. So, may...
by gotzmann
Tue Jan 10, 2023 6:43 pm
Forum: Support and Development
Topic: Infinite loop prevent keyboard scan
Replies: 7
Views: 1267

Infinite loop prevent keyboard scan

I'm trying to find the way not to block love.keypressed() callback having this loop in main thread of PICO-8 emulator: while(true) do if (btn(❎)) then sfx(30) return end end Not sure, is it possible to have a separate thread scanning keyboard / controller and filling all data for pressed keys in the...