Read opening.bnr to get names from Wii discs

This makes Dolphin display the same names as the Disc Channel.
This commit is contained in:
JosJuice
2015-04-10 23:18:41 +02:00
parent 272f9d3cbc
commit 2d5d5fa83e
4 changed files with 38 additions and 36 deletions

View File

@ -16,6 +16,7 @@
#include "Common/Logging/Log.h"
#include "DiscIO/Blob.h"
#include "DiscIO/FileMonitor.h"
#include "DiscIO/Filesystem.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeCreator.h"
#include "DiscIO/VolumeGC.h"
@ -203,10 +204,10 @@ std::string CVolumeWiiCrypted::GetName() const
std::map<IVolume::ELanguage, std::string> CVolumeWiiCrypted::GetNames() const
{
// TODO: Read opening.bnr
std::map<IVolume::ELanguage, std::string> names;
names[IVolume::ELanguage::LANGUAGE_UNKNOWN] = GetName();
return names;
std::unique_ptr<IFileSystem> file_system(CreateFileSystem(this));
std::vector<u8> opening_bnr(NAMES_TOTAL_BYTES);
opening_bnr.resize(file_system->ReadFile("opening.bnr", opening_bnr.data(), opening_bnr.size(), 0x5C));
return ReadWiiNames(opening_bnr);
}
u32 CVolumeWiiCrypted::GetFSTSize() const