Commit graph

23 commits

Author SHA1 Message Date
Lily Tsuru b31feab847 Unsafe localization + sanity checking
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™️
2024-08-07 03:56:59 -04:00
Lily Tsuru 9e2324fc4a move app code to new module
Mostly to keep it clean.
2024-08-06 22:08:37 -04:00
Lily Tsuru b377686c4b remove some chatty debug logs that don't matter anymore 2024-08-06 22:03:03 -04:00
Lily Tsuru 3be054c390 Implement need_fullpath support
This makes it much less painful to specify disk images (as well as reduces memory consumption when loading!)
2024-08-06 21:57:47 -04:00
Lily Tsuru 16e6875228 Make getting AV info lazy
Some cores (Dolphin) don't initalize AV info, or use resources that are not allocated yet, until after a game is loaded.
2024-08-06 21:44:41 -04:00
Lily Tsuru 4e8ad7616f retrovnc: cleanup and safety annotations 2024-08-06 08:07:31 -04:00
Lily Tsuru 91dee22da5 cleanup OpenGL FBO creation/deletion 2024-08-05 22:23:41 -04:00
Lily Tsuru 897f45e49f cleanup EGL + OpenGL init into given passes 2024-08-05 22:17:32 -04:00
Lily Tsuru 46520d22ae Initial OpenGL cleanup pass
not great but it's "better", I suppose.
2024-08-05 09:35:16 -04:00
Lily Tsuru 571ed740dd swap GL frames to bgra 2024-08-05 09:01:54 -04:00
Lily Tsuru b972478ee9 Initial OpenGL core support
mmmmmm, this really is NOT as clean as I want it to be, but here it is!
2024-08-05 08:49:40 -04:00
Lily Tsuru 93525cb291 make rfb handle disconnected pitch better
meh, it works. I really should probably do this in Frontend, but that would be another conversion step. idk
2024-08-05 01:05:20 -04:00
Lily Tsuru 5944c5c1cb do init after load_game (mednafen boots now) 2024-08-05 00:37:29 -04:00
Lily Tsuru da42dc1f6a fixes so it builds on stable rust
i defaulted my toolchain at some point oops
2024-08-05 00:26:42 -04:00
Lily Tsuru cfbbc37f8a more code cleanup, add a stub implementation of the mouse input device 2024-08-04 21:23:24 -04:00
Lily Tsuru a7544cb64d code cleanup
- 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
2024-08-04 20:26:30 -04:00
Lily Tsuru ad634bf1fa retro_frontend: actually implement variable storage
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.
2024-08-04 06:59:31 -04:00
Lily Tsuru 1624810e55 remove defer 2024-08-04 04:42:38 -04:00
Lily Tsuru 18b30f2148 make rfb listen addr/port actually configurable
(also, actually fix the fake argv so that the listen applies.. Null termination!)
2024-08-04 04:37:22 -04:00
Lily Tsuru 596839e4ed listen address + port are configurable.
Also, libvncserver log messages now output via Tracing.
2024-08-04 03:47:20 -04:00
Lily Tsuru d4329be132 refactoring
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)
2024-08-04 02:02:29 -04:00
Lily Tsuru 312c94af1a use results for slightly less boneheaded error handling 2024-08-02 03:41:27 -04:00
Lily Tsuru 6f829c5252 Initial commit 2024-08-02 03:20:29 -04:00