[Qt] Implements Find/GetControlName callback for QInputInterface
This commit is contained in:
parent
6689125b3f
commit
9db7cf5745
|
@ -98,11 +98,27 @@ int QtInputState(int nCode)
|
|||
|
||||
int QtInputFind(bool CreateBaseline)
|
||||
{
|
||||
if (!bKeyboardRead)
|
||||
ReadKeyboard();
|
||||
|
||||
for (int i = 0; i < 256; i++)
|
||||
if (qKeyboardState[i])
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int QtInputGetControlName(int nCode, TCHAR* pszDeviceName, TCHAR* pszControlName)
|
||||
{
|
||||
pszDeviceName[0] = '\0';
|
||||
pszControlName[0] = '\0';
|
||||
|
||||
if (nCode < 256) {
|
||||
strcpy(pszControlName, QString("Key %1").arg(nCode).toLatin1().data());
|
||||
strcpy(pszDeviceName, "Keyboard");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue