By localization, I mean making functions have unsafe blocks where they are actually doing unsafe things, rather than a blanket "unsafe fn", or moving safe operations (or functions made safe by localizing their unsafety) out to safe Rust where possible. This also adds opporturnity to annotate unsafe blocks in a better fashion, which is a nice side benefit.
Also, the helper to get a EGL Device platform display can now select any of the first 16 devices reported. For now this functionality is useless since we hardcode it to do the same thing it did before effectively, but later on it might be a good idea to expose it? Not Sure™️
- make joypad a directory module, split retropad implementation into new module (but re-export it). also rename joypad to InputDevice
- remove spurious retro_reset (it's not needed and in fact crashes some cores)
- rename frontend input device APIs, add one for removing (unplugging) a device
I'm not certain I'll keep it like this (it should probably be in `FrontendInterface`, so the driver code can serialize how it sees fit, rather than us), but it works to get it done.
There's also a lot of janky code I need to clean up before I'm really happy about it.
Removes the frontend glue module, instead the frontend state struct is allowed to be created by users. This doesn't solve Rust 2024 problems (although, since we're building c++ code anyways, we can always just stash the pointer there) but it's much cleaner.Some stuff is made to use pointers, this is just because I don't want to mess around with lifetime stuff right now (it all lasts as long as the app anyways)