playdate.display.setRefreshRate(50) only seems to work in the simulator

Good evening -- I'm hacking on the image browser code provided by AdamsImmersive in this post: Here's a "camera roll" style image gallery/viewer for Playdate developers

Here's the latest version of my code: main.lua · GitHub
and a pdxinfo, if you're interested in building it: pdxinfo · GitHub

If you look at lines 56, 84, and 93, I'm trying to keep the device at a low framerate in "gallery" mode, and increase it in image-viewing mode, to facilitate flipbook-like behavior.

However, this high framerate only seems to have the desired effect in the simulator (running on Windows 11) -- when I sideload it onto my device, it seems to be locked at 10 FPS, no matter how much I increase the crank sensitivity. I tried setting it to 50 and 0 FPS, which I understand to be the maximum FPS / the special value for "unlocked."

What am I missing?

Had a quick look. Seems you’re calling gfx.sprite.update twice per frame, possibly 3 times? There appears to be some other duplication going on too, but I might be missing something.

1 Like

Interesting -- I didn't add any of the extra calls, but I also didn't notice that that was part of the existing code. I'll look into the purpose of that / trying to cut that down to one call per frame. Thank you!