repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5f2f360
)
cec-client: added -m/--monitor startup options, which will start a monitor-only clien...
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 14 May 2012 13:06:20 +0000
(15:06 +0200)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 14 May 2012 13:19:21 +0000
(15:19 +0200)
src/testclient/main.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/testclient/main.cpp
b/src/testclient/main.cpp
index 39b7ff47df5ca8e761aa3235adc7feffc9db02e9..34fd38730821fd78e7e2c2f6045ad29344d62bde 100644
(file)
--- a/
src/testclient/main.cpp
+++ b/
src/testclient/main.cpp
@@
-249,6
+249,7
@@
void ShowHelpCommandLine(const char* strExec)
" -s --single-command Execute a single command and exit. Does not power" << endl <<
" on devices on startup and power them off on exit." << endl <<
" -o --osd-name {osd name} Use a custom osd name." << endl <<
" -s --single-command Execute a single command and exit. Does not power" << endl <<
" on devices on startup and power them off on exit." << endl <<
" -o --osd-name {osd name} Use a custom osd name." << endl <<
+ " -m --monitor Start a monitor-only client." << endl <<
" [COM PORT] The com port to connect to. If no COM" << endl <<
" port is given, the client tries to connect to the" << endl <<
" first device that is detected." << endl <<
" [COM PORT] The com port to connect to. If no COM" << endl <<
" port is given, the client tries to connect to the" << endl <<
" first device that is detected." << endl <<
@@
-1072,6
+1073,13
@@
bool ProcessCommandLineArguments(int argc, char *argv[])
}
++iArgPtr;
}
}
++iArgPtr;
}
+ else if (!strcmp(argv[iArgPtr], "-m") ||
+ !strcmp(argv[iArgPtr], "--monitor"))
+ {
+ cout << "starting a monitor-only client. use 'mon 0' to switch to normal mode" << endl;
+ g_config.bMonitorOnly = 1;
+ ++iArgPtr;
+ }
else
{
g_strPort = argv[iArgPtr++];
else
{
g_strPort = argv[iArgPtr++];
@@
-1086,7
+1094,7
@@
int main (int argc, char *argv[])
{
g_config.Clear();
snprintf(g_config.strDeviceName, 13, "CECTester");
{
g_config.Clear();
snprintf(g_config.strDeviceName, 13, "CECTester");
- g_config.clientVersion = CEC_CLIENT_VERSION_1_6_
2
;
+ g_config.clientVersion = CEC_CLIENT_VERSION_1_6_
3
;
g_config.bActivateSource = 0;
g_callbacks.CBCecLogMessage = &CecLogMessage;
g_callbacks.CBCecKeyPress = &CecKeyPress;
g_config.bActivateSource = 0;
g_callbacks.CBCecLogMessage = &CecLogMessage;
g_callbacks.CBCecKeyPress = &CecKeyPress;