summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeDirectory.cpp
AgeCommit message (Collapse)Author
2017-03-13FileMonitor redesignJosJuice
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.
2017-01-25VolumeDirectory: Use case-insensitive comparison when sortingJosJuice
This fixes a regression from 5.0-1556, but I don't know why the regression occurred or why this fixes it. (Many games failed to fully boot - I tried Metroid Prime and Twilight Princess (both GC), and they never got to the title screen.)
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-26VolumeDirectory: Modernize variable namesJosJuice
2016-12-26VolumeDirectory: Don't use references inappropriatelyJosJuice
Integers should be passed as pointers when a function modifies them (to make it clear that they get modified).
2016-12-25Merge pull request #4558 from JosJuice/volumedirectory-fst-sortMat M
VolumeDirectory: Sort the FST
2016-12-25VolumeDirectory: Use a range-based for loop in ComputeNameSizeJosJuice
2016-12-25VolumeDirectory: Make m_totalNameSize a local variableJosJuice
After BuildFST finishes executing, it's never needed again.
2016-12-25VolumeDirectory: Sort the FSTJosJuice
We can't rely on the OS returning files and directories in a deterministic order, so we should sort them on our own if we want VolumeDirectory to work for movies and netplay.
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-15Merge pull request #3309 from JosJuice/reload-banner-without-volumeMarkus Wick
Don't read from volume when reloading Wii banners
2015-12-15Merge pull request #3265 from JosJuice/volumedirectory-simplificationsMarkus Wick
DiscIO: Small VolumeDirectory simplifications
2015-12-08DiscIO: Get rid of a few explicit deletesLioncash
2015-12-03Don't read from volume when reloading Wii bannersJosJuice
Should make loading cached Wii games that lack banners slightly faster.
2015-11-28DiscIO: Don't use PlainFileReader in VolumeDirectoryJosJuice
Blobs are not for regular file reading.
2015-11-17DiscIO: Small VolumeDirectory simplificationsJosJuice
2015-09-29Merge pull request #3097 from JosJuice/blob-typeflacs
Fix blob type detection for game right-click menu
2015-09-27DiscIO: Add a way to get blob typeJosJuice
2015-09-28Merge pull request #2271 from revel8n/fixesScott Mansell
Fix for alignment of zero-length files within directory based virtual disk
2015-09-27Merge pull request #3092 from JosJuice/compressed-blobsflacs
Display all compressed formats in blue in GUI
2015-09-26- Fix for alignment of 0-length files when volume directory is created from ↵revel8n
directory on disk Updating constant value representation Explicitly state data type in std:max usage
2015-09-26Common: Move asserts to their own headerLioncash
2015-09-26Display all compressed formats in blue in GUIJosJuice
In the past, only GCZ was shown as compressed, not CISO and WBFS.
2015-08-10Fix reading Wii FST size (for real this time)JosJuice
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.
2015-06-28Use emplace() instead of insert() where applicable for maps.Lioncash
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-28Rewrite FileSearch and improve ScanDirectoryTree.comex
- FileSearch is now just one function, and it converts the original glob into a regex on all platforms rather than relying on native Windows pattern matching on there and a complete hack elsewhere. It now supports recursion out of the box rather than manually expanding into a full list of directories in multiple call sites. - This adds a GCC >= 4.9 dependency due to older versions having outright broken <regex>. MSVC is fine with it. - ScanDirectoryTree returns the parent entry rather than filling parts of it in via reference. The count is now stored in the entry like it was for subdirectories. - .glsl file search is now done with DoFileSearch. - IOCTLV_READ_DIR now uses ScanDirectoryTree directly and sorts the results after replacements for better determinism.
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-11Volume: Rename GetName to GetInternalNameJosJuice
This is intended to better separate it from GetNames and to clarify that this name originally wasn't meant to be shown to users. The ISOProperties GUI is also updated, mainly because labeling the long banner name "short name" was confusing.
2015-04-28Get rid of banner loaders and move their functionality to volumesJosJuice
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.
2015-04-23Return GetNames languages, to avoid hardcoded language lists in callersJosJuice
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.
2015-04-05Get rid of VolumeHandlerJosJuice
VolumeHandler is basically just a wrapper around a single IVolume object. This change moves that object to DVDInterface, moves the Read32 function to IVolume, and gets rid of the rest of VolumeHandler.
2015-02-28General FormattingStevoisiak
2015-02-26De-capitalized CountryCodeStevoisiak
2015-01-21Merge pull request #1895 from JosJuice/isvolumewiidiscRyan Houdek
Don't read from disk when checking volume type
2015-01-20Merge pull request #1777 from JosJuice/filemonitor-volumedirectoryskidau
Add FileMonitor support for VolumeDirectory
2015-01-17Don't read from disk when checking volume typeJosJuice
Should be faster than relying on the OS to cache the magic words. Also gets rid of the odd recursive call in VolumeDirectory.
2015-01-09Fix 4.0-4901 VolumeDirectory stack overflowJosJuice
I actually fixed this once, but then I broke it in a failed attempt to optimize. VolumeHandler::IsWii calls CVolumeDirectory::Read(0x18, 4, &MagicWord, false);
2014-12-28DiscIO: Replace "raw" functions with "decrypt" parametersJosJuice
This is intended to make decryption look less implicit in the code.
2014-12-27Add FileMonitor support for VolumeDirectoryJosJuice
2014-12-27Never decrypt data when using DI command 0xA8JosJuice
CleanRip relies on this when ripping Wii discs.
2014-12-04DiscIO: Remove some explicit deletesLioncash
2014-10-28VolumeDirectory: Pass std::string by reference for SetUniqueID/SetNameLioncash