Use native APIs instead of env vars or finding Windows paths
Fixes #202 Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
c411946ccf
commit
56305eb037
3 changed files with 41 additions and 13 deletions
|
|
@ -155,7 +155,8 @@ struct Initializer
|
|||
#if defined(ARCH_MAC)
|
||||
asset::systemDir = "/Library/Application Support/Cardinal";
|
||||
#elif defined(ARCH_WIN)
|
||||
if (const char* const commonprogfiles = std::getenv("COMMONPROGRAMFILES"))
|
||||
const std::string commonprogfiles = getSpecialPath(kSpecialPathCommonProgramFiles);
|
||||
if (! commonprogfiles.empty())
|
||||
asset::systemDir = system::join(commonprogfiles, "Cardinal");
|
||||
#else
|
||||
asset::systemDir = CARDINAL_PLUGIN_PREFIX "/share/cardinal";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue