What we actually care about is whether it's a GCZ file,
not whether it's compressed. (This commit doesn't change
the behavior, since the beginning of CompressSelection
discards items that aren't BlobType::GCZ or BlobType::PLAIN.)
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.
And related ARCodeAddEdit/PatchAddEdit.
Change ISOFile to use wxImage instead of wxBitmap since bitmaps require
a screen context and banner images have a fixed resolution.
Add a context menu entry in main game list to host a netplay game
based on saved settings.
Original commit:
commit 91aaa958e6
Author: Aestek <thib.gilles@gmail.com>
Date: Sun Jul 24 14:51:37 2016 +0200
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.
titles.txt is read into a map and passed to the GameListItem
constructor, making game list scanning a bit more efficient.
ISOPropreties's constructor is changed to take a GameListItem as an
argument instead of creating one on its own, because ISOPropreties
doesn't have the titles.txt map that the GameListItem constructor wants.
The custom title reading code is moved so that custom titles are
returned by GameListItem::GetName(). The comparison code is changed
to use GetName() instead of GetName(DiscIO::IVolume::ELanguage).
GetName(DiscIO::IVolume::ELanguage) must not return custom titles,
because netplay relies on it returning the same name for all players.
HBC uses files named icon.png for icons. This change makes Dolphin
support that file name, and also [executable file name].png
in case someone wants to have multiple files in one folder.
The HBC banner support is mainly intended for DOL and ELF files,
but it can also be used to override banners of disc images,
something that wasn't possible in the past.
There are currently issues with banner scaling not preserving
the aspect ratio and looking bad in general.
Games without banners were not cached before, because a banner could
become available at any time, making the cache outdated without it
becoming invalidated. Instead of not caching anything, this change makes
Dolphin check for a banner every time a cache that lacks a banner is read.
This is faster than reading all metadata, because reading a Wii banner
only reads from the game's save file, not the volume and its filesystem.
The cache revision is incremented, because otherwise banners will be
missing if a cache without a banner is created in the new version and
the user switches to an old version and creates a savefile.
ISOFile and GameFile were using IsWiiDisc() and IsWadFile() to set
an enum value. The volume might as well return an enum directly.
I increased the Qt CACHE_REVISION because m_platform now is saved as u32
instead of int, but increasing the wx CACHE_REVISION is not necessary.
Replaces them with forward declarations of used types, or removes them entirely if they aren't used at all. This also replaces certain Common headers with less inclusive ones (in terms of definitions they pull in).
Having some data available in banner loaders and some other data
data available in volumes gets messy, especially with GetNames(),
which is available in both but returns different results
depending on which one is used. This change drops support
for reading names and descriptions from Wii save data.
This makes the code cleaner and also leads to some user-visible changes:
The wx game properties will no longer let the user
select WAD languages that don't have any names.
The Qt game list will now display names using the languages
set in the configuration instead of always using
English for PAL GC games and Japanese for WADs.
If a WAD doesn't have a name in the user's preferred language,
English is now selected as a fallback before Japanese.
This is good hygiene, and also happens to be required to build Dolphin
using Clang modules.
(Under this setup, each header file becomes a module, and each #include
is automatically translated to a module import. Recursive includes
still leak through (by default), but modules are compiled independently,
and can't depend on defines or types having previously been set up. The
main reason to retrofit it onto Dolphin is compilation performance - no
more textual includes whatsoever, rather than putting a few blessed
common headers into a PCH. Unfortunately, I found multiple Clang bugs
while trying to build Dolphin this way, so it's not ready yet, but I can
start with this prerequisite.)