Skip to content

Commit 9935921

Browse files
authored
Scrap Haiku-specific code, unneeded (diasurgical#7931)
1 parent 5226d55 commit 9935921

1 file changed

Lines changed: 1 addition & 26 deletions

File tree

Source/utils/paths.cpp

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
#include "utils/log.hpp"
1212
#include "utils/sdl_ptrs.h"
1313

14-
#ifdef __HAIKU__
15-
#include <FindDirectory.h>
16-
#include <dirent.h>
17-
#include <fs_info.h>
18-
#endif
19-
2014
#ifdef __IPHONEOS__
2115
#include "platform/ios/ios_paths.h"
2216
#endif
@@ -124,26 +118,7 @@ const std::string &ConfigPath()
124118
const std::string &AssetsPath()
125119
{
126120
if (!assetsPath) {
127-
#if defined(__HAIKU__)
128-
// Look in system first (system-wide install)
129-
char buffer[B_PATH_NAME_LENGTH + 10];
130-
find_directory(B_SYSTEM_DATA_DIRECTORY, dev_for_path("/boot"), false, buffer, B_PATH_NAME_LENGTH);
131-
strcat(buffer, "/devilutionx/");
132-
if (opendir(buffer)) {
133-
assetsPath.emplace(strdup(buffer));
134-
} else {
135-
// Then look in user data (home-data install)
136-
char homedata[B_PATH_NAME_LENGTH + 10];
137-
find_directory(B_USER_DATA_DIRECTORY, dev_for_path("/boot"), false, homedata, B_PATH_NAME_LENGTH);
138-
strcat(homedata, "/devilutionx/");
139-
if (opendir(homedata)) {
140-
assetsPath.emplace(strdup(homedata));
141-
} else {
142-
// If that fails just fall back to the binary's dir (compiled raw & other misc. cases)
143-
assetsPath.emplace(FromSDL(SDL_GetBasePath()) + ("assets" DIRECTORY_SEPARATOR_STR));
144-
}
145-
}
146-
#elif __EMSCRIPTEN__
121+
#if __EMSCRIPTEN__
147122
assetsPath.emplace("assets/");
148123
#elif defined(NXDK)
149124
assetsPath.emplace("D:\\assets\\");

0 commit comments

Comments
 (0)