diff --git a/Quake/sys_sdl.c b/Quake/sys_sdl.c index 36ae5eba..376bcfe8 100644 --- a/Quake/sys_sdl.c +++ b/Quake/sys_sdl.c @@ -20,9 +20,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "quakedef.h" +#include +#ifdef _WIN32 +#include +#include +#else +#include +#endif #include "errno.h" +#include "quakedef.h" + #define CONSOLE_ERROR_TIMEOUT 60.0 /* # of seconds to wait on Sys_Error running */ qboolean isDedicated; static qboolean sc_return_on_enter = false; @@ -131,6 +139,13 @@ int Sys_FileTime (char *path) void Sys_mkdir (char *path) { +#ifdef _WIN32 + int rc = _mkdir (path); +#else + int rc = mkdir (path, 0777); +#endif + if (rc != 0 && errno != EEXIST) + Sys_Error("Unable to create directory %s", path); }