Browse Source

Define Haiku assets path

pull/7498/head
Peppersawce 1 year ago committed by Anders Jenbo
parent
commit
da0418d654
  1. 11
      Source/utils/paths.cpp

11
Source/utils/paths.cpp

@ -7,6 +7,11 @@
#include "utils/log.hpp"
#include "utils/sdl_ptrs.h"
#ifdef __HAIKU__
#include <FindDirectory.h>
#include <fs_info.h>
#endif
#ifdef __IPHONEOS__
#include "platform/ios/ios_paths.h"
#endif
@ -114,6 +119,12 @@ const std::string &ConfigPath()
const std::string &AssetsPath()
{
if (!assetsPath) {
#if defined(__HAIKU__)
char buffer[B_PATH_NAME_LENGTH+10];
find_directory(B_SYSTEM_DATA_DIRECTORY, dev_for_path("/boot"), false, buffer, B_PATH_NAME_LENGTH);
strcat(buffer, "/devilutionx/");
assetsPath.emplace(strdup(buffer));
#endif
#if __EMSCRIPTEN__
assetsPath.emplace("assets/");
#elif defined(NXDK)

Loading…
Cancel
Save