aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Marcos Oltra <pablo.marcos.oltra@gmail.com>2018-07-29 18:24:46 +0200
committerPablo Marcos Oltra <pablo.marcos.oltra@gmail.com>2018-07-29 18:38:31 +0200
commit89cec68565cb9540dfaca303e1fe72c6b65618f7 (patch)
treea141f94b8b09dc0464bda2f247324710b6f46cf7 /src
parente82505b873370b8f3a914a079062c21e64353210 (diff)
downloadraylib-89cec68565cb9540dfaca303e1fe72c6b65618f7.tar.gz
raylib-89cec68565cb9540dfaca303e1fe72c6b65618f7.zip
Prevent GLFW changing working dir to 'Resources'
Diffstat (limited to 'src')
-rw-r--r--src/core.c4
-rw-r--r--src/rglfw.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index aa76e88c..a1a1b1f9 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1869,6 +1869,10 @@ static bool InitGraphicsDevice(int width, int height)
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
glfwSetErrorCallback(ErrorCallback);
+#if defined(__APPLE__)
+ glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE);
+#endif
+
if (!glfwInit())
{
TraceLog(LOG_WARNING, "Failed to initialize GLFW");
diff --git a/src/rglfw.c b/src/rglfw.c
index 50d606d4..154eb4ff 100644
--- a/src/rglfw.c
+++ b/src/rglfw.c
@@ -42,7 +42,6 @@
#endif
#if defined(__APPLE__)
#define _GLFW_COCOA
- #define _GLFW_USE_CHDIR // To chdir to the Resources subdirectory of the application bundle during glfwInit
#define _GLFW_USE_MENUBAR // To create and populate the menu bar when the first window is created
#define _GLFW_USE_RETINA // To have windows use the full resolution of Retina displays
#endif