citra_qt: Fix remaining build errors

This commit is contained in:
Reg Tiangha
2024-11-07 16:19:37 +00:00
committed by OpenSauce04
parent 9ca3c5699f
commit 29a6f0e059
14 changed files with 27 additions and 15 deletions

View File

@@ -53,7 +53,6 @@
#define SHADER_DIR "shaders"
#define STATES_DIR "states"
#define ICONS_DIR "icons"
#define PLAY_TIME_DIR "play_time"
// Filenames
// Files in the directory returned by GetUserPath(UserPath::LogDir)

View File

@@ -729,7 +729,7 @@ static const std::string& GetHomeDirectory() {
* @return The directory path
* @sa http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
*/
[[maybe_unused]] static const std::string GetUserDirectory(const std::string& envvar) {
[[maybe_unused]] const std::string GetUserDirectory(const std::string& envvar) {
const char* directory = getenv(envvar.c_str());
std::string user_dir;
@@ -827,7 +827,7 @@ void SetUserPath(const std::string& path) {
g_paths.emplace(UserPath::LoadDir, user_path + LOAD_DIR DIR_SEP);
g_paths.emplace(UserPath::StatesDir, user_path + STATES_DIR DIR_SEP);
g_paths.emplace(UserPath::IconsDir, user_path + ICONS_DIR DIR_SEP);
g_paths.emplace(UserPath::PlayTimeDir, user_path + PLAY_TIME_DIR DIR_SEP);
g_paths.emplace(UserPath::PlayTimeDir, user_path + LOG_DIR DIR_SEP);
g_default_paths = g_paths;
}

View File

@@ -10,6 +10,7 @@
#include <ios>
#include <limits>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <type_traits>
@@ -202,6 +203,8 @@ void UpdateUserPath(UserPath path, const std::string& filename);
#ifdef _WIN32
[[nodiscard]] const std::string& GetExeDirectory();
[[nodiscard]] std::string AppDataRoamingDirectory();
#else
[[nodiscard]] const std::string GetUserDirectory(const std::string& envvar);
#endif
std::size_t WriteStringToFile(bool text_file, const std::string& filename, std::string_view str);