Fix Switch startup save path

This commit is contained in:
2026-06-09 01:13:07 +08:00
parent c87b245cea
commit 8bbb847a1b
5 changed files with 83 additions and 12 deletions
+29
View File
@@ -12,6 +12,34 @@
#include <frostbite2D/core/application.h>
#include <frostbite2D/scene/scene_manager.h>
#ifdef __SWITCH__
namespace {
void showSwitchInitFailure() {
consoleInit(nullptr);
PadState pad;
padInitializeDefault(&pad);
std::puts("NS Unknown Game");
std::puts("");
std::puts("Switch init failed.");
std::puts("Check nxlink/Ryujinx logs for the failed init stage.");
std::puts("");
std::puts("Press + to exit.");
while (appletMainLoop()) {
padUpdate(&pad);
if (padGetButtonsDown(&pad) & HidNpadButton_Plus) {
break;
}
consoleUpdate(nullptr);
}
consoleExit(nullptr);
}
} // namespace
#endif
int main(int argc, char** argv) {
(void)argc;
(void)argv;
@@ -45,6 +73,7 @@ int main(int argc, char** argv) {
if (!app.init(config)) {
#ifdef __SWITCH__
std::puts("NS Unknown Game Switch init failed.");
showSwitchInitFailure();
#else
std::puts("NS Unknown Game init failed.");
#endif