pd-rs / crankstart

A barely functional, wildly incomplete and basically undocumented Rust crate whose aim is to let you write Games for the Playdate handheld gaming system in Rust.
MIT License
233 stars 24 forks source link

Fixed mismatched type error in menu item API #82

Closed pomettini closed 8 months ago

pomettini commented 8 months ago

Crankstart does not compile because of this. I ran the menu_items.rs example and it works as expected

pomettini commented 8 months ago

I'm not 100% sure what that cast does to be fair, tagging @tehsmeely who wrote the menu item API for visibility :)

tehsmeely commented 8 months ago

It seems this is a fragility we introduced as:

docs

The type of the returned pointer is *const c_char, and whether it’s an alias for const i8 or const u8 is platform-specific.

I'll make a new PR to resolve this better since it's now broken again on my platform (windows)