📄 commandinputhandler.cc
字号:
//// Copyright (c) 2004 by Istv醤 V醨adi//// This file is part of dxr3Player, a DVD player written specifically // for the DXR3 (aka Hollywood+) decoder card.// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA//------------------------------------------------------------------------------#include "CommandInputHandler.h"#include "InputListener.h"#include <cstring>//------------------------------------------------------------------------------using input::CommandInputHandler;//------------------------------------------------------------------------------void CommandInputHandler::processCommand(const char* command){ InputListener::operation_t operation = InputListener::NONE; if (strcmp(command, "UP")==0) operation = InputListener::UP; else if (strcmp(command, "DOWN")==0) operation = InputListener::DOWN; else if (strcmp(command, "LEFT")==0) operation = InputListener::LEFT; else if (strcmp(command, "RIGHT")==0) operation = InputListener::RIGHT; else if (strcmp(command, "ACTIVATE")==0) operation = InputListener::ACTIVATE; else if (strcmp(command, "MENU_TITLE")==0) operation = InputListener::MENU_TITLE; else if (strcmp(command, "MENU_ROOT")==0) operation = InputListener::MENU_ROOT; else if (strcmp(command, "MENU_SUBPICTURE")==0) operation = InputListener::MENU_SUBPICTURE; else if (strcmp(command, "MENU_AUDIO")==0) operation = InputListener::MENU_AUDIO; else if (strcmp(command, "MENU_ANGLE")==0) operation = InputListener::MENU_ANGLE; else if (strcmp(command, "MENU_PART")==0) operation = InputListener::MENU_PART; else if (strcmp(command, "PREVIOUS_CHAPTER")==0) operation = InputListener::PREVIOUS_CHAPTER; else if (strcmp(command, "NEXT_CHAPTER")==0) operation = InputListener::NEXT_CHAPTER; else if (strcmp(command, "VOLUME_RESET")==0) operation = InputListener::VOLUME_RESET; else if (strcmp(command, "VOLUME_UP")==0) operation = InputListener::VOLUME_UP; else if (strcmp(command, "VOLUME_DOWN")==0) operation = InputListener::VOLUME_DOWN; else if (strcmp(command, "TOGGLE_AUDIO")==0) operation = InputListener::TOGGLE_AUDIO; else if (strcmp(command, "INCREASE_BRIGHTNESS")==0) operation = InputListener::INCREASE_BRIGHTNESS; else if (strcmp(command, "DECREASE_BRIGHTNESS")==0) operation = InputListener::DECREASE_BRIGHTNESS; else if (strcmp(command, "INCREASE_CONTRAST")==0) operation = InputListener::INCREASE_CONTRAST; else if (strcmp(command, "DECREASE_CONTRAST")==0) operation = InputListener::DECREASE_CONTRAST; else if (strcmp(command, "INCREASE_SATURATION")==0) operation = InputListener::INCREASE_SATURATION; else if (strcmp(command, "DECREASE_SATURATION")==0) operation = InputListener::DECREASE_SATURATION; else if (strcmp(command, "CHANGE_ANGLE")==0) operation = InputListener::CHANGE_ANGLE; else if (strcmp(command, "NEXT_AUDIO_STREAM")==0) operation = InputListener::NEXT_AUDIO_STREAM; else if (strcmp(command, "PREVIOUS_AUDIO_STREAM")==0) operation = InputListener::PREVIOUS_AUDIO_STREAM; else if (strcmp(command, "NEXT_SPU_STREAM")==0) operation = InputListener::NEXT_SPU_STREAM; else if (strcmp(command, "PREVIOUS_SPU_STREAM")==0) operation = InputListener::PREVIOUS_SPU_STREAM; else if (strcmp(command, "PLAY")==0) operation = InputListener::PLAY; else if (strcmp(command, "PAUSE")==0) operation = InputListener::PAUSE; else if (strcmp(command, "PLAY_FAST_FORWARD")==0) operation = InputListener::PLAY_FAST_FORWARD; else if (strcmp(command, "PLAY_FAST_BACKWARD")==0) operation = InputListener::PLAY_FAST_BACKWARD; else if (strcmp(command, "EJECT")==0) operation = InputListener::EJECT; else if (strcmp(command, "TOGGLE_OUTPUT")==0) operation = InputListener::TOGGLE_OUTPUT; else if (strcmp(command, "PRINT_STATUS")==0) operation = InputListener::PRINT_STATUS; else if (strcmp(command, "SAVE_DVD_STATE")==0) operation = InputListener::SAVE_DVD_STATE; else if (strcmp(command, "RESUME_DVD_STATE")==0) operation = InputListener::RESUME_DVD_STATE; else if (strcmp(command, "QUIT")==0) operation = InputListener::QUIT; if (operation!=InputListener::NONE) { inputListener.handleOperation(operation); }}//------------------------------------------------------------------------------//------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -