aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2018-10-25 16:16:44 +0200
committerMichael Vetter <jubalh@iodoru.org>2018-10-25 16:16:44 +0200
commit65b5de962d47e65876368499883cf2aa286c5617 (patch)
tree267774af543e93210d559fe969c4ac138fb73bd5
parent9bad248b549379a02ac6167f9369cd4370295124 (diff)
downloadraylib-65b5de962d47e65876368499883cf2aa286c5617.tar.gz
raylib-65b5de962d47e65876368499883cf2aa286c5617.zip
Use seperate blog for MAX_FILEPATH_LENGTH define
Let's have a seperate if linux block for this. Since we will need to define MAX_FILEPATH_LENGTH for all other cases. And its more readable like this.
-rw-r--r--src/core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 993e4e83..a324bf0f 100644
--- a/src/core.c
+++ b/src/core.c
@@ -159,7 +159,6 @@
unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
#endif
- #define MAX_FILEPATH_LENGTH 256
#elif defined(__linux__)
#include <sys/time.h> // Required for: timespec, nanosleep(), select() - POSIX
@@ -175,9 +174,14 @@
#define GLFW_EXPOSE_NATIVE_NSGL
#include <GLFW/glfw3native.h> // Required for: glfwGetCocoaWindow(), glfwGetNSGLContext()
+ #endif
+#endif
+
+#if defined(__linux__)
#include <linux/limits.h> // for NAME_MAX and PATH_MAX defines
#define MAX_FILEPATH_LENGTH PATH_MAX // Use Linux define (4096)
- #endif
+#else
+ #define MAX_FILEPATH_LENGTH 256 // Use common value
#endif
#if defined(PLATFORM_ANDROID)