diff options
| author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-09-15 14:36:00 +0700 |
|---|---|---|
| committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-09-15 14:36:00 +0700 |
| commit | 662673fd3ceac4895769241c1b6836061738d46a (patch) | |
| tree | 74fb8d03a626c0473ee3c3f46eefe53f4ce67aef /src/Support.cpp | |
| parent | 0e9c124d6ee480e20be07f955dd0ffe486091a1e (diff) | |
| download | blackshades-662673fd3ceac4895769241c1b6836061738d46a.tar.gz | |
Move mouse look to callback
Diffstat (limited to 'src/Support.cpp')
| -rw-r--r-- | src/Support.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/Support.cpp b/src/Support.cpp index a233dd7..fc2b0ac 100644 --- a/src/Support.cpp +++ b/src/Support.cpp @@ -29,20 +29,6 @@ void GetMouse(Point *p) p->v = floor(ypos); } -void GetMouseRel(Point *p) -{ - const auto window = glfwGetCurrentContext(); - glfwGetWindowSize(window, &p->h, &p->v); - p->h /= 2; - p->v /= 2; - - double xpos, ypos; - glfwGetCursorPos(window, &xpos, &ypos); - glfwSetCursorPos(window, p->h, p->v); // we shouldn't need this - p->h = floor(xpos) - p->h; - p->v = floor(ypos) - p->v; -} - int Button(void) { const auto window = glfwGetCurrentContext(); |
