al_set_mouse_xy
bool al_set_mouse_xy(ALLEGRO_DISPLAY *display, int x, int y)
Introduced in 5.0.0
Try to position the mouse at the given coordinates on the given display. The mouse movement resulting from a successful move will generate an ALLEGRO_EVENT_MOUSE_WARPED event.
Returns true on success, false on failure.
See also: al_set_mouse_z, al_set_mouse_w
Examples: ex_ogre3d, ex_warp_mouse
Most helpful discussions:
- Having Trouble with exit(1) - Stalling Program
- "Endless" mouse
- First person camera using transformations
- Allegro 5.2.2 released!
- Allegro Resolution Headache
- Choppy graphics
- Loop ran out of time from drawing
- Mouse Cursor Jumping
- Frameless window
- Line Collision / Shot Detection System
Other recent discussions:
- Mouse API suggestions and bug reports
- Allegro 5 + OpenGL + GL_DEPTH_TEST problem
- [Allegro 5][Mac OS X]invalid fullscreen drawable
- Mouse & Keyboard event interference
- I did it! ex_ogre3d is now working on Windows!!
- how to get mickeys to work with unlimited mouse movement range
- how to use ev.mouse.dx
- Change or hold position of mouse