mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-17 17:20:07 +02:00
69 lines
1.6 KiB
Plaintext
69 lines
1.6 KiB
Plaintext
From 82fd9718e1b3faf8f1d018b5c584c016efc36ff5 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
|
Date: Sat, 16 Sep 2017 10:09:57 +0200
|
|
Subject: Haiku patches
|
|
|
|
|
|
diff --git a/NXEngine.pro b/NXEngine.pro
|
|
index 23e23e4..54069c4 100644
|
|
--- a/NXEngine.pro
|
|
+++ b/NXEngine.pro
|
|
@@ -55,6 +55,8 @@ win32-g++ | linux-g++ | linux-g++-64 {
|
|
}
|
|
} linux-arm-gnueabi-g++ {
|
|
DEFINES += _320X240 _MOTOMAGX _SDL_MIXER
|
|
+} haiku {
|
|
+ DEFINES += _BSD_SOURCE
|
|
}
|
|
|
|
# Debug
|
|
@@ -93,6 +95,8 @@ win32-g++: {
|
|
} linux-arm-gnueabi-g++: {
|
|
INCLUDEPATH += /opt/toolchains/motomagx/arm-eabi2/include
|
|
INCLUDEPATH += /opt/toolchains/motomagx/arm-eabi2/include/SDL
|
|
+} haiku {
|
|
+ INCLUDEPATH += $$system(finddir B_SYSTEM_HEADERS_DIRECTORY)/SDL
|
|
}
|
|
|
|
# Librares
|
|
@@ -105,6 +109,8 @@ win32-g++ {
|
|
LIBS += -lSDLmain -lSDL -lSDL_ttf -lSDL_mixer
|
|
} linux-arm-gnueabi-g++ {
|
|
LIBS += $$system(sdl-config --libs) -lSDL_mixer -lSDL_ttf -lstdc++ -lm -lfreetype
|
|
+} haiku {
|
|
+ LIBS += $$system(sdl-config --libs) -lSDL_mixer -lSDL_ttf -lfreetype
|
|
}
|
|
|
|
# Win32 Icon
|
|
diff --git a/main.cpp b/main.cpp
|
|
index 026cbac..e76f0d0 100644
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -5,6 +5,10 @@
|
|
#include <SDL/SDL_mixer.h>
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <libgen.h>
|
|
+#endif
|
|
+
|
|
#include <stdarg.h>
|
|
#include <unistd.h>
|
|
#include "graphics/safemode.h"
|
|
@@ -27,6 +31,12 @@ int flipacceltime = 0;
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
+
|
|
+#ifdef __HAIKU__
|
|
+ // To make it able to start from Tracker
|
|
+ chdir(dirname(argv[0]));
|
|
+#endif
|
|
+
|
|
bool inhibit_loadfade = false;
|
|
bool error = false;
|
|
bool freshstart;
|
|
--
|
|
2.14.1
|
|
|