X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftestclient%2Fmain.cpp;h=964cf68384b1d224a881466164ffb09a38186b5e;hb=9ff1aa8068f4d4b0db936cfa6c69674a8c520ad6;hp=de96e0df237a83e738e10769cb8ae5bc06d98667;hpb=5a8d43cbeb37ff1bba7bca99eb610bf3bf3affa2;p=deb_libcec.git diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index de96e0d..964cf68 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -214,6 +214,7 @@ void ShowHelpCommandLine(const char* strExec) " -b --base {int} The logical address of the device to with this " << endl << " adapter is connected." << endl << " -f --log-file {file} Writes all libCEC log message to a file" << endl << + " -r --rom Read persisted settings from the EEPROM" << endl << " -sf --short-log-file {file} Writes all libCEC log message without timestamps" << endl << " and log levels to a file." << endl << " -d --log-level {level} Sets the log level. See cectypes.h for values." << endl << @@ -1014,6 +1015,13 @@ bool ProcessCommandLineArguments(int argc, char *argv[]) } ++iArgPtr; } + else if (!strcmp(argv[iArgPtr], "-r") || + !strcmp(argv[iArgPtr], "--rom")) + { + cout << "using settings from EEPROM" << endl; + g_config.bGetSettingsFromROM = 1; + ++iArgPtr; + } else { g_strPort = argv[iArgPtr++]; @@ -1034,7 +1042,6 @@ int main (int argc, char *argv[]) g_callbacks.CBCecKeyPress = &CecKeyPress; g_callbacks.CBCecCommand = &CecCommand; g_config.callbacks = &g_callbacks; - g_config.bGetSettingsFromROM = 1; if (!ProcessCommandLineArguments(argc, argv)) return 0;