Qt: use mouse input to map basic mouse buttons

This commit is contained in:
Megamouse 2024-05-19 03:12:55 +02:00
parent eb8ab8ef15
commit 7ffb61f650
9 changed files with 283 additions and 147 deletions

View file

@ -658,12 +658,12 @@ std::vector<pad_list_entry> keyboard_pad_handler::list_devices()
return list_devices;
}
std::string keyboard_pad_handler::GetMouseName(const QMouseEvent* event) const
std::string keyboard_pad_handler::GetMouseName(const QMouseEvent* event)
{
return GetMouseName(event->button());
}
std::string keyboard_pad_handler::GetMouseName(u32 button) const
std::string keyboard_pad_handler::GetMouseName(u32 button)
{
if (const auto it = mouse_list.find(button); it != mouse_list.cend())
return it->second;