From 277cd7a011f5fca2a0f9139a71ec33f3472e30fd Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Mon, 10 Mar 2014 01:58:36 +0100 Subject: [PATCH] Cursor reset. --- Escape-the-Dawn/Systems/InputSystem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Escape-the-Dawn/Systems/InputSystem.cpp b/Escape-the-Dawn/Systems/InputSystem.cpp index fc29849..b6937f7 100644 --- a/Escape-the-Dawn/Systems/InputSystem.cpp +++ b/Escape-the-Dawn/Systems/InputSystem.cpp @@ -21,8 +21,9 @@ void Systems::InputSystem::Update(double dt) glfwGetCursorPos(m_Renderer->GetWindow(), &xpos, &ypos); m_CurrentMouseDeltaX = xpos - m_LastMouseX; m_CurrentMouseDeltaY = ypos - m_LastMouseY; - m_LastMouseX = xpos; - m_LastMouseY = ypos; + m_LastMouseX = m_Renderer->WIDTH / 2.f; // xpos; + m_LastMouseY = m_Renderer->HEIGHT / 2.f; // ypos; + glfwSetCursorPos(m_Renderer->GetWindow(), m_LastMouseX, m_LastMouseY); } void Systems::InputSystem::UpdateEntity(double dt, EntityID entity, EntityID parent)