ES.cpp was becoming pretty huge. This commit splits the ES code into
several files:
* Main ES (launch, UID, current title directory and title ID, etc.)
* Device identity and encryption (ID and cert, keys, encrypt/decrypt)
* Title management (imports, exports, deletions)
* Title contents (open/close/read/seek)
* Title information (titles, stored contents, TMDs)
* Views (for tickets and TMDs)
This prevents truncation when assigning to this member in the
constructor. This isn't size-critical code, so opting for the more
straightforward assignment is fine here.
PR #3582 removed VolumeIsValid, then PR #3582 added a call
to VolumeIsValid, then both PRs were merged without either
of them being rebased on top of the other.
There's no point in creating a volume without a blob,
since essentially all the functionality of a volume
requires a blob to be used.
Also, VolumeCreator doesn't support creating volumes
without blobs (it can't even figure out the volume type
unless it gets a blob), so it's currently impossible
for a volume to be created without a blob.
Given none of these are used outside of the DSPEmitter class (nor does
it really make sense to allow them to be used outside of the class),
these should all be made private.
Using DiscIO's NAND content loader is the wrong way to get the ticket
for a title, because it checks whether the TMD is present and the
validity check fails if it isn't. This is not the correct behaviour:
we should just read the ticket from /ticket without caring about TMDs.
* IOS doesn't rely on the number of contents indicated in the TMD.
Instead, it checks whether the contents *do* exist on the NAND.
* Implement ES_GetTMDStoredContents (and the count ioctlv).
* Drop a hack in ES_GetStoredContents, which is unnecessary now that
we do it properly.
This is slightly safer than writing contents to /title directly.
We still cannot rename everything in one go atomically, but this allows
implementing AddTitleCancel very easily.
Also, this ensures that when a title import fails, no incomplete files
will be left in the title directory, which can mess up the system menu.
Regression introduced in e99cd57 / 4935: VideoBackends: Set the maximum
range when the depth range is oversized[1]. The NV_depth_buffer_float
extension is not part of OpenGL 3.0, and requiring it causes a hard
crash when it's not supported (e.g. macOS).
[1]: https://github.com/dolphin-emu/dolphin/pull/4935