Created
October 26, 2015 01:48
-
-
Save NitroXenon/c3c2d35c5811f56e08de to your computer and use it in GitHub Desktop.
SPlayer start args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while(pos) | |
{ | |
CString param = cmdln.GetNext(pos); | |
if(param.IsEmpty()) continue; | |
if((param[0] == '-' || param[0] == '/') && param.GetLength() > 1) | |
{ | |
CString sw = param.Mid(1).MakeLower(); | |
if(sw == _T("open")) nCLSwitches |= CLSW_OPEN; | |
else if(sw == _T("play")) nCLSwitches |= CLSW_PLAY; | |
else if(sw == _T("fullscreen")) nCLSwitches |= CLSW_FULLSCREEN; | |
else if(sw == _T("startfull")) nCLSwitches |= CLSW_STARTFULL; | |
else if(sw == _T("minimized")) nCLSwitches |= CLSW_MINIMIZED; | |
else if(sw == _T("new")) nCLSwitches |= CLSW_NEW; | |
else if(sw == _T("help") || sw == _T("h") || sw == _T("?")) nCLSwitches |= CLSW_HELP; | |
else if(sw == _T("dub") && pos) slDubs.AddTail(cmdln.GetNext(pos)); | |
else if(sw == _T("sub") && pos) slSubs.AddTail(cmdln.GetNext(pos)); | |
else if(sw == _T("filter") && pos) slFilters.AddTail(cmdln.GetNext(pos)); | |
else if(sw == _T("dvd")) nCLSwitches |= CLSW_DVD; | |
else if(sw == _T("cd")) nCLSwitches |= CLSW_CD; | |
else if(sw == _T("add")) nCLSwitches |= CLSW_ADD; | |
else if(sw == _T("cap")) nCLSwitches |= CLSW_CAP; | |
else if(sw == _T("regvid")) { nCLSwitches |= CLSW_REGEXTVID; PlayerPreference::GetInstance()->SetIntVar(INTVAR_CHECKFILEASSOCONSTARTUP ,1);} | |
else if(sw == _T("regaud")) nCLSwitches |= CLSW_REGEXTAUD; | |
else if(sw == _T("unregall")) nCLSwitches |= CLSW_UNREGEXT; | |
else if(sw == _T("unregvid")) nCLSwitches |= CLSW_UNREGEXT; /* keep for compatibility with old versions */ | |
else if(sw == _T("unregaud")) nCLSwitches |= CLSW_UNREGEXT; /* keep for compatibility with old versions */ | |
else if(sw == _T("start") && pos) {rtStart = 10000i64*_tcstol(cmdln.GetNext(pos), NULL, 10); nCLSwitches |= CLSW_STARTVALID;} | |
else if(sw == _T("startpos") && pos) {/* TODO: mm:ss. */;} | |
else if(sw == _T("nofocus")) nCLSwitches |= CLSW_NOFOCUS; | |
else if(sw == _T("close")) nCLSwitches |= CLSW_CLOSE; | |
else if(sw == _T("standby")) nCLSwitches |= CLSW_STANDBY; | |
else if(sw == _T("hibernate")) nCLSwitches |= CLSW_HIBERNATE; | |
else if(sw == _T("shutdown")) nCLSwitches |= CLSW_SHUTDOWN; | |
else if(sw == _T("fromdmp")) { nCLSwitches |= CLSW_STARTFROMDMP; /*SVP_LogMsg5(L"dmpfrom %x", nCLSwitches);*/} | |
else if(sw == _T("htpc")) { nCLSwitches |= CLSW_HTPCMODE|CLSW_FULLSCREEN; } | |
else if(sw == _T("logoff")) nCLSwitches |= CLSW_LOGOFF; | |
else if(sw == _T("genui")) {nCLSwitches |= CLSW_GENUIINI;bGenUIINIOnExit = true; } | |
else if(sw == _T("creattoolbarbuttonfile")){nCLSwitches |= CLSW_CREATTOOLBARBUTTONFILE;m_bcreattoolbarbuttonflie = true;} | |
else if(sw == _T("adminoption")) { nCLSwitches |= CLSW_ADMINOPTION; iAdminOption = _ttoi (cmdln.GetNext(pos)); } | |
else if(sw == _T("fixedsize") && pos) | |
{ | |
CAtlList<CString> sl; | |
Explode(cmdln.GetNext(pos), sl, ',', 2); | |
if(sl.GetCount() == 2) | |
{ | |
fixedWindowSize.SetSize(_ttol(sl.GetHead()), _ttol(sl.GetTail())); | |
if(fixedWindowSize.cx > 0 && fixedWindowSize.cy > 0) | |
nCLSwitches |= CLSW_FIXEDSIZE; | |
} | |
} | |
else if(sw == _T("snapshot")) nCLSwitches |= CLSW_SNAPSHOT; | |
else if(sw == _T("monitor") && pos) {iMonitor = _tcstol(cmdln.GetNext(pos), NULL, 10); nCLSwitches |= CLSW_MONITOR;} | |
else nCLSwitches |= CLSW_HELP|CLSW_UNRECOGNIZEDSWITCH; | |
} | |
else | |
{ | |
slFiles.AddTail(param); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment