rcinput: fix getKeyName for RC_none case

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6ca45cb5fa
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-08-20 (Sun, 20 Aug 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2017-08-20 11:44:01 +02:00
parent fec7979dfa
commit a2decedbd8

View File

@@ -1678,9 +1678,14 @@ const char * CRCInput::getSpecialKeyName(const unsigned int key)
std::string CRCInput::getKeyName(const unsigned int key) std::string CRCInput::getKeyName(const unsigned int key)
{ {
std::string res(getKeyNameC(key & ~RC_Repeat)); std::string res;
if ((key & RC_Repeat) && res != "unknown") if (key > RC_MaxRC)
res += " (long)"; res = getKeyNameC(key); /* will only resolve RC_nokey or "unknown" */
else {
res = (getKeyNameC(key & ~RC_Repeat));
if ((key & RC_Repeat) && res != "unknown")
res += " (long)";
}
return res; return res;
} }