mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 22:18:55 +02:00
86 lines
2.2 KiB
Plaintext
86 lines
2.2 KiB
Plaintext
From 9c38447f0d58b6ff39e7304ba9f63a82cbed5f92 Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Tue, 21 Jan 2014 22:40:24 +0100
|
|
Subject: Remove outdated include.
|
|
|
|
|
|
diff --git a/sources/F1Shttp.cpp b/sources/F1Shttp.cpp
|
|
index 59a213c..9cb48cc 100644
|
|
--- a/sources/F1Shttp.cpp
|
|
+++ b/sources/F1Shttp.cpp
|
|
@@ -3,7 +3,6 @@
|
|
#include "string.h"
|
|
|
|
#include <curl/curl.h>
|
|
-#include <curl/types.h>
|
|
#include <curl/easy.h>
|
|
|
|
#include "F1Shttp.h"
|
|
--
|
|
2.2.2
|
|
|
|
|
|
From 235e4f4d2a1be22b66534f343eb03fa722d159bd Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Fri, 13 Nov 2015 09:33:23 +0100
|
|
Subject: Fix settings directory
|
|
|
|
|
|
diff --git a/sources/filehandling.cpp b/sources/filehandling.cpp
|
|
index 899df3a..353a3b7 100644
|
|
--- a/sources/filehandling.cpp
|
|
+++ b/sources/filehandling.cpp
|
|
@@ -1,5 +1,9 @@
|
|
#include "filehandling.h"
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <FindDirectory.h>
|
|
+#endif
|
|
+
|
|
#ifndef _WIN32
|
|
// make (sub)directories including multiple subdirs
|
|
int mkdirp(const char *fqfn, mode_t mode)
|
|
@@ -51,7 +55,11 @@ FILE *f1open(const char *f, const char *m, const enum filetype t)
|
|
|
|
case USERDATA:
|
|
// userdata is put in $HOME/.GAMENAME/
|
|
- snprintf(fname, STRLEN - 1, "%s/.%s/%s", getenv("HOME"), GAMENAME, f);
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, fname, STRLEN);
|
|
+ strcat(fname, "/");
|
|
+ strcat(fname, GAMENAME);
|
|
+ strcat(fname, "/");
|
|
+ strcat(fname, f);
|
|
// create subdirs if they don't exist
|
|
mkdirp(fname, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
|
|
// open file
|
|
diff --git a/sources/state_replaymanager.cpp b/sources/state_replaymanager.cpp
|
|
index 4aa1c99..b1a9f89 100644
|
|
--- a/sources/state_replaymanager.cpp
|
|
+++ b/sources/state_replaymanager.cpp
|
|
@@ -4,6 +4,10 @@
|
|
#include "dirent.h"
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <FindDirectory.h>
|
|
+#endif
|
|
+
|
|
#include "stdio.h"
|
|
#include "math.h"
|
|
#include "stdlib.h"
|
|
@@ -94,7 +98,10 @@ int F1SpiritApp::replaymanager_cycle(KEYBOARDSTATE *k)
|
|
|
|
char dir[STRLEN];
|
|
|
|
- snprintf(dir, STRLEN - 1, "%s/.%s/replays", getenv("HOME"), GAMENAME);
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, dir, STRLEN);
|
|
+ strcat(dir, "/");
|
|
+ strcat(dir, GAMENAME);
|
|
+ strcat(dir, "/replays");
|
|
|
|
dp = opendir(dir);
|
|
|
|
--
|
|
2.2.2
|
|
|