Implement the "flip" function.#2
Conversation
|
FWIW this is enough to get the intro screen for Picopolis to load. https://www.lexaloffle.com/bbs/?pid=42185 (The rest of the game still doesn't, but it's one step closer ;) |
This necessitates plumbing through a callback function, so that SDL can be called. So as to not repeat ourselves, extract the code that was used around update() calls, FPS handling, etc, and have a shared function. While around, reshuffle some initialisation to be earlier, and make it so there's not a 1/FPS gap before drawing a frame, but a 1/FPS gap _between_ frames (assuming non-zero time to calculate the next frame etc).
|
I actually broke the main loop the first time; didn't notice that I'd lost the machine.code().update() call! Fixed now. |
|
Those are very interesting changes ! |
|
Ah, I saw they'd been doing work, didn't realise it was actually usable already. I did a retrofw opk build (rs-97 compile + the desktop file from the old opk) and it seemed to work OK on my LDK Game Horizontal, so I think you'll be good if you want to do other builds. I'll have to see if I can build upstream (and see if they still need patches like these). Thanks! |
|
This is a missing feature on the upstream indeed! No idea about how this will integrate since some parts of code could have been changed but I'm quite positive on this. |
|
I'm merging this for now. If there are any issues, i will revert it and let you know. |
|
FWIW, I've rewritten the two main chunks of these patches against upstream - Jakz#28 - thanks for letting me know! |
This necessitates plumbing through a callback function, so that SDL can be
called.
So as to not repeat ourselves, extract the code that was used around update()
calls, FPS handling, etc, and have a shared function.
While around, reshuffle some initialisation to be earlier, and make it so
there's not a 1/FPS gap before drawing a frame, but a 1/FPS gap between
frames (assuming non-zero time to calculate the next frame etc).