mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Fix loading DLC using IOCTL_ES_OPENTITLECONTENT & /dev/es state save.
(Intertwined enough that's it's easier to do in one patch.) (1) /dev/es did not support state save, which could cause crashes and incorrect behavior after loading. (2) NANDContentLoader tried to read all of a title's contents into memory when it was first opened. Two issues: - If any contents were missing, it bailed out. However, with DLC, only some of the contents may be downloaded, as determined by the permission bits in the ticket. Instead, return an appropriate error when a content is accessed that doesn't exist on the filesystem (don't bother checking the permission bits though). - Everything was loaded into memory - even if it consisted of 3 GB of songs, which caused Dolphin to lag out for quite a while (and would fail on 32-bit). Instead, open content on demand.
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
#include "Blob.h"
|
||||
#include "Volume.h"
|
||||
#include "NandPaths.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
@ -26,6 +27,7 @@ struct SNANDContent
|
||||
u8 m_SHA1Hash[20];
|
||||
u8 m_Header[36]; //all of the above
|
||||
|
||||
std::string m_Filename;
|
||||
u8* m_pData;
|
||||
};
|
||||
|
||||
@ -95,8 +97,8 @@ public:
|
||||
|
||||
static CSharedContent& AccessInstance() { return m_Instance; }
|
||||
|
||||
std::string GetFilenameFromSHA1(u8* _pHash);
|
||||
std::string AddSharedContent(u8* _pHash);
|
||||
std::string GetFilenameFromSHA1(const u8* _pHash);
|
||||
std::string AddSharedContent(const u8* _pHash);
|
||||
void UpdateLocation();
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user