mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-23 11:27:36 +02:00
Parse arg refactoring #4124
Used argParser to parse arguments and removed the old code
This commit is contained in:
parent
e26ccfdce6
commit
943a355359
14 changed files with 80 additions and 458 deletions
|
@ -58,29 +58,6 @@ BOOL WINAPI CAppUtilWindows::consoleHandler(DWORD)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
bool
|
||||
CAppUtilWindows::parseArg(const int& argc, const char* const* argv, int& i)
|
||||
{
|
||||
if (app().isArg(i, argc, argv, NULL, "--service")) {
|
||||
|
||||
LOG((CLOG_WARN "obsolete argument --service, use synergyd instead."));
|
||||
app().bye(kExitFailed);
|
||||
}
|
||||
else if (app().isArg(i, argc, argv, NULL, "--exit-pause")) {
|
||||
|
||||
app().argsBase().m_pauseOnExit = true;
|
||||
}
|
||||
else if (app().isArg(i, argc, argv, NULL, "--stop-on-desk-switch")) {
|
||||
app().argsBase().m_stopOnDeskSwitch = true;
|
||||
}
|
||||
else {
|
||||
// option not supported here
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
int
|
||||
mainLoopStatic()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue