raw_mouse: fix out of bounds error

This commit is contained in:
Megamouse 2024-05-20 13:10:26 +02:00
parent 1600ca2c03
commit dae4eb2d0e

View file

@ -62,6 +62,7 @@ std::pair<int, int> raw_mouse::get_mouse_button(const cfg::string& button)
#ifdef _WIN32
static const std::unordered_map<int, std::pair<int, int>> btn_pairs
{
{ 0, {}},
{ RI_MOUSE_BUTTON_1_UP, { RI_MOUSE_BUTTON_1_DOWN, RI_MOUSE_BUTTON_1_UP }},
{ RI_MOUSE_BUTTON_2_UP, { RI_MOUSE_BUTTON_2_DOWN, RI_MOUSE_BUTTON_2_UP }},
{ RI_MOUSE_BUTTON_3_UP, { RI_MOUSE_BUTTON_3_DOWN, RI_MOUSE_BUTTON_3_UP }},