input/qt: increase max raw mouse devices to 16

This commit is contained in:
Megamouse 2024-05-22 00:37:44 +02:00
parent b0550027c3
commit 49712f8f4e
1 changed files with 3 additions and 1 deletions

View File

@ -62,8 +62,10 @@ raw_mouse_settings_dialog::raw_mouse_settings_dialog(QWidget* parent)
cfg_log.notice("Could not load raw mouse config. Using defaults.");
}
constexpr u32 max_devices = 16;
g_raw_mouse_handler = std::make_unique<raw_mouse_handler>(true);
g_raw_mouse_handler->Init(::size32(g_cfg_raw_mouse.players));
g_raw_mouse_handler->Init(std::max(max_devices, ::size32(g_cfg_raw_mouse.players)));
g_raw_mouse_handler->set_mouse_press_callback([this](const std::string& device_name, s32 cell_code, bool pressed)
{
mouse_press(device_name, cell_code, pressed);