Support building as console app

This commit is contained in:
momo5502 2023-05-15 19:37:44 +02:00
parent ccab08261e
commit 9d2eef3928

View File

@ -250,6 +250,7 @@ namespace
"You seem to be using a network share:\n\n" + path.string() + "\n\nNetwork shares are not supported!"); "You seem to be using a network share:\n\n" + path.string() + "\n\nNetwork shares are not supported!");
} }
} }
}
int main() int main()
{ {
@ -294,7 +295,8 @@ namespace
if (!has_client && !has_server) if (!has_client && !has_server)
{ {
throw std::runtime_error("Can't find a valid BlackOps3.exe or BlackOps3_UnrankedDedicatedServer.exe. Make sure you put boiii.exe in your Black Ops 3 installation folder."); throw std::runtime_error(
"Can't find a valid BlackOps3.exe or BlackOps3_UnrankedDedicatedServer.exe. Make sure you put boiii.exe in your Black Ops 3 installation folder.");
} }
if (!is_server) if (!is_server)
@ -328,7 +330,8 @@ namespace
{ {
if (game::is_legacy_client()) if (game::is_legacy_client())
{ {
throw std::runtime_error("You are using the outdated BlackOps3.exe. This version is not supported anymore. Please use the latest binary from Steam."); throw std::runtime_error(
"You are using the outdated BlackOps3.exe. This version is not supported anymore. Please use the latest binary from Steam.");
} }
throw std::runtime_error("Bad binary loaded into memory"); throw std::runtime_error("Bad binary loaded into memory");
@ -353,7 +356,6 @@ namespace
g_call_tls_callbacks = true; g_call_tls_callbacks = true;
return static_cast<int>(entry_point()); return static_cast<int>(entry_point());
} }
}
int __stdcall WinMain(HINSTANCE, HINSTANCE, PSTR, int) int __stdcall WinMain(HINSTANCE, HINSTANCE, PSTR, int)
{ {