|
@@ -183,9 +183,9 @@ void InputCECWorker::checkAdapter()
|
|
|
}
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
-void InputCECWorker::sendReceivedInput(const QString &source, const QString &keycode, bool pressDown)
|
|
|
+void InputCECWorker::sendReceivedInput(const QString &source, const QString &keycode, InputBase::InputkeyState keyState)
|
|
|
{
|
|
|
- emit receivedInput(source, keycode, pressDown);
|
|
|
+ emit receivedInput(source, keycode, keyState);
|
|
|
}
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -269,8 +269,7 @@ int InputCECWorker::CecCommand(void *cbParam, const cec_command command)
|
|
|
switch(command.opcode)
|
|
|
{
|
|
|
case CEC_OPCODE_PLAY:
|
|
|
- cec->sendReceivedInput(CEC_INPUT_NAME, INPUT_KEY_PLAY);
|
|
|
- cec->sendReceivedInput(CEC_INPUT_NAME, INPUT_KEY_PLAY, false);
|
|
|
+ cec->sendReceivedInput(CEC_INPUT_NAME, INPUT_KEY_PLAY, InputBase::KeyPressed);
|
|
|
break;
|
|
|
|
|
|
case CEC_OPCODE_DECK_CONTROL:
|
|
@@ -298,8 +297,7 @@ int InputCECWorker::CecCommand(void *cbParam, const cec_command command)
|
|
|
{
|
|
|
// We don't have up & down events for those special keys
|
|
|
// so we just fake them
|
|
|
- cec->sendReceivedInput(CEC_INPUT_NAME, keyCode);
|
|
|
- cec->sendReceivedInput(CEC_INPUT_NAME, keyCode, false);
|
|
|
+ cec->sendReceivedInput(CEC_INPUT_NAME, keyCode, InputBase::KeyPressed);
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
@@ -324,7 +322,7 @@ int InputCECWorker::CecCommand(void *cbParam, const cec_command command)
|
|
|
{
|
|
|
// samsung Return key
|
|
|
case CEC_USER_CONTROL_CODE_AN_RETURN:
|
|
|
- cec->sendReceivedInput(CEC_INPUT_NAME, INPUT_KEY_BACK);
|
|
|
+ cec->sendReceivedInput(CEC_INPUT_NAME, INPUT_KEY_BACK, down ? InputBase::KeyDown : InputBase::KeyUp);
|
|
|
return 1;
|
|
|
break;
|
|
|
|
|
@@ -336,7 +334,7 @@ int InputCECWorker::CecCommand(void *cbParam, const cec_command command)
|
|
|
cmdString = cec->getCommandString((cec_user_control_code)command.parameters[0]);
|
|
|
|
|
|
if (!cmdString.isEmpty())
|
|
|
- cec->sendReceivedInput(CEC_INPUT_NAME, cmdString, down);
|
|
|
+ cec->sendReceivedInput(CEC_INPUT_NAME, cmdString, down ? InputBase::KeyDown : InputBase::KeyUp);
|
|
|
}
|
|
|
break;
|
|
|
|