Fix VSync, Fix Mouse Input (Yay!), Add MAXFPS env

This commit is contained in:
2021-01-13 19:40:11 +01:00
parent 0370a2e871
commit 37542ab831
6 changed files with 31 additions and 19 deletions

View File

@@ -7,7 +7,7 @@ double EventHandler::cameraMouseActionRegister[CAMERA_MOUSE_ACTION_NUM_ITEMS] =
bool EventHandler::windowActionRegister[WINDOW_ACTION_NUM_ITEMS] = {0};
bool EventHandler::firstMouseInput = 1;
float EventHandler::mouseSensitivity = 0.5f;
float EventHandler::mouseSensitivity = 0.15f;
EventHandler::EventHandler(GLFWwindow *p_window) :
@@ -113,8 +113,8 @@ void EventHandler::mouse_callback(GLFWwindow *window, double xpos, double ypos)
deltaCursorPosX *= mouseSensitivity;
deltaCursorPosY *= mouseSensitivity;
cameraMouseActionRegister[cameraMouseDeltaX] = deltaCursorPosX;
cameraMouseActionRegister[cameraMouseDeltaY] = deltaCursorPosY;
cameraMouseActionRegister[cameraMouseDeltaX] += deltaCursorPosX;
cameraMouseActionRegister[cameraMouseDeltaY] += deltaCursorPosY;
}
bool * EventHandler::getCameraActionRegister()