summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeWad.cpp
AgeCommit message (Collapse)Author
2018-10-12DiscIO: Rename RegionSwitch/CountrySwitchJosJuice
Callers don't need to know that these functions are implemented with a switch statement.
2018-10-08DiscIO: Move the Korean GC mess out of VolumeGCJosJuice
2018-05-20Reimplement custom PNG banners in game listJosJuice
Fixes https://bugs.dolphin-emu.org/issues/10938 and makes PNG banners available in DolphinQt2 for the first time.
2018-03-31DiscIO: Don't use all uppercase for enum valuesJosJuice
Also removing some prefixes that we don't need now that we're using enum classes instead of plain enums.
2018-03-14Assert: Uppercase assertion macrosLioncash
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).
2017-11-03Avoid UB when reading Wii volume namesJosJuice
2017-11-03Add WiiSaveBanner classJosJuice
This class is similar to the BannerLoaderWii class that was removed in ee694e32.
2017-09-15DiscIO: Use Common::Lazy for loading filesystemsJosJuice
This simplifies FileMonitor a lot and also lets us clean up FilesystemPanel.
2017-06-06DiscIO: Remove C/I/S prefixes from class namesJosJuice
These prefixes were inconsistent with the rest of Dolphin. I'm also renaming VolumeWiiCrypted to VolumeWii because of 1113b13.
2017-06-05DiscIO: Use std::optional in Volume and BlobJosJuice
2017-06-03DiscIO: Use std::optional for GetTitleID instead of pointerLéo Lam
This makes the interface slightly cleaner and a bit more consistent with the other getters. Still not fully the same, since the others don't really handle failures with std::optional; but at least the value is returned by value now, as opposed to having the function take a pointer to a u64.
2017-05-26Check TMD sizes using the actual constantLéo Lam
0x49e4 is the actual maximum TMD size (which is checked against in ES). IsValidTMDSize is added to ESFormats to avoid duplicating the constant.
2017-05-20VolumeWiiCrypted: Cache TMDs and ticketsJosJuice
2017-05-19Replace some usages of IVolume::ReadSwapped with IBlobReader::ReadSwappedJosJuice
Skips needing to specify PARTITION_NONE.
2017-05-16VolumeWiiCrypted: Replace ChangePartition with a partition parameterJosJuice
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.
2017-03-20Merge pull request #5099 from JosJuice/wii-menu-stringsMatthew Parlane
Display nicer version strings for the Wii Menu
2017-03-20Merge pull request #5093 from JosJuice/six-char-game-idsMatthew Parlane
Use 6-char game IDs for NAND tiles (if they are printable)
2017-03-18Check whether WAD is a channel before reading namesLéo Lam
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).
2017-03-18Return a more meaningful type from GetSysMenuRegionJosJuice
2017-03-16Use 6-char game IDs for NAND tiles (if they are printable)JosJuice
5.0-2712 made ES's code for setting the game ID use the title ID converted to hex (except for disc titles) instead of using a 6-char game ID like before. Then, 5.0-2830 made us use that code even when loading game INIs. This breaks the expectations of both users and the game INIs we ship with. This commit makes Dolphin use 6-char game IDs for all titles (unless the 6-char ID would contain unprintable characters, which is the case with e.g. the Wii Menu). I'm also putting unprintability checks in VolumeWad for consistency.
2017-03-13Remove Blob nullptr checks from Volume codeJosJuice
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.
2017-03-09Volume: Use ReadSwapped moreJosJuice
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.
2017-02-26Use ESFormats for TMDsLéo Lam
We already have a TMDReader, so let's actually use it. And move ESFormats to IOS::ES, since it's definitely part of IOS. This adds a DiscIO dependency on Core which will be fixed in a follow-up PR.
2017-01-23VolumeWad: Implement GetTMD()Léo Lam
This allows getting useful info like the required IOS version for WADs (for showing it in the UI, for example).
2017-01-23VolumeWad: Remove useless else after returnLéo Lam
2017-01-23VolumeWad: Clean up variable namingLéo Lam
2017-01-23VolumeWad: In-class initialise member variablesLéo Lam
2017-01-02DiscIO: Add GetRegion function and Region enumJosJuice
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.
2016-12-06Common: Add alignment headerLéo Lam
Gets rid of duplicated alignment code.
2016-10-29DiscIO/SConfig: Rename GetUniqueID to GetGameIDJosJuice
We call this "game ID" everywhere else, and it's not actually completely unique.
2016-07-13Move DiscIO enums to a new fileJosJuice
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.
2016-06-25Undo some comment formatting changes from b5104a7JosJuice
2016-06-26GCVolume: supports reading all opening.bnr informationRukai
DQT2: Game properties dialog contains info tab giving information about the selected iso.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-12-03Don't read from volume when reloading Wii bannersJosJuice
Should make loading cached Wii games that lack banners slightly faster.
2015-10-03Merge pull request #3102 from rohit-n/build-pchLioncash
Fix building with PCH disabled.
2015-09-28Fix building with PCH disabled.Rohit Nirmal
2015-09-27DiscIO: Add a way to get blob typeJosJuice
2015-09-27Merge pull request #3092 from JosJuice/compressed-blobsflacs
Display all compressed formats in blue in GUI
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-09-26Display all compressed formats in blue in GUIJosJuice
In the past, only GCZ was shown as compressed, not CISO and WBFS.
2015-09-22DiscIO: Do swapping in GetTitleID implementationsLioncash
Gets rid of external swaps at every usage.
2015-08-31VolumeCreator: Use a unique_ptr in CreateVolumeFromFilenameLioncash
2015-06-18Volume: Use DecodeString moreJosJuice
DecodeString handles the case where there is no trailing null byte, so using it lets the code be a bit simpler.
2015-06-08Volume: Add prefer_long parameter to GetNamesJosJuice
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.
2015-06-04Volume: Return volume type as an enumJosJuice
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.
2015-05-29Volume: Use more appropriate types for some returned valuesJosJuice
Disc number is changed from bool to u8, and revision is changed from int to u16 (WADs can use all 16 bits, but discs can only use 8 bits).
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-03Read opening.bnr to get names from Wii discsJosJuice
This makes Dolphin display the same names as the Disc Channel.