Prevent GLFW changing working dir to 'Resources'

This commit is contained in:
Pablo Marcos Oltra 2018-07-29 18:24:46 +02:00
parent e82505b873
commit 89cec68565
2 changed files with 4 additions and 1 deletions

View file

@ -1869,6 +1869,10 @@ static bool InitGraphicsDevice(int width, int height)
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB) #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
glfwSetErrorCallback(ErrorCallback); glfwSetErrorCallback(ErrorCallback);
#if defined(__APPLE__)
glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE);
#endif
if (!glfwInit()) if (!glfwInit())
{ {
TraceLog(LOG_WARNING, "Failed to initialize GLFW"); TraceLog(LOG_WARNING, "Failed to initialize GLFW");

View file

@ -42,7 +42,6 @@
#endif #endif
#if defined(__APPLE__) #if defined(__APPLE__)
#define _GLFW_COCOA #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_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 #define _GLFW_USE_RETINA // To have windows use the full resolution of Retina displays
#endif #endif