| Age | Commit message (Collapse) | Author |
|
Callers don't need to know that these functions are implemented
with a switch statement.
|
|
|
|
|
|
We can just use the relevant array to derive these sizes instead of hardcoding
them directly.
|
|
Drops prefixed underscores and normalizes names to follow our coding
style.
|
|
Makes the function names conform to our coding style.
|
|
Given this is within Common, it should be in the Common namespace
itself.
|
|
Fixes https://bugs.dolphin-emu.org/issues/10938
and makes PNG banners available in DolphinQt2 for the first time.
|
|
Also removing some prefixes that we don't need now that we're
using enum classes instead of plain enums.
|
|
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
|
|
Gets rid of a warning when compiling on macOS.
|
|
Without this, it fails to build with the following error in g++ 7.2.0:
> constructor required before non-static data member has been parsed
|
|
|
|
This simplifies FileMonitor a lot and also lets us
clean up FilesystemPanel.
|
|
|
|
According to http://scanlines16.com/en/blog-3/retro-gaming/game-cube/gamecube-korean-master-list/,
Korean GC releases use the following country codes:
- E or W for games in English
- K for games in Korean
- Unknown value for games in Japanese (my guess is that they might
have made the discs bit-for-bit identical to Japanese releases
because the regions of these games are already set to NTSC-J)
As far as I know, the GC has no Taiwanese releases, which is what
the W country code is used for on the Wii. But I could be wrong.
A small note: The country_byte == 'K' check in the code isn't
actually necessary as long as RegionSwitchGC returns NTSC_J
for 'K', but I thought it would be better to not rely on that.
|
|
The county code isn't 100% reliable for detecting the region.
For instance, some games released in Korea have the country
code E even though they're region-locked to NTSC-J consoles.
This commit makes the GC disc region detection match the Wii
disc region detection (apart from the region value being in
a different place on the disc).
|
|
|
|
Instead of expecting callers to know how the size of directory file infos
relates to which files are in which directories, filesystems now offer a
GetRoot() method, and file infos offer a way to get their children. As
a bonus, m_FileInfoVector no longer has to be created and kept around
in RAM. Only the file info objects that actually are used are created.
|
|
Some callers already have the file info, making the relatively slow
FindFileInfo calls unnecessary. Callers that didn't have the file info
will now need to call FindFileInfo on their own.
|
|
These prefixes were inconsistent with the rest of Dolphin.
I'm also renaming VolumeWiiCrypted to VolumeWii because of 1113b13.
|
|
|
|
Normal users don't care about it. In fact, people care so
little about it that the Wii implementation of it was broken
starting from when it was implemented (eb65601) to 7 years
later (e0a47c1), apparently without anyone reporting it.
|
|
This happened to work without any problems because the only way for a
file system to be invalid was to not have the right GC/Wii magic word
in the unencrypted area, and a volume could not be created without
having the right GC/Wii magic word there. Now that file systems read
the magic word from a partition instead, a fix is needed.
|
|
By removing mutable state in VolumeWiiCrypted, this change makes
partition-related code simpler. It also gets rid of other ugly things,
like ISOProperties's "over 9000" loop that creates a list of
partitions by trying possible combinations, and DiscScrubber's
volume swapping that recreates the entire volume when it needs to
change partition.
|
|
Fixes warnings:
```
../Source/Core/DiscIO/VolumeGC.cpp: In member function 'virtual u8 DiscIO::CVolumeGC::GetDiscNumber() const':
../Source/Core/DiscIO/VolumeGC.cpp:178:10: error: 'disc_number' may be used uninitialized in this function [-Werror=maybe-uninitialized]
return disc_number;
^
../Source/Core/DiscIO/VolumeWiiCrypted.cpp: In member function 'virtual u8 DiscIO::CVolumeWiiCrypted::GetDiscNumber() const':
../Source/Core/DiscIO/VolumeWiiCrypted.cpp:258:10: error: 'disc_number' may be used uninitialized in this function [-Werror=maybe-uninitialized]
return disc_number;
^
../Source/Core/DiscIO/VolumeWiiCrypted.cpp: In member function 'virtual IOS::ES::TMDReader DiscIO::CVolumeWiiCrypted::GetTMD() const':
../Source/Core/DiscIO/VolumeWiiCrypted.cpp:123:20: error: 'tmd_address' may be used uninitialized in this function [-Werror=maybe-uninitialized]
tmd_address <<= 2;
^
```
|
|
Advantages:
* Simpler code in general
* No extra volume objects created
* Now actually notices if the disc or partition gets
changed while the core is running
* No longer picks up on disc access done by the GUI
(it used to do so as long as the core was running)
* Gets rid of a Core dependency in DiscIO
There are two performance disadvantages:
* FileMonitor is now a bit slower when used with VolumeDirectory
because FileMonitor now always uses the FileSystemGCWii code
for finding filenames instead of VolumeDirectory finding the
filename on its own and directly hooking into FileMonitor.
But this isn't such a big deal, because it's happening on the
DVD thread, and my currently unmerged file system PR will make
FileSystemGCWii's file finding code about as fast as
VolumeDirectory's.
* FileMonitor's creation of the file system object is now
done on the CPU thread instead of the DVD thread, and
it will be done even if FileMonitor logging is disabled.
This will be fixed in the next commit.
|
|
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.
|
|
Most of the Volume code was written before this
convenience function was added. Let's use it more.
Also deleting m_pReader nullptr checks that are
unnecessary because of Read (which ReadSwapped calls)
already having a nullptr check.
|
|
Instead of needing different switch cases for
converting countries to regions in multiple places,
we now only need a single country-to-region switch case
(in DiscIO/Enums.cpp), and we get a nice Region type.
|
|
We call this "game ID" everywhere else, and it's not
actually completely unique.
|
|
VolumeGC: Set m_banner_loaded when banner loading fails
|
|
At first there weren't many enums in Volume.h, but the number has been
growing, and I'm planning to add one more for regions. To not make
Volume.h too large, and to avoid needing to include Volume.h in code
that doesn't use volume objects, I'm moving the enums to a new file.
I'm also turning them into enum classes while I'm at it.
|
|
If banner loading fails once, it will very likely fail again.
Setting m_banner_loaded to true when banner loading fails
prevents LoadBannerFile from wasting time if it's called again.
Banner loading requires loading the file system, which takes a
noticeable amount of time, so this matters.
|
|
DQT2: Game properties dialog contains info tab giving information about the selected iso.
|
|
|
|
VolumeGC: Get rid of banner pointer casts
|
|
Prefer reading the data into the reified struct instead.
|
|
|
|
Display all compressed formats in blue in GUI
|
|
|
|
In the past, only GCZ was shown as compressed, not CISO and WBFS.
|
|
Fix reading Wii FST size (for real this time)
|
|
|
|
Silences an uninitialized variable warning
|
|
|
|
04fcb72 fixed an issue with reading the Wii FST size, but I found a second
issue when working on PR #2820 - the size must be shifted left by 2.
DiscScrubber and Boot already do this correctly using separate code.
|
|
DecodeString handles the case where there is no trailing null byte,
so using it lets the code be a bit simpler.
|
|
GC games with long names store two variations of the name in
opening.bnr. This makes the shorter of those names available.
For volumes other than GC discs, prefer_long is ignored.
|
|
VolumeGC: Check that opening.bnr size matches type
|