summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-28 20:01:56 +0100
committerZach Hilman <zachhilman@gmail.com>2018-12-03 23:21:25 +0100
commit5f0217592b9f27a32c236471c0a27e8ce345c926 (patch)
tree496180c2aab0b37cd15a1075ad0adfd8abb6eaf8
parentaoc_u: Obey disabled add-ons list when listing DLC (diff)
downloadyuzu-5f0217592b9f27a32c236471c0a27e8ce345c926.tar
yuzu-5f0217592b9f27a32c236471c0a27e8ce345c926.tar.gz
yuzu-5f0217592b9f27a32c236471c0a27e8ce345c926.tar.bz2
yuzu-5f0217592b9f27a32c236471c0a27e8ce345c926.tar.lz
yuzu-5f0217592b9f27a32c236471c0a27e8ce345c926.tar.xz
yuzu-5f0217592b9f27a32c236471c0a27e8ce345c926.tar.zst
yuzu-5f0217592b9f27a32c236471c0a27e8ce345c926.zip
-rw-r--r--src/core/loader/loader.h10
-rw-r--r--src/core/loader/nsp.cpp7
-rw-r--r--src/core/loader/nsp.h1
-rw-r--r--src/core/loader/xci.cpp7
-rw-r--r--src/core/loader/xci.h1
5 files changed, 26 insertions, 0 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index 7686634bf..c589b3bd1 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -12,6 +12,7 @@
#include <vector>
#include "common/common_types.h"
+#include "core/file_sys/control_metadata.h"
#include "core/file_sys/vfs.h"
namespace Kernel {
@@ -243,6 +244,15 @@ public:
return ResultStatus::ErrorNotImplemented;
}
+ /**
+ * Get the developer of the application
+ * @param developer Reference to store the application developer into
+ * @return ResultStatus result of function
+ */
+ virtual ResultStatus ReadDeveloper(std::string& developer) {
+ return ResultStatus::ErrorNotImplemented;
+ }
+
protected:
FileSys::VirtualFile file;
bool is_loaded = false;
diff --git a/src/core/loader/nsp.cpp b/src/core/loader/nsp.cpp
index 080d89904..b4ab88ae8 100644
--- a/src/core/loader/nsp.cpp
+++ b/src/core/loader/nsp.cpp
@@ -151,4 +151,11 @@ ResultStatus AppLoader_NSP::ReadTitle(std::string& title) {
title = nacp_file->GetApplicationName();
return ResultStatus::Success;
}
+
+ResultStatus AppLoader_NSP::ReadDeveloper(std::string& developer) {
+ if (nacp_file == nullptr)
+ return ResultStatus::ErrorNoControl;
+ developer = nacp_file->GetDeveloperName();
+ return ResultStatus::Success;
+}
} // namespace Loader
diff --git a/src/core/loader/nsp.h b/src/core/loader/nsp.h
index db91cd01e..842327a49 100644
--- a/src/core/loader/nsp.h
+++ b/src/core/loader/nsp.h
@@ -43,6 +43,7 @@ public:
ResultStatus ReadProgramId(u64& out_program_id) override;
ResultStatus ReadIcon(std::vector<u8>& buffer) override;
ResultStatus ReadTitle(std::string& title) override;
+ ResultStatus ReadDeveloper(std::string& developer) override;
private:
std::unique_ptr<FileSys::NSP> nsp;
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp
index 461607c95..bd5a83b49 100644
--- a/src/core/loader/xci.cpp
+++ b/src/core/loader/xci.cpp
@@ -120,4 +120,11 @@ ResultStatus AppLoader_XCI::ReadTitle(std::string& title) {
title = nacp_file->GetApplicationName();
return ResultStatus::Success;
}
+
+ResultStatus AppLoader_XCI::ReadDeveloper(std::string& developer) {
+ if (nacp_file == nullptr)
+ return ResultStatus::ErrorNoControl;
+ developer = nacp_file->GetDeveloperName();
+ return ResultStatus::Success;
+}
} // namespace Loader
diff --git a/src/core/loader/xci.h b/src/core/loader/xci.h
index 46f8dfc9e..f3b5a3936 100644
--- a/src/core/loader/xci.h
+++ b/src/core/loader/xci.h
@@ -43,6 +43,7 @@ public:
ResultStatus ReadProgramId(u64& out_program_id) override;
ResultStatus ReadIcon(std::vector<u8>& buffer) override;
ResultStatus ReadTitle(std::string& title) override;
+ ResultStatus ReadDeveloper(std::string& developer) override;
private:
std::unique_ptr<FileSys::XCI> xci;