Notify about initial network requirement
This commit is contained in:
parent
1f70006719
commit
166ff6f429
@ -38,9 +38,14 @@ namespace launcher
|
|||||||
|
|
||||||
//window.get_html_frame()->load_html(utils::nt::load_resource(MENU_MAIN));
|
//window.get_html_frame()->load_html(utils::nt::load_resource(MENU_MAIN));
|
||||||
window.get_html_frame()->load_url(
|
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();
|
window::run();
|
||||||
return run_game;
|
return run_game;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::filesystem::path get_launcher_ui_file()
|
||||||
|
{
|
||||||
|
return game::get_appdata_path() / "data/launcher/main.html";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,4 +3,5 @@
|
|||||||
namespace launcher
|
namespace launcher
|
||||||
{
|
{
|
||||||
bool run();
|
bool run();
|
||||||
|
std::filesystem::path get_launcher_ui_file();
|
||||||
}
|
}
|
||||||
|
@ -279,6 +279,11 @@ namespace
|
|||||||
remove_crash_file();
|
remove_crash_file();
|
||||||
updater::update();
|
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 client_binary = "BlackOps3.exe"s;
|
||||||
const auto server_binary = "BlackOps3_UnrankedDedicatedServer.exe"s;
|
const auto server_binary = "BlackOps3_UnrankedDedicatedServer.exe"s;
|
||||||
|
|
||||||
@ -335,7 +340,7 @@ namespace
|
|||||||
}
|
}
|
||||||
catch (std::exception& e)
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user