Commit 9a137030 authored by Evan Ramos's avatar Evan Ramos
Browse files

SW: Add -j<dir> command line parameter

parent e7a5a297
......@@ -3606,6 +3606,26 @@ int32_t app_main(int32_t argc, char const * const * argv)
SW_ExtInit();
for (cnt = 1; cnt < argc; ++cnt)
{
char const * arg = argv[cnt];
if (*arg != '/' && *arg != '-')
continue;
++arg;
if (Bstrncasecmp(arg, "j", 1) == 0 && !SW_SHAREWARE)
{
if (strlen(arg) > 1)
{
const char * dir = arg+1;
int err = addsearchpath(dir);
if (err < 0)
buildprintf("Failed adding %s for game data: %s\n", dir,
err==-1 ? "not a directory" : "no such directory");
}
}
}
// hackish since SW's init order is a bit different right now
if (G_CheckCmdSwitch(argc, argv, "-addon0"))
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment