iOS: Add file picker (#747)

* iOS: Add file picker

* Fix lock placement
This commit is contained in:
wheremyfoodat 2025-03-17 02:55:17 +02:00 committed by GitHub
parent 90725252d3
commit fec4428ebf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 130 additions and 11 deletions

View file

@ -23,10 +23,6 @@ IOS_EXPORT void iosCreateEmulator() {
emulator = std::make_unique<Emulator>();
hidService = &emulator->getServiceManager().getHID();
emulator->initGraphicsContext(nullptr);
// TODO: Add game selection on iOS frontend
auto path = emulator->getAppDataRoot() / "toon_shading.elf";
emulator->loadROM(path);
}
IOS_EXPORT void iosRunFrame(CAMetalLayer* layer) {
@ -34,4 +30,9 @@ IOS_EXPORT void iosRunFrame(CAMetalLayer* layer) {
emulator->getRenderer()->setMTKLayer(layerBridged);
emulator->runFrame();
}
IOS_EXPORT void iosLoadROM(NSString* pathNS) {
auto path = std::filesystem::path([pathNS UTF8String]);
emulator->loadROM(path);
}