Game metadata extractor and some fixes

- App not closing on back pressed (AlberInputListener.java)
- Extract SMDH from rom.
- Extract metadata from SMDH
This commit is contained in:
Gabriel 2023-12-21 02:31:22 -04:00
parent 9ca7e88b6c
commit c0960dcccd
13 changed files with 370 additions and 16 deletions

View file

@ -6,6 +6,10 @@
#include "loader/ncch.hpp"
#include "memory.hpp"
#ifdef __ANDROID__
#include "jni_driver.hpp"
#endif
#include <iostream>
bool NCCH::loadFromHeader(Crypto::AESEngine &aesEngine, IOFile& file, const FSInfo &info) {
@ -255,6 +259,11 @@ bool NCCH::parseSMDH(const std::vector<u8>& smdh) {
return false;
}
#ifdef __ANDROID__
Pandroid::onSmdhLoaded(smdh);
#endif
// Bitmask showing which regions are allowed.
// https://www.3dbrew.org/wiki/SMDH#Region_Lockout
const u32 regionMasks = *(u32*)&smdh[0x2018];