| 654 | } |
| 655 | |
| 656 | void InputManager::AddMouseInput(HWND window_handle, long input_action, int x, int y) { |
| 657 | LOG(TRACE) << "Entering InputManager::AddMouseInput"; |
| 658 | INPUT mouse_input; |
| 659 | mouse_input.type = INPUT_MOUSE; |
| 660 | mouse_input.mi.dwFlags = input_action | MOUSEEVENTF_ABSOLUTE; |
| 661 | mouse_input.mi.dx = x; |
| 662 | mouse_input.mi.dy = y; |
| 663 | mouse_input.mi.dwExtraInfo = 0; |
| 664 | mouse_input.mi.mouseData = 0; |
| 665 | mouse_input.mi.time = 0; |
| 666 | if (input_action == MOUSEEVENTF_LEFTDOWN) { |
| 667 | this->UpdatePressedKeys(WD_MOUSE_LBUTTON, true); |
| 668 | } |
| 669 | if (input_action == MOUSEEVENTF_RIGHTDOWN) { |
| 670 | this->UpdatePressedKeys(WD_MOUSE_RBUTTON, true); |
| 671 | } |
| 672 | if (input_action == MOUSEEVENTF_LEFTUP) { |
| 673 | this->UpdatePressedKeys(WD_MOUSE_LBUTTON, false); |
| 674 | } |
| 675 | if (input_action == MOUSEEVENTF_RIGHTUP) { |
| 676 | this->UpdatePressedKeys(WD_MOUSE_RBUTTON, false); |
| 677 | } |
| 678 | this->inputs_.push_back(mouse_input); |
| 679 | } |
| 680 | |
| 681 | void InputManager::AddKeyboardInput(HWND window_handle, |
| 682 | std::wstring key, |
no test coverage detected