Skip to content
Snippets Groups Projects
Commit 402fd257 authored by rswindell's avatar rswindell
Browse files

Accepts path to ctrl directory on command-line (instead of path to sbbs.ini).

parent d1ff08cf
No related branches found
No related tags found
No related merge requests found
......@@ -87,10 +87,9 @@ WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR cmd, int)
Application->CreateForm(__classid(TUserListForm), &UserListForm);
Application->CreateForm(__classid(TEventsForm), &EventsForm);
Application->CreateForm(__classid(TServicesForm), &ServicesForm);
if(cmd[0])
SAFECOPY(MainForm->ini_file,cmd);
else
sbbs_get_ini_fname(MainForm->ini_file, MainForm->global.ctrl_dir, NULL /* auto-hostname */);
if(cmd[0] && isdir(cmd))
SAFECOPY(MainForm->global.ctrl_dir,cmd);
sbbs_get_ini_fname(MainForm->ini_file, MainForm->global.ctrl_dir, NULL /* auto-hostname */);
Application->Run();
}
catch (Exception &exception)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment