Is there a limit on how long the update callback can run for? [EDIT: yes, 10 seconds]

Yes, you have to pass control back to the run loop within 10 seconds or the system assumes your code is stuck. That's maybe a clumsy way to do it, but in practical usage if you're blocking the run loop for even 1/2 a second your game is going to feel pretty janky. (though I understand this isn't a game you're talking about..)

I've never used it and can't vouch for it, but here's a coroutine library for the Playdate C API, if reworking your code so it runs in chunks and returns out of the update function regularly isn't feasible: [C/C++] Coroutines Library for Playdate

2 Likes