Skip to content

Commit ee28639

Browse files
committed
Processing.cpp: glfwCreateWindow null check and DLL copy fixes
- Add null check after glfwCreateWindow with MessageBoxA driver update links on Windows (fixes 0xC0000005 crash on old/missing GPU drivers) - checkWindowsDLLs: copy all required DLLs next to binary unconditionally on every build (fixes 0xC0000005 on fresh Windows installs where DLLs exist in msys64/mingw64/bin but not next to the sketch exe)
1 parent c6202fe commit ee28639

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Processing.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ void PApplet::size(int w,int h){
548548
}
549549
#ifdef _WIN32
550550
Sleep(1);
551-
#else
551+
#elif !defined(__EMSCRIPTEN__)
552552
usleep(1000);
553553
#endif
554554
}
@@ -2494,8 +2494,10 @@ PImage* PApplet::loadImage(const std::string& path){
24942494
std::string _ep(_buf);
24952495
size_t _sl = _ep.find_last_of("\\\\");
24962496
#else
2497+
#ifndef __EMSCRIPTEN__
24972498
ssize_t _len = readlink("/proc/self/exe", _buf, sizeof(_buf)-1);
24982499
if (_len > 0) _buf[_len] = 0;
2500+
#endif
24992501
std::string _ep(_buf);
25002502
size_t _sl = _ep.find_last_of("/");
25012503
#endif
@@ -4851,8 +4853,10 @@ PImage* PApplet::requestImage(const std::string& path){
48514853
std::string _ep(_buf);
48524854
size_t _sl = _ep.find_last_of("\\\\");
48534855
#else
4856+
#ifndef __EMSCRIPTEN__
48544857
ssize_t _len = readlink("/proc/self/exe", _buf, sizeof(_buf)-1);
48554858
if (_len > 0) _buf[_len] = 0;
4859+
#endif
48564860
std::string _ep(_buf);
48574861
size_t _sl = _ep.find_last_of("/");
48584862
#endif

0 commit comments

Comments
 (0)