summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-02-07 20:52:11 +0100
committerraysan5 <[email protected]>2021-02-07 20:52:11 +0100
commit67206a54153e4292fd706c98b8024df16b0f5c97 (patch)
tree434141fb3f8402a027904c1742d9e6fad9ad1dbd /src/core.c
parent9081defd46e2ca3da7629e2e4f15eedbf88c49df (diff)
downloadraylib-67206a54153e4292fd706c98b8024df16b0f5c97.tar.gz
raylib-67206a54153e4292fd706c98b8024df16b0f5c97.zip
Review latest PR formating
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/core.c b/src/core.c
index b21b27ca..1cc2bb87 100644
--- a/src/core.c
+++ b/src/core.c
@@ -3330,18 +3330,12 @@ static bool InitGraphicsDevice(int width, int height)
}
#if defined(PLATFORM_DESKTOP)
- // NOTE: GLFW 3.4+ defers initialization of the Joystick subsystem on the
- // first call to any Joystick related functions. Forcing this
- // initialization here avoids doing it on `PollInputEvents` called by
- // `EndDrawing` after first frame has been just drawn. The initialization
- // will still happen and possible delays still occur, but before the window
- // is shown, which is a nicer experience.
- // Ref: https://github.com/raysan5/raylib/issues/1554
- if (MAX_GAMEPADS > 0)
- {
- glfwSetJoystickCallback(NULL);
- }
-#endif // PLATFORM_DESKTOP
+ // NOTE: GLFW 3.4+ defers initialization of the Joystick subsystem on the first call to any Joystick related functions.
+ // Forcing this initialization here avoids doing it on `PollInputEvents` called by `EndDrawing` after first frame has been just drawn.
+ // The initialization will still happen and possible delays still occur, but before the window is shown, which is a nicer experience.
+ // REF: https://github.com/raysan5/raylib/issues/1554
+ if (MAX_GAMEPADS > 0) glfwSetJoystickCallback(NULL);
+#endif
if (CORE.Window.fullscreen)
{