Open tjkirch opened 1 year ago
I don't recall seeing any C examples that use custom draw and then also set an image on the sprite. I'm not sure what the Playdate will do in that case.
If it's just something that shouldn't be done, I could make a doc comment :) A more mechanical fix might involve a bool on Sprite
that tracks whether set_use_custom_draw
has been called and whether an image has been set, failing if one or the other has already happened...
The backtrace suggests the crash is in the Playdate code, so maybe that's not a good thing to do? One could write a C version and see what happens. That, or ask on the forums.
Originally posted by @rtsuk in https://github.com/pd-rs/crankstart/issues/35#issuecomment-1483709249
Here's a minimal reproduction:
The result:
The backtrace is the same whether I define
draw_sprite
or not. Is it not being hooked up properly? Or isdraw_sprite
required to take some action that the SDK depends upon having happened?