WIP haiku os support

This commit is contained in:
UnknownShadow200 2019-11-11 18:23:50 +11:00
parent 454bbe624f
commit 0787e82f2b
4 changed files with 17 additions and 1 deletions

View File

@ -202,6 +202,12 @@ typedef struct TextureRec_ { float U1, V1, U2, V2; } TextureRec;
#define CC_BUILD_X11
#define CC_BUILD_CURL
#define CC_BUILD_OPENAL
#elif defined __HAIKU__
#define CC_BUILD_HAIKU
#define CC_BUILD_POSIX
#define CC_BUILD_GL
#define CC_BUILD_CURL
#define CC_BUILD_OPENAL
#elif defined __EMSCRIPTEN__
#define CC_BUILD_WEB
#define CC_BUILD_POSIX

View File

@ -17,7 +17,7 @@
#define NOIME
#include <windows.h>
#include <imagehlp.h>
#elif defined CC_BUILD_OPENBSD
#elif defined CC_BUILD_OPENBSD || defined CC_BUILD_HAIKU
#include <signal.h>
/* OpenBSD doesn't provide sys/ucontext.h */
#elif defined CC_BUILD_LINUX || defined CC_BUILD_ANDROID

View File

@ -62,6 +62,12 @@ LDFLAGS=-L /usr/X11R7/lib -L /usr/pkg/lib
LIBS=-lcurl -lexecinfo -lopenal -lGL -lX11
endif
ifeq ($(PLAT),haiku)
CFLAGS=-w -g -pipe
LDFLAGS=-g
LIBS=-lcurl -lm -lexecinfo -lopenal -lGL
endif
ifeq ($(OS),Windows_NT)
DEL=del
endif

View File

@ -882,6 +882,10 @@ void Platform_LoadSysFonts(void) {
String_FromConst("/System/Library/Fonts"),
String_FromConst("/Library/Fonts")
};
#elif defined CC_BUILD_HAIKU
static const String dirs[1] = {
String_FromConst("/system/data/fonts")
};
#endif
for (i = 0; i < Array_Elems(dirs); i++) {
Directory_Enum(&dirs[i], NULL, FontDirCallback);