diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/file_util.cpp | 12 | ||||
| -rw-r--r-- | src/common/file_util.h | 2 | ||||
| -rw-r--r-- | src/common/logging/backend.cpp | 1 | ||||
| -rw-r--r-- | src/common/logging/log.h | 1 |
4 files changed, 16 insertions, 0 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index b8dd92b65..89004c3c0 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -736,6 +736,18 @@ const std::string& GetUserPath(UserPath path, const std::string& new_path) { | |||
| 736 | return paths[path]; | 736 | return paths[path]; |
| 737 | } | 737 | } |
| 738 | 738 | ||
| 739 | std::string GetHactoolConfigurationPath() { | ||
| 740 | #ifdef _WIN32 | ||
| 741 | char path[MAX_PATH]; | ||
| 742 | if (SHGetFolderPathA(NULL, CSIDL_PROFILE, NULL, 0, path) != S_OK) | ||
| 743 | return ""; | ||
| 744 | std::string local_path = Common::StringFromFixedZeroTerminatedBuffer(path, MAX_PATH); | ||
| 745 | return local_path + "\\.switch"; | ||
| 746 | #else | ||
| 747 | return GetHomeDirectory() + "/.switch"; | ||
| 748 | #endif | ||
| 749 | } | ||
| 750 | |||
| 739 | size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename) { | 751 | size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename) { |
| 740 | return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size()); | 752 | return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size()); |
| 741 | } | 753 | } |
diff --git a/src/common/file_util.h b/src/common/file_util.h index bc9272d89..d530d86c9 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h | |||
| @@ -125,6 +125,8 @@ bool SetCurrentDir(const std::string& directory); | |||
| 125 | // directory. To be used in "multi-user" mode (that is, installed). | 125 | // directory. To be used in "multi-user" mode (that is, installed). |
| 126 | const std::string& GetUserPath(UserPath path, const std::string& new_path = ""); | 126 | const std::string& GetUserPath(UserPath path, const std::string& new_path = ""); |
| 127 | 127 | ||
| 128 | std::string GetHactoolConfigurationPath(); | ||
| 129 | |||
| 128 | // Returns the path to where the sys file are | 130 | // Returns the path to where the sys file are |
| 129 | std::string GetSysDirectory(); | 131 | std::string GetSysDirectory(); |
| 130 | 132 | ||
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index d86c40d26..d7d2f9a20 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -212,6 +212,7 @@ void FileBackend::Write(const Entry& entry) { | |||
| 212 | CLS(Input) \ | 212 | CLS(Input) \ |
| 213 | CLS(Network) \ | 213 | CLS(Network) \ |
| 214 | CLS(Loader) \ | 214 | CLS(Loader) \ |
| 215 | CLS(Crypto) \ | ||
| 215 | CLS(WebService) | 216 | CLS(WebService) |
| 216 | 217 | ||
| 217 | // GetClassName is a macro defined by Windows.h, grrr... | 218 | // GetClassName is a macro defined by Windows.h, grrr... |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 140cd8e47..5a580b004 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -97,6 +97,7 @@ enum class Class : ClassType { | |||
| 97 | Audio_DSP, ///< The HLE implementation of the DSP | 97 | Audio_DSP, ///< The HLE implementation of the DSP |
| 98 | Audio_Sink, ///< Emulator audio output backend | 98 | Audio_Sink, ///< Emulator audio output backend |
| 99 | Loader, ///< ROM loader | 99 | Loader, ///< ROM loader |
| 100 | Crypto, ///< Cryptographic engine/functions | ||
| 100 | Input, ///< Input emulation | 101 | Input, ///< Input emulation |
| 101 | Network, ///< Network emulation | 102 | Network, ///< Network emulation |
| 102 | WebService, ///< Interface to yuzu Web Services | 103 | WebService, ///< Interface to yuzu Web Services |