-
-
Save anonymous/b26cb45536053b186cb6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/hle/service/fs_user.cpp b/src/core/hle/service/fs_user.cpp | |
index 0ff9570..0e83a18 100644 | |
--- a/src/core/hle/service/fs_user.cpp | |
+++ b/src/core/hle/service/fs_user.cpp | |
@@ -23,6 +23,23 @@ enum class LowPathType : u32 { | |
Wchar = 4 | |
}; | |
+u64 FS_Path::as_empty() { | |
+ return 0; | |
+} | |
+ | |
+u64 FS_Path::as_binary() { | |
+} | |
+ | |
+std::string FS_Path::as_str() { | |
+ auto data = reinterpret_cast<const char*>(Memory::GetPointer(pointer)); | |
+ return std::string(data, size - 1); | |
+} | |
+ | |
+std::u16string FS_Path::as_u16str() { | |
+ auto data = reinterpret_cast<const char16_t*>(Memory::GetPointer(pointer)); | |
+ return std::u16string(data, size/2 - 1); | |
+} | |
+ | |
bool GetStringFromCmdBuff(LowPathType type, std::string* string, const u32 pointer, const u32 size) { | |
switch (type) { | |
case LowPathType::Char: | |
diff --git a/src/core/hle/service/fs_user.h b/src/core/hle/service/fs_user.h | |
index 0053825..e9c1a1d 100644 | |
--- a/src/core/hle/service/fs_user.h | |
+++ b/src/core/hle/service/fs_user.h | |
@@ -11,6 +11,19 @@ | |
namespace FS_User { | |
+class FS_Path { | |
+ u32 pointer, size; | |
+ | |
+ FS_Path(u32 pointer, u32 size): | |
+ pointer(pointer), size(size) | |
+ { } | |
+ | |
+ u64 as_empty(); | |
+ u64 as_binary(); | |
+ std::string as_str(); | |
+ std::u16string as_u16str(); | |
+}; | |
+ | |
/// Interface to "fs:USER" service | |
class Interface : public Service::Interface { | |
public: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment