| 79 | } // namespace |
| 80 | |
| 81 | Input::Input() : ignore_mouse_frame(false), |
| 82 | num_players_(0), |
| 83 | quit_requested_(false), |
| 84 | in_focus_(true), |
| 85 | grab_mouse_(false), |
| 86 | invert_x_mouse_look_(false), |
| 87 | invert_y_mouse_look_(false), |
| 88 | use_raw_input(false), |
| 89 | last_controller_event_time(0.0f), |
| 90 | last_mouse_event_time(0.0f), |
| 91 | last_keyboard_event_time(0.0f), |
| 92 | joystick_sequence_id(0), |
| 93 | allow_controller_input_(true), |
| 94 | use_controller_input_(false) { |
| 95 | player_inputs_.resize(4); |
| 96 | |
| 97 | // Default to only having one active player input. |
| 98 | player_inputs_[0].enabled = true; |
| 99 | player_inputs_[1].enabled = false; |
| 100 | player_inputs_[2].enabled = false; |
| 101 | player_inputs_[3].enabled = false; |
| 102 | } |
| 103 | |
| 104 | void Input::SetInvertXMouseLook(bool val) { |
| 105 | invert_x_mouse_look_ = val; |