diff --git a/src/Application.cpp b/src/Application.cpp index 2033ab0..07d0a83 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -12,7 +12,12 @@ #include "GuiManager.h" #endif -#define fopen_s(pFile, filename, mode) ((*(pFile) = fopen((filename), (mode))) == NULL) +#ifdef _WIN32 + // On Windows, fopen_s is already available, so no need to define it. +#else + // On non-Windows platforms, define fopen_s as a macro for fopen. + #define fopen_s(pFile, filename, mode) ((*(pFile) = fopen((filename), (mode))) == NULL) +#endif const char *Application::WINDOW_TITLE = "Raylib + AngelScript"; const char *Application::SCRIPT_FILE = "scripts/test.as";