summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2016-11-18 13:39:57 +0100
committerraysan5 <[email protected]>2016-11-18 13:39:57 +0100
commitf7b706263a820034a93ab88e7582b7001819d8d0 (patch)
treedec39c4e98c119b151be962ba3706042b285c39a /src/core.c
parentc7f0350182b6c0b46daaaff232789acc4c7ab4f1 (diff)
downloadraylib-f7b706263a820034a93ab88e7582b7001819d8d0.tar.gz
raylib-f7b706263a820034a93ab88e7582b7001819d8d0.zip
Some code tweaks
Correcting details that pop-up when testing the different platforms
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 7749eab7..241772ec 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1175,9 +1175,10 @@ bool IsGamepadAvailable(int gamepad)
bool IsGamepadName(int gamepad, const char *name)
{
bool result = false;
- const char *gamepadName = NULL;
#if !defined(PLATFORM_ANDROID)
+ const char *gamepadName = NULL;
+
if (gamepadReady[gamepad]) gamepadName = GetGamepadName(gamepad);
if ((name != NULL) && (gamepadName != NULL)) result = (strcmp(name, gamepadName) == 0);
#endif
@@ -1977,7 +1978,11 @@ static void PollInputEvents(void)
previousMouseWheelY = currentMouseWheelY;
currentMouseWheelY = 0;
-
+#endif
+
+// NOTE: GLFW3 joystick functionality not available in web
+// TODO: Support joysticks using emscripten API
+#if defined(PLATFORM_DESKTOP)
// Check if gamepads are ready
// NOTE: We do it here in case of disconection
for (int i = 0; i < MAX_GAMEPADS; i++)