Changeset View
Changeset View
Standalone View
Standalone View
source/main.cpp
Show First 20 Lines • Show All 461 Lines • ▼ Show 20 Lines | if (args.Has("autostart-nonvisual") && args.Get("autostart").empty()) | ||||
LOGERROR("-autostart-nonvisual cant be used alone. A map with -autostart=\"TYPEDIR/MAPNAME\" is needed."); | LOGERROR("-autostart-nonvisual cant be used alone. A map with -autostart=\"TYPEDIR/MAPNAME\" is needed."); | ||||
return; | return; | ||||
} | } | ||||
const bool isVisualReplay = args.Has("replay-visual"); | const bool isVisualReplay = args.Has("replay-visual"); | ||||
const bool isNonVisualReplay = args.Has("replay"); | const bool isNonVisualReplay = args.Has("replay"); | ||||
const bool isNonVisual = args.Has("autostart-nonvisual"); | const bool isNonVisual = args.Has("autostart-nonvisual"); | ||||
const CStr replayFile = | const OsPath replayFile( | ||||
isVisualReplay ? args.Get("replay-visual") : | isVisualReplay ? args.Get("replay-visual") : | ||||
isNonVisualReplay ? args.Get("replay") : ""; | isNonVisualReplay ? args.Get("replay") : ""); | ||||
if (isVisualReplay || isNonVisualReplay) | if (isVisualReplay || isNonVisualReplay) | ||||
{ | { | ||||
if (!FileExists(OsPath(replayFile))) | if (!FileExists(replayFile)) | ||||
{ | { | ||||
debug_printf("ERROR: The requested replay file '%s' does not exist!\n", replayFile.c_str()); | debug_printf("ERROR: The requested replay file '%s' does not exist!\n", replayFile.string8().c_str()); | ||||
elexis: Hope this output was tested on windows with non-latin character too | |||||
return; | return; | ||||
} | } | ||||
if (DirectoryExists(OsPath(replayFile))) | if (DirectoryExists(replayFile)) | ||||
{ | { | ||||
debug_printf("ERROR: The requested replay file '%s' is a directory!\n", replayFile.c_str()); | debug_printf("ERROR: The requested replay file '%s' is a directory!\n", replayFile.string8().c_str()); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
// We need to initialize SpiderMonkey and libxml2 in the main thread before | // We need to initialize SpiderMonkey and libxml2 in the main thread before | ||||
// any thread uses them. So initialize them here before we might run Atlas. | // any thread uses them. So initialize them here before we might run Atlas. | ||||
ScriptEngine scriptEngine; | ScriptEngine scriptEngine; | ||||
CXeromyces::Startup(); | CXeromyces::Startup(); | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Hope this output was tested on windows with non-latin character too