mirror of
https://github.com/Team-Neptune/NSAInstaller.git
synced 2024-11-23 20:59:47 +00:00
Add check for if you're actually connected to a network for net installs
This commit is contained in:
parent
24395270ba
commit
63fa7aea77
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user