From 416b50d7eb79de45727f902d77ee412812730a2e Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 26 Nov 2015 08:17:16 +0000 Subject: [PATCH] Added setMouse function. --- src/system/input.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/system/input.c b/src/system/input.c index a0851fa..6f4e4dc 100644 --- a/src/system/input.c +++ b/src/system/input.c @@ -54,6 +54,13 @@ void doMouseWheel(SDL_MouseWheelEvent *event) } } +void setMouse(int x, int y) +{ + app.mouse.x = x; + app.mouse.y = y; + SDL_WarpMouseInWindow(app.window, x, y); +} + void drawMouse(void) { int x, y;