summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-12-07 02:27:50 +0100
committerZach Hilman <zachhilman@gmail.com>2018-12-27 06:16:55 +0100
commit0756f29a2c99070a6c676b39d797015d140ad7ac (patch)
treef7dc8a039fac35fe595ad410ed8ecfec83ed0b97
parentcontrol_metadata: Update NACP fields with latest Switchbrew data (diff)
downloadyuzu-0756f29a2c99070a6c676b39d797015d140ad7ac.tar
yuzu-0756f29a2c99070a6c676b39d797015d140ad7ac.tar.gz
yuzu-0756f29a2c99070a6c676b39d797015d140ad7ac.tar.bz2
yuzu-0756f29a2c99070a6c676b39d797015d140ad7ac.tar.lz
yuzu-0756f29a2c99070a6c676b39d797015d140ad7ac.tar.xz
yuzu-0756f29a2c99070a6c676b39d797015d140ad7ac.tar.zst
yuzu-0756f29a2c99070a6c676b39d797015d140ad7ac.zip
-rw-r--r--src/core/loader/loader.h10
-rw-r--r--src/core/loader/nsp.cpp4
-rw-r--r--src/core/loader/nsp.h2
-rw-r--r--src/core/loader/xci.cpp5
-rw-r--r--src/core/loader/xci.h2
5 files changed, 14 insertions, 9 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index 0838e303b..cfd67adc0 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -15,6 +15,10 @@
#include "core/file_sys/control_metadata.h"
#include "core/file_sys/vfs.h"
+namespace FileSys {
+class NACP;
+} // namespace FileSys
+
namespace Kernel {
struct AddressMapping;
class Process;
@@ -245,11 +249,11 @@ public:
}
/**
- * Get the developer of the application
- * @param developer Reference to store the application developer into
+ * Get the control data (CNMT) of the application
+ * @param control Reference to store the application control data into
* @return ResultStatus result of function
*/
- virtual ResultStatus ReadDeveloper(std::string& developer) {
+ virtual ResultStatus ReadControlData(FileSys::NACP& control) {
return ResultStatus::ErrorNotImplemented;
}
diff --git a/src/core/loader/nsp.cpp b/src/core/loader/nsp.cpp
index b4ab88ae8..4d4b44571 100644
--- a/src/core/loader/nsp.cpp
+++ b/src/core/loader/nsp.cpp
@@ -152,10 +152,10 @@ ResultStatus AppLoader_NSP::ReadTitle(std::string& title) {
return ResultStatus::Success;
}
-ResultStatus AppLoader_NSP::ReadDeveloper(std::string& developer) {
+ResultStatus AppLoader_NSP::ReadControlData(FileSys::NACP& nacp) {
if (nacp_file == nullptr)
return ResultStatus::ErrorNoControl;
- developer = nacp_file->GetDeveloperName();
+ nacp = *nacp_file;
return ResultStatus::Success;
}
} // namespace Loader
diff --git a/src/core/loader/nsp.h b/src/core/loader/nsp.h
index 2b1e0719b..32eb0193d 100644
--- a/src/core/loader/nsp.h
+++ b/src/core/loader/nsp.h
@@ -43,7 +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;
+ ResultStatus ReadControlData(FileSys::NACP& nacp) override;
private:
std::unique_ptr<FileSys::NSP> nsp;
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp
index bd5a83b49..e67e43c69 100644
--- a/src/core/loader/xci.cpp
+++ b/src/core/loader/xci.cpp
@@ -121,10 +121,11 @@ ResultStatus AppLoader_XCI::ReadTitle(std::string& title) {
return ResultStatus::Success;
}
-ResultStatus AppLoader_XCI::ReadDeveloper(std::string& developer) {
+ResultStatus AppLoader_XCI::ReadControlData(FileSys::NACP& control) {
if (nacp_file == nullptr)
return ResultStatus::ErrorNoControl;
- developer = nacp_file->GetDeveloperName();
+ control = *nacp_file;
return ResultStatus::Success;
}
+
} // namespace Loader
diff --git a/src/core/loader/xci.h b/src/core/loader/xci.h
index 15d1b1a23..9d3923f62 100644
--- a/src/core/loader/xci.h
+++ b/src/core/loader/xci.h
@@ -43,7 +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;
+ ResultStatus ReadControlData(FileSys::NACP& control) override;
private:
std::unique_ptr<FileSys::XCI> xci;