[Qt] Implements Find/GetControlName callback for QInputInterface

This commit is contained in:
Marcos Medeiros 2014-09-10 15:53:30 +00:00
parent 6689125b3f
commit 9db7cf5745
1 changed files with 16 additions and 0 deletions

View File

@ -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;
}