InputManager: Support multiple mice via raw input

Only on Windows for now.
This commit is contained in:
Stenzek
2024-08-23 22:31:59 +10:00
parent 8b3fd538ea
commit 9e3507e0f4
37 changed files with 1480 additions and 1040 deletions

View File

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
#pragma once
@ -46,6 +46,8 @@ private:
static bool RegisterDummyClass();
static LRESULT CALLBACK DummyWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
static std::string GetMouseDeviceName(u32 index);
bool CreateDummyWindow();
void DestroyDummyWindow();
bool OpenDevices();
@ -54,7 +56,6 @@ private:
bool ProcessRawInputEvent(const RAWINPUT* event);
HWND m_dummy_window = {};
u32 m_num_keyboards = 0;
std::vector<MouseState> m_mice;
};