SDL_WarpMouseGlobal() should return non-void.

There are platforms it isn't implemented on (and currently can't be
implemented on!), and there's currently no way for an app to know this.

This shouldn't break ABI on apps that moved to a revision between 2.0.3 and
2.0.4.
This commit is contained in:
Ryan C. Gordon
2015-07-17 21:03:58 -04:00
parent a955bec49a
commit e346f14277
10 changed files with 25 additions and 15 deletions

View File

@@ -535,14 +535,16 @@ SDL_WarpMouseInWindow(SDL_Window * window, int x, int y)
}
}
void
int
SDL_WarpMouseGlobal(int x, int y)
{
SDL_Mouse *mouse = SDL_GetMouse();
if (mouse->WarpMouseGlobal) {
mouse->WarpMouseGlobal(x, y);
return mouse->WarpMouseGlobal(x, y);
}
return SDL_Unsupported();
}
static SDL_bool