Ignore playdate.display.setScale()

I am currently designing a library that will use a toast pop-up to display information. My goal is to have the toast appear identical no matter what playdate.display.setScale() is set to. Unfortunately, there isn't currently a way to ignore setScale inside the SDK. I did some digging in the SDK and it looks like the crankIndicatorUI just accounts for this by having multiple gfx designed for all the possible scales. Works, but isn't a great solution, especially for dynamic content.

I believe ignoring display.setScale() could be accomplished by adding a flag to sprites that would ignore display scale much like how setIgnoresDrawOffset() works.

If not possible with the current sprite implementation, allowing developers to draw directly to the frame buffer could work as well.

Not sure now niche this issue is, but it's something I came across so thought I'd post.

It's an interesting idea, but the scale, like the other playdate.display settings, is applied globally and cannot be ignored for a specific drawing call (which is why crankIndicatorUI works the way that it does).

1 Like