Untested Haiku port?

This commit is contained in:
Ethan Lee
2020-01-13 23:31:14 -05:00
parent 17585c4602
commit 6a0ee21082
4 changed files with 198 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ int mkdir(char* path, int mode)
return CreateDirectoryW(utf16_path, NULL);
}
#define VNEEDS_MIGRATION (mkdirResult != 0)
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
#include <sys/stat.h>
#include <limits.h>
#define VNEEDS_MIGRATION (mkdirResult == 0)
@@ -209,7 +209,7 @@ void PLATFORM_migrateSaveData(char* output)
char oldLocation[MAX_PATH];
char newLocation[MAX_PATH];
char oldDirectory[MAX_PATH];
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
DIR *dir = NULL;
struct dirent *de = NULL;
DIR *subDir = NULL;
@@ -222,7 +222,7 @@ void PLATFORM_migrateSaveData(char* output)
return;
}
strcpy(oldDirectory, homeDir);
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
strcat(oldDirectory, "/.vvvvvv/");
#elif defined(__APPLE__)
strcat(oldDirectory, "/Documents/VVVVVV/");