forked from moonpower/azahar-UWP
Fixed incorrect applications directory path while using Flatpak build
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
// Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project
|
||||
// Copyright Citra Emulator Project / Lime3DS Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
// Copyright Dolphin Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
|
||||
#include <array>
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
@@ -707,8 +710,8 @@ std::string AppDataRoamingDirectory() {
|
||||
/**
|
||||
* @return The user’s home directory on POSIX systems
|
||||
*/
|
||||
static const std::string& GetHomeDirectory() {
|
||||
static std::string home_path;
|
||||
const std::string GetHomeDirectory() {
|
||||
std::string home_path;
|
||||
if (home_path.empty()) {
|
||||
const char* envvar = getenv("HOME");
|
||||
if (envvar) {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
// Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project
|
||||
// Copyright Citra Emulator Project / Lime3DS Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
// Copyright Dolphin Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
@@ -204,6 +207,7 @@ void UpdateUserPath(UserPath path, const std::string& filename);
|
||||
[[nodiscard]] const std::string& GetExeDirectory();
|
||||
[[nodiscard]] std::string AppDataRoamingDirectory();
|
||||
#else
|
||||
[[nodiscard]] const std::string GetHomeDirectory();
|
||||
[[nodiscard]] const std::string GetUserDirectory(const std::string& envvar);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user