REVIEWED: Formating
This commit is contained in:
parent
3f8ef4e05f
commit
e17cf9ecd7
2 changed files with 10 additions and 5 deletions
|
@ -448,8 +448,9 @@ void UpdateCamera(Camera *camera, int mode)
|
|||
if (IsKeyDown(KEY_E)) CameraRoll(camera, CAMERA_ROTATION_SPEED);
|
||||
|
||||
// Camera movement
|
||||
|
||||
if (!IsGamepadAvailable(0)){
|
||||
if (!IsGamepadAvailable(0))
|
||||
{
|
||||
// Mouse/Keyboard support
|
||||
CameraYaw(camera, -mousePositionDelta.x*CAMERA_MOUSE_MOVE_SENSITIVITY, rotateAroundTarget);
|
||||
CameraPitch(camera, -mousePositionDelta.y*CAMERA_MOUSE_MOVE_SENSITIVITY, lockView, rotateAroundTarget, rotateUp);
|
||||
|
||||
|
@ -458,8 +459,9 @@ void UpdateCamera(Camera *camera, int mode)
|
|||
if (IsKeyDown(KEY_S)) CameraMoveForward(camera, -CAMERA_MOVE_SPEED, moveInWorldPlane);
|
||||
if (IsKeyDown(KEY_D)) CameraMoveRight(camera, CAMERA_MOVE_SPEED, moveInWorldPlane);
|
||||
}
|
||||
else {
|
||||
// Simple Controller Support
|
||||
else
|
||||
{
|
||||
// Gamepad controller support
|
||||
CameraYaw(camera, -(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_X) * 2)*CAMERA_MOUSE_MOVE_SENSITIVITY, rotateAroundTarget);
|
||||
CameraPitch(camera, -(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_Y) * 2)*CAMERA_MOUSE_MOVE_SENSITIVITY, lockView, rotateAroundTarget, rotateUp);
|
||||
|
||||
|
|
|
@ -1785,7 +1785,10 @@ int GetCurrentMonitor(void)
|
|||
monitor = monitors[i];
|
||||
glfwGetMonitorWorkarea(monitor, &mx, &my, &width, &height);
|
||||
|
||||
if (x >= mx && x < (mx + width) && y >= my && y < (my + height))
|
||||
if ((x >= mx) &&
|
||||
(x < (mx + width)) &&
|
||||
(y >= my) &&
|
||||
(y < (my + height)))
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue