Browse Source

Merge pull request #610 from pamarcos/fix_chdir_macos

[games] Prevent GLFW changing working dir to 'Resources'
pull/612/head
Ray 6 years ago
committed by GitHub
parent
commit
7154a83313
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions
  1. +4
    -0
      src/core.c
  2. +0
    -1
      src/rglfw.c

+ 4
- 0
src/core.c View File

@ -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");

+ 0
- 1
src/rglfw.c View File

@ -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

Loading…
Cancel
Save