Skip to content

Commit dde6a13

Browse files
committed
macOS: disable GLFW_COCOA_CHDIR_RESOURCES to fix window not appearing when launched as subprocess
1 parent f84b86f commit dde6a13

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Processing.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3363,6 +3363,9 @@ void PApplet::run(){
33633363
::std::srand((unsigned)::std::time(nullptr));
33643364
initPerlin(0); // initialize noise table with default seed
33653365

3366+
#if defined(__APPLE__)
3367+
glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE);
3368+
#endif
33663369
if(!glfwInit()){
33673370
fprintf(stderr, "[ERR] glfwInit() failed. Make sure libglfw3.dll is next to ide.exe\n");
33683371
#ifdef _WIN32

0 commit comments

Comments
 (0)