void SDL_WarpMouseInWindow(SDL_Window * window, int x, int y) { SDL_Mouse *mouse = &SDL_mouse; if (mouse->WarpMouse) { mouse->WarpMouse(mouse, window, x, y); } else { SDL_SendMouseMotion(window, 0, x, y); } }
void SDL_WarpMouseInWindow(SDL_Window * window, int x, int y) { SDL_Mouse *mouse = SDL_GetMouse(); if (mouse->WarpMouse) { mouse->WarpMouse(window, x, y); // Urho3D: update the internal position mouse->x = x; mouse->y = y; mouse->last_x = x; mouse->last_y = y; } else { SDL_SendMouseMotion(window, 0, x, y); } }
void SDL_WarpMouseInWindow(SDL_Window * window, int x, int y) { SDL_Mouse *mouse = SDL_GetMouse(SDL_current_mouse); if (!mouse) { return; } if (mouse->WarpMouse) { mouse->WarpMouse(mouse, window, x, y); } else { SDL_SetMouseFocus(SDL_current_mouse, window); SDL_SendMouseMotion(SDL_current_mouse, 0, x, y, 0); } }
void SDL_WarpMouseInWindow(SDL_Window * window, int x, int y) { SDL_Mouse *mouse = SDL_GetMouse(); if ( window == NULL ) window = mouse->focus; if ( window == NULL ) return; if (mouse->WarpMouse) { mouse->WarpMouse(window, x, y); } else { SDL_SendMouseMotion(window, mouse->mouseID, 0, x, y); } }
void SDL_WarpMouseInWindow(SDL_Window * window, int x, int y) { SDL_Mouse *mouse = SDL_GetMouse(); if ( window == NULL ) window = mouse->focus; if ( window == NULL ) return; if (mouse->WarpMouse) { mouse->WarpMouse(window, x, y); } else { SDL_SendMouseMotion(window, mouse->mouseID, 0, x, y); } // Urho3D: update mouse internal state immediately mouse->last_x = mouse->x = x; mouse->last_y = mouse->y = y; }