mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Add OpenBSD support
This commit is contained in:
committed by
Ethan Lee
parent
66716fef37
commit
8aebead754
@@ -15,7 +15,7 @@
|
||||
#include <shlobj.h>
|
||||
#define mkdir(a, b) CreateDirectory(a, NULL)
|
||||
#define VNEEDS_MIGRATION (mkdirResult != 0)
|
||||
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
#include <sys/stat.h>
|
||||
#include <limits.h>
|
||||
#define VNEEDS_MIGRATION (mkdirResult == 0)
|
||||
@@ -159,7 +159,7 @@ std::vector<std::string> FILESYSTEM_getLevelDirFileNames()
|
||||
|
||||
void PLATFORM_getOSDirectory(char* output)
|
||||
{
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||
strcpy(output, PHYSFS_getPrefDir("distractionware", "VVVVVV"));
|
||||
#elif defined(_WIN32)
|
||||
SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, output);
|
||||
@@ -174,7 +174,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__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
DIR *dir = NULL;
|
||||
struct dirent *de = NULL;
|
||||
DIR *subDir = NULL;
|
||||
@@ -187,7 +187,7 @@ void PLATFORM_migrateSaveData(char* output)
|
||||
return;
|
||||
}
|
||||
strcpy(oldDirectory, homeDir);
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
strcat(oldDirectory, "/.vvvvvv/");
|
||||
#elif defined(__APPLE__)
|
||||
strcat(oldDirectory, "/Documents/VVVVVV/");
|
||||
|
||||
Reference in New Issue
Block a user