Now launcher window shows on haiku os

although I cheated and used SDL to do it
This commit is contained in:
UnknownShadow200 2019-11-12 07:51:40 +11:00
parent 52ef223d98
commit be3c56d91a
3 changed files with 20 additions and 5 deletions

View File

@ -584,6 +584,19 @@ static void Logger_PrintRegisters(String* str, void* ctx) {
#error "Unknown CPU architecture"
#endif
}
#elif defined CC_BUILD_HAIKU
static void Logger_PrintRegisters(String* str, void* ctx) {
mcontext_t r = ((ucontext_t*)ctx)->uc_mcontext;
#if defined __i386__
#define REG_GET(reg, ign) &r.me##reg
Logger_Dump_X86()
#elif defined __x86_64__
#define REG_GET(reg, ign) &r.r##reg
Logger_Dump_X64()
#else
#error "Unknown CPU architecture"
#endif
}
#endif
static void Logger_DumpRegisters(void* ctx) {
String str; char strBuffer[768];

View File

@ -65,7 +65,7 @@ endif
ifeq ($(PLAT),haiku)
CFLAGS=-w -g -pipe
LDFLAGS=-g
LIBS=-lcurl -lm -lexecinfo -lopenal -lGL
LIBS=-lcurl -lm -lexecinfo -lopenal -lGL -lnetwork
endif
ifeq ($(OS),Windows_NT)

View File

@ -91,6 +91,8 @@ const cc_result ReturnCode_SocketWouldBlock = EWOULDBLOCK;
#include <mach-o/dyld.h>
#include <ApplicationServices/ApplicationServices.h>
#elif defined CC_BUILD_HAIKU
#define CC_BUILD_HAIKU
/* TODO: Use open instead of xdg-open */
#include <kernel/image.h>
#elif defined CC_BUILD_WEB
#include <emscripten.h>
@ -874,6 +876,10 @@ void Platform_LoadSysFonts(void) {
String_FromConst("/usr/pkg/lib/X11/fonts"),
String_FromConst("/usr/pkg/share/fonts")
};
#elif defined CC_BUILD_HAIKU
static const String dirs[1] = {
String_FromConst("/system/data/fonts")
};
#elif defined CC_BUILD_UNIX
static const String dirs[2] = {
String_FromConst("/usr/share/fonts"),
@ -884,10 +890,6 @@ 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);