diff options
Diffstat (limited to 'Source/Support.cpp')
| -rw-r--r-- | Source/Support.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Support.cpp b/Source/Support.cpp index 5038d50..2e37ff4 100644 --- a/Source/Support.cpp +++ b/Source/Support.cpp @@ -39,6 +39,16 @@ void GetMouse(Point *p) p->v = y; } +void GetMouseRel(Point *p) +{ + int x; + int y; + + SDL_GetRelativeMouseState(&x, &y); + + p->h = x; + p->v = y; +} int Button(void) { return (SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(1)); |
