diff --git a/source/netInstall.cpp b/source/netInstall.cpp index 1c23760..4709d93 100755 --- a/source/netInstall.cpp +++ b/source/netInstall.cpp @@ -150,6 +150,11 @@ namespace netInstStuff{ struct in_addr addr = {(in_addr_t) gethostid()}; std::string ourIPAddr(inet_ntoa(addr)); + // If our IP is 127.0.0.1, cancel because we aren't connected to a network + if (ourIPAddr == "1.0.0.127") { + inst::ui::mainApp->CreateShowDialog("Network connection not available", "Check that airplane mode is disabled and you're connected to a local network.", {"OK"}, true); + return {}; + } inst::ui::setNetInfoText("Waiting for a connection... Your Switch's IP Address is: " + ourIPAddr); printf("%s %s\n", "Switch IP is ", inet_ntoa(addr));