This file is pretty small now that it doesn't handle Wii
partitions anymore, so let's move its contents to Volume.cpp.
This is also more consistent with how blob creation works.
These cannot be booted, so it is bad UX to show them in the UI as if
they were regular titles, and yet have different behaviour for them.
And technically, there is no reason to allow them to be used to boot
in the first place.
Another reason they should not be shown is that Dolphin fails
spectacularly with WADs that have a valid boot content index, but are
not PPC titles (e.g. IOS WADs). The only reliable way to avoid this
is to check for the title type and only show channels, just like
the Wii System Menu.
This is unsafe, because the NAND should not be accessed and messed with
while it is being used. In fact, this kind of inappropriate behaviour
will not be possible when we get NAND image support.
And even if there were no safety issue, there is still no reason
a *getter* function should *do* something that has lasting effects
on user data. GetWiiFSPath() should *just* return a path!
Dolphin assumes that content 0 is opening.bnr, without checking
whether content 0 exists or if it is even supposed to be there (it's
only there for channels). This results in sometimes reading garbage.
This adds a check to only try to read names from content 0's header
if the title is a channel (channel, system channel or game channel).
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.
Using the XPM format for images has become a maintenance problem because
people don't know how to create them. This commit removes all XPM images
and all C files that contain PNG images. DolphinWX now uses the PNGs
in the Resources folder instead, just like DolphinQt and DolphinQt2 do.
fileplatform is moved so it's in the same place as the other platform
icons, and nobanner is moved just because it fits better in Resources.
Both of them were identical in all of Dolphin's themes.
* Makes HBC icons look better
* Fixes the issue with white dots appearing in downscaled images
* No longer subjectively better for GC banners according to comex
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.
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.
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.