small dedi changes

This commit is contained in:
quaK 2024-01-06 19:26:47 +02:00
parent 5d2065e322
commit ccf7aec6e6
2 changed files with 6 additions and 2 deletions

View File

@ -8,6 +8,7 @@
#include "command.hpp"
#include "console/console.hpp"
#include "scheduler.hpp"
#include "filesystem.hpp"
#include <utils/json.hpp>
@ -121,7 +122,7 @@ namespace dedicated
nlohmann::json get_snd_alias_length_data(const char* mapname, const std::string& game_mode = "")
{
const auto path = "sounddata/"s + game_mode + "/"s + mapname + ".json"s;
const auto buffer = utils::io::read_file(path);
const auto buffer = filesystem::read_file(path);
if (!buffer.empty())
{
try
@ -153,6 +154,7 @@ namespace dedicated
}
else
{
//console::error("[SND]: failed to find sound length soundalias \"%s\"\n", alias);
return 0;
}
}

View File

@ -107,7 +107,9 @@ void limit_parallel_dll_loading()
int main()
{
ShowWindow(GetConsoleWindow(), SW_HIDE);
if (!game::environment::is_dedi())
ShowWindow(GetConsoleWindow(), SW_HIDE);
console::init();
FARPROC entry_point;