diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/settings.h | 1 | ||||
| -rw-r--r-- | src/common/string_util.cpp | 4 | ||||
| -rw-r--r-- | src/common/string_util.h | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/common/settings.h b/src/common/settings.h index 5b34169a8..e61d9cd7f 100644 --- a/src/common/settings.h +++ b/src/common/settings.h | |||
| @@ -606,6 +606,7 @@ struct Values { | |||
| 606 | BasicSetting<bool> dump_exefs{false, "dump_exefs"}; | 606 | BasicSetting<bool> dump_exefs{false, "dump_exefs"}; |
| 607 | BasicSetting<bool> dump_nso{false, "dump_nso"}; | 607 | BasicSetting<bool> dump_nso{false, "dump_nso"}; |
| 608 | BasicSetting<bool> dump_shaders{false, "dump_shaders"}; | 608 | BasicSetting<bool> dump_shaders{false, "dump_shaders"}; |
| 609 | BasicSetting<bool> dump_macros{false, "dump_macros"}; | ||
| 609 | BasicSetting<bool> enable_fs_access_log{false, "enable_fs_access_log"}; | 610 | BasicSetting<bool> enable_fs_access_log{false, "enable_fs_access_log"}; |
| 610 | BasicSetting<bool> reporting_services{false, "reporting_services"}; | 611 | BasicSetting<bool> reporting_services{false, "reporting_services"}; |
| 611 | BasicSetting<bool> quest_flag{false, "quest_flag"}; | 612 | BasicSetting<bool> quest_flag{false, "quest_flag"}; |
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 703aa5db8..7a495bc79 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -178,6 +178,10 @@ std::wstring UTF8ToUTF16W(const std::string& input) { | |||
| 178 | 178 | ||
| 179 | #endif | 179 | #endif |
| 180 | 180 | ||
| 181 | std::u16string U16StringFromBuffer(const u16* input, std::size_t length) { | ||
| 182 | return std::u16string(reinterpret_cast<const char16_t*>(input), length); | ||
| 183 | } | ||
| 184 | |||
| 181 | std::string StringFromFixedZeroTerminatedBuffer(std::string_view buffer, std::size_t max_len) { | 185 | std::string StringFromFixedZeroTerminatedBuffer(std::string_view buffer, std::size_t max_len) { |
| 182 | std::size_t len = 0; | 186 | std::size_t len = 0; |
| 183 | while (len < buffer.length() && len < max_len && buffer[len] != '\0') { | 187 | while (len < buffer.length() && len < max_len && buffer[len] != '\0') { |
diff --git a/src/common/string_util.h b/src/common/string_util.h index a33830aec..ce18a33cf 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h | |||
| @@ -44,6 +44,8 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _ | |||
| 44 | 44 | ||
| 45 | #endif | 45 | #endif |
| 46 | 46 | ||
| 47 | [[nodiscard]] std::u16string U16StringFromBuffer(const u16* input, std::size_t length); | ||
| 48 | |||
| 47 | /** | 49 | /** |
| 48 | * Compares the string defined by the range [`begin`, `end`) to the null-terminated C-string | 50 | * Compares the string defined by the range [`begin`, `end`) to the null-terminated C-string |
| 49 | * `other` for equality. | 51 | * `other` for equality. |