Encapsulated Renderer WIDTH and HEIGHT variables.

This commit is contained in:
2014-04-29 13:58:27 +02:00
parent 57d29d0db7
commit d0211ef8d6
3 changed files with 12 additions and 11 deletions
+2 -2
View File
@@ -51,8 +51,8 @@ void Systems::InputSystem::Update(double dt)
// Lock mouse while holding LMB
if (m_CurrentMouseState[GLFW_MOUSE_BUTTON_LEFT])
{
m_LastMouseX = m_Renderer->WIDTH / 2.f; // xpos;
m_LastMouseY = m_Renderer->HEIGHT / 2.f; // 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);
}
// Hide/show cursor with LMB