From 84be8e3b3ba9af85e494098603c66252f8fccc6f Mon Sep 17 00:00:00 2001
From: Markus Himmel <markus@himmel-villmar.de>
Date: Wed, 14 Jan 2015 19:36:34 +0000
Subject: Move config to LGames folder in user settings


diff --git a/lpairs/cfg.c b/lpairs/cfg.c
index 301878a..a786e39 100644
--- a/lpairs/cfg.c
+++ b/lpairs/cfg.c
@@ -15,6 +15,11 @@
  *                                                                         *
  ***************************************************************************/
 
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#include <fs_info.h>
+#endif
+
 #include <SDL/SDL.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -32,10 +37,18 @@ Cfg cfg;
 */
 void C_StPth(char *p)
 {
+    size_t length;
     memset( c_pth, 0, sizeof( c_pth ) );
     if (p[0] == '~') {
+#ifdef __HAIKU__
+        find_directory(B_USER_SETTINGS_DIRECTORY, dev_for_path("/boot"), false,
+            c_pth, sizeof(c_pth) - 1);
+        length = strlen(c_pth);
+        snprintf(c_pth+length, sizeof(c_pth)-(1+length), "/LGames%s", p+1);
+#else
         snprintf(c_pth, sizeof(c_pth)-1, "%s%s",
             home_dir, p+1);
+#endif
     }
     else
         strncpy(c_pth, p, sizeof(c_pth)-1);
-- 
2.21.0


From db68fe85f9006e1872df2d64adbabf15950173be Mon Sep 17 00:00:00 2001
From: Markus Himmel <markus@himmel-villmar.de>
Date: Wed, 14 Jan 2015 19:19:28 +0000
Subject: Don't use subfolder games in $dataDir


diff --git a/configure.in b/configure.in
index f412594..f6cb17d 100644
--- a/configure.in
+++ b/configure.in
@@ -32,7 +32,7 @@ localedir=$datadir/locale
 locdir_flag="-DLOCALEDIR=\\\"$localedir\\\""
 
 dnl installation path
-inst_dir=$datadir/games/lpairs
+inst_dir=$datadir/lpairs
 inst_flag="-DSRC_DIR=\\\"$inst_dir/\\\""
 
 AC_ARG_ENABLE( install,
-- 
2.21.0


From 0ca3eb5832a49036f72ec14a12dc16fc22828647 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 20 Apr 2019 09:58:05 +0200
Subject: gcc2 doesn't like -Wno-unused-result


diff --git a/configure.in b/configure.in
index f6cb17d..61a432d 100644
--- a/configure.in
+++ b/configure.in
@@ -17,7 +17,7 @@ AC_CHECK_LIB(m, main,, AC_MSG_ERROR(lib math is needed))
 
 dnl check SDL version
 AM_PATH_SDL(1.0.0,, AC_MSG_ERROR(lib SDL is needed))
-CFLAGS="$CFLAGS $SDL_CFLAGS -Wno-unused-result"
+CFLAGS="$CFLAGS $SDL_CFLAGS"
 LIBS="$LIBS $SDL_LIBS"
 AM_PATH_SDL(1.1.5, CFLAGS="$CFLAGS -DSDL_1_1_5",)
 
-- 
2.21.0

