| 18773 | } |
| 18774 | |
| 18775 | HRESULT QKeyMapper_Worker::hookGetDeviceData(IDirectInputDevice8W *pThis, DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) |
| 18776 | { |
| 18777 | #ifdef DEBUG_LOGOUT_ON |
| 18778 | qDebug("hookGetDeviceData() Called"); |
| 18779 | #endif |
| 18780 | HRESULT result = FuncPtrGetDeviceData(pThis, cbObjectData, rgdod, pdwInOut, dwFlags); |
| 18781 | |
| 18782 | if (result == DI_OK) { |
| 18783 | for (DWORD i = 0; i < *pdwInOut; ++i) { |
| 18784 | if (LOBYTE(rgdod[i].dwData) > 0) { //key down |
| 18785 | if (rgdod[i].dwOfs == DIK_W) { |
| 18786 | qDebug().noquote() << "[DINPUT] hookGetDeviceData: [W] Key Down."; |
| 18787 | } |
| 18788 | else if (rgdod[i].dwOfs == DIK_S) { |
| 18789 | qDebug().noquote() << "[DINPUT] hookGetDeviceData: [S] Key Down."; |
| 18790 | } |
| 18791 | else if (rgdod[i].dwOfs == DIK_A) { |
| 18792 | qDebug().noquote() << "[DINPUT] hookGetDeviceData: [A] Key Down."; |
| 18793 | } |
| 18794 | else if (rgdod[i].dwOfs == DIK_D) { |
| 18795 | qDebug().noquote() << "[DINPUT] hookGetDeviceData: [D] Key Down."; |
| 18796 | } |
| 18797 | } |
| 18798 | if (LOBYTE(rgdod[i].dwData) == 0) { //key up |
| 18799 | if (rgdod[i].dwOfs == DIK_W) { |
| 18800 | qDebug().noquote() << "[DINPUT] hookGetDeviceData: [W] Key Up."; |
| 18801 | } |
| 18802 | else if (rgdod[i].dwOfs == DIK_S) { |
| 18803 | qDebug().noquote() << "[DINPUT] hookGetDeviceData: [S] Key Up."; |
| 18804 | } |
| 18805 | else if (rgdod[i].dwOfs == DIK_A) { |
| 18806 | qDebug().noquote() << "[DINPUT] hookGetDeviceData: [A] Key Up."; |
| 18807 | } |
| 18808 | else if (rgdod[i].dwOfs == DIK_D) { |
| 18809 | qDebug().noquote() << "[DINPUT] hookGetDeviceData: [D] Key Up."; |
| 18810 | } |
| 18811 | } |
| 18812 | } |
| 18813 | } |
| 18814 | return result; |
| 18815 | } |
| 18816 | #endif |
| 18817 | |
| 18818 | void QKeyMapper_Worker::initVirtualKeyCodeMap() |
nothing calls this directly
no outgoing calls
no test coverage detected