summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/FileSystemGCWii.h
AgeCommit message (Collapse)Author
2026-01-25Remove unused importsMartino Fontana
Yellow squiggly lines begone! Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes. If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed. The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports. Not everything is removed, but the cleanup should be substantial enough. Because this done on Linux, code that isn't used on it is mostly untouched. (Hopefully no open PR is depending on these imports...)
2025-04-19DiscIO: Make classes finalDr. Dystopia
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2020-12-03DiscIO: Fix recursive directory extractionJosJuice
https://bugs.dolphin-emu.org/issues/12331
2019-07-18DiscIO: Add functions CreateDisc and CreateWADJosJuice
...in addition to the existing function CreateVolume (renamed from CreateVolumeFromFilename). Lets code easily add constraints such as not letting the user select a WAD file when using the disc changing functionality.
2019-05-29DiscIO: Avoid copies when comparing FileSystemGCWii file namesJosJuice
2019-05-29DiscIO: Use std::string_view in FileSystem::FindFileInfoJosJuice
...and in the functions that call it.
2019-05-06Reformat repo to clang-format 7.0 rulesTechjar
2017-08-02DiscIO: Add a Volume::ReadSwappedAndShifted functionJosJuice
This is a fairly common operation, so let's make a utility function for it to cut down on code duplication.
2017-06-28DiscIO: Move parts of Filesystem to the new file DiscExtractorJosJuice
2017-06-14Filesystem: Modernize variable namesJosJuice
2017-06-14Filesystem: Do more validity checking in the constructorJosJuice
This makes it possible to catch errors earlier so that file systems simply fail to load instead of behaving oddly. It also makes it possible to check for errors that weren't checkable before, like the end of a directory being after the end of the parent directory.
2017-06-14Filesystem: Add a cache for finding file info by disc offsetJosJuice
FileMonitor calls this every time a read happens, and there's no code that only calls this a small number of times, so having a cache is worthwhile.
2017-06-14Filesystem: Replace GetFileList()JosJuice
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.
2017-06-13Filesystem: Store pointer to beginning of FST in file infosJosJuice
Needed for the next commit.
2017-06-13Filesystem: Initialize everything in constructorJosJuice
Not initializing until the filesystem is used is good when a filesystem is constructed and then never used, but nobody does that. This simplifies the code a little and lets all methods be const.
2017-06-13Filesystem: Read the entire FST in one goJosJuice
Instead of using lots of small scattered reads to read the FST, only one big read is used, which is more efficient. This also means that the FST only allocates memory once and stores all strings close to each other - good for the CPU cache. The file info objects use pointers to this FST memory of containing data themselves. Keeping around the big m_FileInfoVector containing objects with only pointers is a bit unnecessary, but that will be fixed soon.
2017-06-13Filesystem: Rewrite finding file info by path for performanceJosJuice
Instead of calling GetPathFromFSTOffset for every file info, FindFileInfo now only looks at names in directories that are included in the path. For the common case of searching for "opening.bnr", this means that only root-level files and directories have to be searched through.
2017-06-13Filesystem: Use file info in arguments instead of pathJosJuice
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.
2017-06-13Filesystem: Make FindFileInfo publicJosJuice
2017-06-13Filesystem: Replace file info's full path with nameJosJuice
Some callers (i.e. ISOProperties) don't want the full path, so giving them it is unnecessary. Those that do want it can use GetPathFromFSTOffset. Not storing full paths everywhere also saves a small bit of RAM and is necessary for a later commit. The code isn't especially pretty right now (callers need to use FST offsets...) but it'll become better later.
2017-06-13Filesystem: Replace FileInfo struct with interfaceJosJuice
GC/Wii filesystem internals shouldn't be exposed to other classes. This change isn't especially useful by itself, but it opens up the way for some neat stuff in the following commits.
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-05-16FileSystemGCWii: Replace m_Wii with m_offset_shiftJosJuice
I replaced m_OffsetShift with m_Wii in bb93336 to support the decrypt parameter for read functions. Doing that is no longer necessary, so m_offset_shift is now used like before.
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.
2016-09-18Filesystem: Return strings from GetFileName without the const qualifierLioncash
This is mostly pointless and can inhibit move construction
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-12-14DiscIO: Improve IVolume::Read32 error handlingJosJuice
Callers can now check whether reads fail, either by checking the return value or by setting the buffer to a known bad value and seeing if it stays untouched. I've added error checks to FileSystemGCWii and Boot_BS2Emu, but not to Boot since it doesn't check any of its other reads either.
2015-11-10DiscIO: drop unused stuffTillmann Karras
2015-10-17Remove DiscScrubber::GetDOLSize in favor of IFileSystem::GetBootDOLSizeJosJuice
IFileSystem::GetBootDOLSize acts the same. The only difference is that it reads the DOL offset on its own, but this change makes that optional.
2015-07-30Remove unnecessary virtual keywordsLioncash
2015-06-02Merge pull request #2338 from JosJuice/getfilelist-returncomex
Filesystem: Return file list reference instead of modifying argument
2015-05-25Merge pull request #2361 from JosJuice/filesystem-read32Ryan Houdek
Remove CFileSystemGCWii::Read32
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-03FileSystemGCWii: Allow reading files partiallyJosJuice
2015-05-03Remove CFileSystemGCWii::Read32JosJuice
A function that does the same thing was added to IVolume in 4cd00e3.
2015-04-28Filesystem: Return file list reference instead of modifying argumentJosJuice
2014-12-28DiscIO: Replace "raw" functions with "decrypt" parametersJosJuice
This is intended to make decryption look less implicit in the code.
2014-03-16Simplify file tree building for the filesystem view.Lioncash
Technically this also simplifies on disc filename building in general.
2014-03-14Kill off some usages of c_str.Lioncash
Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-09clang-modernize -add-overrideTillmann Karras
2014-02-22Make DiscIO/ mostly IWYU clean (and fix errors in rest of the project ↵Pierre Bourdon
detected by this change).
2014-02-18Convert all includes to relative paths.Lioncash
2014-02-10Replace all include guard ifdefs with "#pragma once"lioncash
2013-12-31Remove unnecessary Src/ foldersJasper St. Pierre