Can't exceed 49fps in C

For some reason I'm unable to exceed 49fps on hardware even though I requested 50. When I'm doing nothing in the update function it still tops at 49. What am I missing?

static int update(void *userdata){
    PlaydateAPI* pd = userdata;
    pd->graphics->markUpdatedRows(0, 239);
    return 1;

expected behavior currently afaik,

discussed here Updating the entire LCD in C and performance

@dave had been tinkering with a patch, but I think it ran into some snags

edit: worth knowing, you can go faster if you limit the number of rows you send to the display to update (discussed by @matt in that and other threads)

1 Like

And unlock/disable the frame limiter.

49/50Hz is the highest for full screen updates.

I read that thread. It ends with Dave saying he got it to an even 50, which is why I'm asking.

How do I unlock it? I tried setting it to 100 but it didn't make a difference.

Maybe the fps display is rounding down? I'd take it as 50 personally. Maybe Dave will chime in with what's going on.

To unlock the limit set the refresh rate to 0 (zero), at least that's how it's done in Lua.

Oh sorry I wasn't aware, I took his final comment to imply it hadn't yet been merged, even if it was brought to 50fps in testing.