| 56 | } |
| 57 | |
| 58 | void raw_mouse::reload_config() |
| 59 | { |
| 60 | m_buttons.clear(); |
| 61 | |
| 62 | if (m_index < ::size32(g_cfg_raw_mouse.players)) |
| 63 | { |
| 64 | if (const auto& player = ::at32(g_cfg_raw_mouse.players, m_index)) |
| 65 | { |
| 66 | input_log.notice("Raw mouse config for player %d=\n%s", m_index, player->to_string()); |
| 67 | |
| 68 | m_mouse_acceleration = static_cast<float>(player->mouse_acceleration.get()) / 100.0f; |
| 69 | |
| 70 | m_buttons[CELL_MOUSE_BUTTON_1] = get_mouse_button(player->mouse_button_1); |
| 71 | m_buttons[CELL_MOUSE_BUTTON_2] = get_mouse_button(player->mouse_button_2); |
| 72 | m_buttons[CELL_MOUSE_BUTTON_3] = get_mouse_button(player->mouse_button_3); |
| 73 | m_buttons[CELL_MOUSE_BUTTON_4] = get_mouse_button(player->mouse_button_4); |
| 74 | m_buttons[CELL_MOUSE_BUTTON_5] = get_mouse_button(player->mouse_button_5); |
| 75 | m_buttons[CELL_MOUSE_BUTTON_6] = get_mouse_button(player->mouse_button_6); |
| 76 | m_buttons[CELL_MOUSE_BUTTON_7] = get_mouse_button(player->mouse_button_7); |
| 77 | m_buttons[CELL_MOUSE_BUTTON_8] = get_mouse_button(player->mouse_button_8); |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | void raw_mouse::set_index(u32 index) |
| 83 | { |