From 005ba155c0b4d8e065e6e3ffe2cdd82bb41bf200 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 14 Oct 2023 10:56:09 +0200 Subject: [PATCH] Minor tweaks --- src/rcore.c | 4 ++-- src/rcore_desktop.c | 2 +- src/rcore_web.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 3efa67b2c..b3e07f95a 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2812,7 +2812,7 @@ static void RecordAutomationEvent(unsigned int frame) // INPUT_GAMEPAD_CONNECT /* if ((CORE.Input.Gamepad.currentState[gamepad] != CORE.Input.Gamepad.previousState[gamepad]) && - (CORE.Input.Gamepad.currentState[gamepad] == true)) // Check if changed to ready + (CORE.Input.Gamepad.currentState[gamepad])) // Check if changed to ready { // TODO: Save gamepad connect event } @@ -2821,7 +2821,7 @@ static void RecordAutomationEvent(unsigned int frame) // INPUT_GAMEPAD_DISCONNECT /* if ((CORE.Input.Gamepad.currentState[gamepad] != CORE.Input.Gamepad.previousState[gamepad]) && - (CORE.Input.Gamepad.currentState[gamepad] == false)) // Check if changed to not-ready + (!CORE.Input.Gamepad.currentState[gamepad])) // Check if changed to not-ready { // TODO: Save gamepad disconnect event } diff --git a/src/rcore_desktop.c b/src/rcore_desktop.c index c2e5b23f1..8fa1edd78 100644 --- a/src/rcore_desktop.c +++ b/src/rcore_desktop.c @@ -1966,7 +1966,7 @@ static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffs // GLFW3 CursorEnter Callback, when cursor enters the window static void CursorEnterCallback(GLFWwindow *window, int enter) { - if (enter == true) CORE.Input.Mouse.cursorOnScreen = true; + if (enter) CORE.Input.Mouse.cursorOnScreen = true; else CORE.Input.Mouse.cursorOnScreen = false; } diff --git a/src/rcore_web.c b/src/rcore_web.c index 261498a5b..c0b7079b0 100644 --- a/src/rcore_web.c +++ b/src/rcore_web.c @@ -1336,7 +1336,7 @@ static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffs // GLFW3 CursorEnter Callback, when cursor enters the window static void CursorEnterCallback(GLFWwindow *window, int enter) { - if (enter == true) CORE.Input.Mouse.cursorOnScreen = true; + if (enter) CORE.Input.Mouse.cursorOnScreen = true; else CORE.Input.Mouse.cursorOnScreen = false; }