From 84889d8391123d6128ceb2975581d6c33da0b7e7 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 25 Feb 2016 11:46:39 +0000 Subject: [PATCH] Windows build fixes. --- src/common.h | 1 + src/plat/win32/win32Init.c | 2 +- src/plat/win32/win32Init.h | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/common.h b/src/common.h index a613e83..ba13bb1 100644 --- a/src/common.h +++ b/src/common.h @@ -2,6 +2,7 @@ #include "stdio.h" #include "string.h" #include "math.h" +#include "ctype.h" #include "SDL2/SDL.h" diff --git a/src/plat/win32/win32Init.c b/src/plat/win32/win32Init.c index 0a8e281..c86ffc4 100644 --- a/src/plat/win32/win32Init.c +++ b/src/plat/win32/win32Init.c @@ -36,7 +36,7 @@ void createSaveFolder(void) SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "User home = %s", userHome); sprintf(dir, "%s/tbftss", userHome); - if (mkdir(dir, S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH) != 0 && errno != EEXIST) + if (mkdir(dir) != 0 && errno != EEXIST) { SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Failed to create save dir '%s'. Will save to current dir.", dir); return; diff --git a/src/plat/win32/win32Init.h b/src/plat/win32/win32Init.h index 022a771..8e12bef 100644 --- a/src/plat/win32/win32Init.h +++ b/src/plat/win32/win32Init.h @@ -17,3 +17,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +#include "../../common.h" + +extern App app;