From f7c952c34f0029c959d6217ebc0df50ed92cb1ba Mon Sep 17 00:00:00 2001 From: orbea Date: Mon, 28 Dec 2020 10:57:28 -0800 Subject: [PATCH] nall: Use the value of datadir to find the assets dir. --- nall/GNUmakefile | 1 + nall/path.hpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/nall/GNUmakefile b/nall/GNUmakefile index c3df28386..dcca2b6dd 100755 --- a/nall/GNUmakefile +++ b/nall/GNUmakefile @@ -243,4 +243,5 @@ else bindir ?= $(prefix)/bin datarootdir ?= $(prefix)/share datadir ?= $(datarootdir) + flags += -DDATADIR=\"$(datadir)\" endif diff --git a/nall/path.hpp b/nall/path.hpp index 3353817b4..a9f0b496c 100644 --- a/nall/path.hpp +++ b/nall/path.hpp @@ -137,6 +137,8 @@ inline auto sharedData() -> string { result.transform("\\", "/"); #elif defined(PLATFORM_MACOS) string result = "/Library/Application Support/"; + #elif defined(DATADIR) + string result = DATADIR; #else string result = "/usr/share/"; #endif