Fix Switch startup save path
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user