mirror of
https://github.com/rock88/moonlight-nx
synced 2024-11-22 03:23:07 +00:00
This cause a crash :C
This commit is contained in:
parent
76a4389450
commit
285416ba04
2 changed files with 5 additions and 5 deletions
|
@ -37,7 +37,7 @@ void MouseController::handle_mouse() {
|
|||
state.scroll_y = (double)hid_mouse_state.wheel_delta_x / 100; // Why wheel_delta_x?
|
||||
|
||||
if (m_mouse_state.x != state.x || m_mouse_state.y != state.y) {
|
||||
nanogui::cursor_pos_callback_event(state.x, state.y);
|
||||
nanogui::cursor_pos_callback_event((double)state.x, (double)state.y);
|
||||
}
|
||||
|
||||
if (m_mouse_state.l_pressed != state.l_pressed) {
|
||||
|
@ -97,12 +97,12 @@ void MouseController::draw_cursor(Application *app) {
|
|||
}
|
||||
}
|
||||
|
||||
void MouseController::handle_mouse_move(int x, int y) {
|
||||
void MouseController::handle_mouse_move(double x, double y) {
|
||||
m_hid_mouse_is_used = false;
|
||||
|
||||
auto state = m_mouse_state;
|
||||
state.x = x;
|
||||
state.y = y;
|
||||
state.x = (int)x;
|
||||
state.y = (int)y;
|
||||
|
||||
if (set_new_mouse_state(state)) {
|
||||
nanogui::cursor_pos_callback_event(x, y);
|
||||
|
|
|
@ -45,7 +45,7 @@ private:
|
|||
bool m_draw_cursor_for_hid_mouse = true;
|
||||
double m_last_touch_y = 0;
|
||||
|
||||
void handle_mouse_move(int x, int y);
|
||||
void handle_mouse_move(double x, double y);
|
||||
void handle_mouse_buttons(int button, int action, int modifiers);
|
||||
void handle_mouse_scroll(int x, int y);
|
||||
bool set_new_mouse_state(MouseState& state);
|
||||
|
|
Loading…
Reference in a new issue