Notify about initial network requirement

This commit is contained in:
Maurice Heumann 2023-03-21 17:36:39 +01:00
parent 1f70006719
commit 166ff6f429
3 changed files with 13 additions and 2 deletions

View File

@ -38,9 +38,14 @@ namespace launcher
//window.get_html_frame()->load_html(utils::nt::load_resource(MENU_MAIN));
window.get_html_frame()->load_url(
utils::string::va("file:///%s/data/launcher/main.html", game::get_appdata_path().generic_string().data()));
utils::string::va("file:///%s", get_launcher_ui_file().generic_string().data()));
window::run();
return run_game;
}
std::filesystem::path get_launcher_ui_file()
{
return game::get_appdata_path() / "data/launcher/main.html";
}
}

View File

@ -3,4 +3,5 @@
namespace launcher
{
bool run();
std::filesystem::path get_launcher_ui_file();
}

View File

@ -279,6 +279,11 @@ namespace
remove_crash_file();
updater::update();
if(!utils::io::file_exists(launcher::get_launcher_ui_file().generic_wstring()))
{
throw std::runtime_error("BOIII needs an active internet connection for the first time you launch it.");
}
const auto client_binary = "BlackOps3.exe"s;
const auto server_binary = "BlackOps3_UnrankedDedicatedServer.exe"s;
@ -335,7 +340,7 @@ namespace
}
catch (std::exception& e)
{
MessageBoxA(nullptr, e.what(), "ERROR", MB_ICONERROR | MB_SETFOREGROUND | MB_TOPMOST);
MessageBoxA(nullptr, e.what(), "Error", MB_ICONERROR | MB_SETFOREGROUND | MB_TOPMOST);
return 1;
}
}