summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
AgeCommit message (Collapse)Author
2025-05-25Hide DirectoryBlob header.bin files from game listJosJuice
This is a continuation of 552b6da. That commit hid sys/boot.bin, but not disc/header.bin, which is only present for Wii games. Fixes https://bugs.dolphin-emu.org/issues/13810.
2025-05-16DiscIO: Make functions constantDr. Dystopia
2025-05-07Merge pull request #13542 from ↵Jordan Woyak
tygyh/DiscIO-Pass-parameters-by-constant-reference DiscIO: Pass parameters by constant reference
2025-05-01Merge pull request #13597 from JosJuice/hide-boot-binJMC47
Hide DirectoryBlob boot.bin files from game list
2025-04-26Hide DirectoryBlob boot.bin files from game listJosJuice
Extracted games contain a boot.bin file that contains the disc header. These boot.bin files are considered valid volumes by Dolphin, since Dolphin only checks the disc header to determine if something is a valid GC/Wii disc. Running them doesn't make any sense, though. boot.bin files used to not be scanned by Dolphin due to their file extension, but .bin was added to the list of file extensions to scan for in 494e2c0. To stop them from showing up in the game list, let's update the ShouldHideFromGameList mechanism.
2025-04-23linter: Apply clang-format 19.1 formattingJoshua Vandaële
find ./Source/ -name '*.cpp' -o -name '*.h' | xargs clang-format-19 -i
2025-04-22Merge pull request #13540 from tygyh/DiscIO-Remove-redundant-qualifiersJordan Woyak
DiscIO: Remove redundant qualifiers
2025-04-22DiscIO: Remove redundant qualifiersDr. Dystopia
2025-04-21Implement Triforce ID parsingZopolis4
2025-04-21Add Triforce platform and preliminary boot.id parsingZopolis4
2025-04-21Merge pull request #13537 from tygyh/DiscIO-Make-variables-constexprTilka
DiscIO: Make variables constexpr
2025-04-20Merge pull request #13538 from ↵Tilka
tygyh/DiscIO-Use-default-to-define-a-trivial-destructor DiscIO: Use `= default` to define a trivial destructor
2025-04-20Merge pull request #13541 from ↵Tilka
tygyh/DiscIO-Remove-redundant-zero-initializers-in-aggregate-initializations DiscIO: Remove redundant zero initializers in aggregate initializations
2025-04-20DiscIO: Pass parameters by constant referenceDr. Dystopia
2025-04-19DiscIO: Remove redundant zero initializers in aggregate initializationsDr. Dystopia
2025-04-19DiscIO: Use `= default` to define a trivial destructorDr. Dystopia
2025-04-19DiscIO: Make variables constexprDr. Dystopia
2025-04-19DiscIO: Make classes finalDr. Dystopia
2025-04-15DiscIO/Volume: Fix Partition struct comparison operatorsDr. Dystopia
2025-03-29Merge pull request #13221 from mitaclaw/nrvo-fails-1JMC47
GCC: Remedy NRVO Fails
2025-03-10GCC: Remedy NRVO Failsmitaclaw
Using the `-Wnrvo` flag introduced by GCC 14, I identified a few places where NRVO was clearly intended, but is fumbled.
2025-03-09Modernize `std::stable_sort` with ranges and projectionsmitaclaw
2025-03-09Modernize `std::sort` with ranges and projectionsmitaclaw
In PPCTables.cpp, the code is currently unused so I was unable to test it. In CustomPipeline.cpp, a pointer to member function cannot be used due to 16.4.5.2.1 of the C++ Standard regarding "addressable functions". https://eel.is/c++draft/namespace.std#6 In Fs.cpp and DirectoryBlob.cpp, these examples used projections in a previous iteration of this commit, but no longer do. Still, they remain in this commit because the PR they would actually belong to is already merged.
2025-03-09Simplify `std::find_if` with `std::ranges::find` and projectionsmitaclaw
In LabelMap.cpp, the code is currently unused so I was unable to test it. In WiiUtils.cpp, the magic value `1u` was replaced by the constant value `DiscIO::PARTITION_UPDATE`.
2025-01-19Fix build with minizip-ng 4.0.8Joshua Vandaële
2025-01-01Simplify `std::search` with `Common::ContainsSubrange`mitaclaw
2025-01-01Simplify `std::find` with `Common::Contains`mitaclaw
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp). The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
2024-12-26Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-ofJMC47
Ranges Algorithms Modernization - Of
2024-12-15Modernize `std::any_of` with rangesmitaclaw
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
2024-12-15Modernize `std::all_of` with rangesmitaclaw
In DITSpecification.cpp, MaterialAsset.cpp, and ShaderAsset.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In NetPlayClient.cpp, the non-trivial `NetPlay::Player` elements were being passed by value in `NetPlayClient::DoAllPlayersHaveGame()`. This has been fixed. In WIABlob.cpp, the second example's predicate was returning the `std::optional` by value instead of implicitly converting it to a bool. This has been fixed.
2024-12-15StringUtil: More Wrappers For <cctype>mitaclaw
`Common::IsLower(char)` was omitted as nothing needed it.
2024-10-17Modernize `std::search` with rangesmitaclaw
The new return value is `std::ranges::subrange`.
2024-10-15Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivialJosJuice
Ranges Algorithms Modernization - Trivial
2024-10-11DolphinQt: Restrict size of banner image in game properties info tab.Jordan Woyak
2024-10-11Merge pull request #13095 from mitaclaw/ranges-modernization-6-nTilka
Ranges Algorithms Modernization - N
2024-10-11Merge pull request #13117 from mitaclaw/ranges-modernization-9-trivial-findTilka
Ranges Algorithms Modernization - Find
2024-10-10C++20: Synthesize `operator!=` From `operator==`mitaclaw
The inequality operator is automatically generated by the compiler if `operator==` is defined.
2024-10-10Modernize `std::find_if` with rangesmitaclaw
In BTEmu.cpp, `std::mem_fn` was not necessary for the predicate to compile.
2024-10-10Modernize `std::binary_search` with rangesmitaclaw
In VolumeVerifier.cpp, constructing a `std::string_view` of the volume's GameID is unnecessary, as `std::`(`ranges::`)`binary_search` supports heterogeneous lookup. The usage in GameFile.cpp is a perfect example.
2024-10-10Modernize `std::sort` with rangesmitaclaw
2024-10-07Simplify `std::fill` with `std::fill_n`mitaclaw
2024-10-07Simplify `std::copy` with `std::copy_n`mitaclaw
+ a surprise `std::memcpy` in VolumeVerifier.cpp.
2024-09-28VolumeVerifier: Promote `DEBUG_ASSERT` to `static_assert`mitaclaw
This runtime assertion was added before `std::is_sorted` became constexpr in the codebase.
2024-09-08DiscIO: Fix a typo in an RVZPack commentJosJuice
2024-08-27RVZ: Fix undefined behaviour when copying 0 bytes to a null pointerFerdinand Bachmann
A vector of length 0 can have a null data pointer, which causes UB when passed to memcpy, so only copy when we actually have data to copy. This caused crashes in certain cases when compiling Dolphin with Clang and LTO enabled.
2024-08-20Remove redundant semicolonsDr. Dystopia
2024-07-21Use C++20 erase_if() instead of erase(remove_if()) (NFC)Tillmann Karras
2024-06-06Use a stub AchivementManager when USE_RETRO_ACHIEVEMENTS isn't definedJosJuice
This lets us reduce the number of USE_RETRO_ACHIEVEMENTS ifdefs in the code base, reducing visual clutter. In particular, needing an ifdef for each call to IsHardcodeModeActive was annoying to me. This also reduces the risk that someone writes code that accidentally fails to compile with USE_RETRO_ACHIEVEMENTS disabled. We could cut down on ifdefs even further by making HardcodeWarningWidget always exist, but that would result in non-trivial code ending up in the binary even with USE_RETRO_ACHIEVEMENTS disabled, so I'm leaving it out of this PR. It's not a lot of code though, so I might end up revisiting it at some point.
2024-05-26DiscIO: drop unused Volume::CheckContentIntegrity() overloadTillmann Karras
The offset-based overload hasn't been in use since f754a1a548f2e599e4cc2d1d799f2d21b520076f.
2024-05-02Disabled Hardcore Mode when Achievements disabledLillyJadeKatrin
Bugfix for hardcore-disabled items being disabled when hardcore was true but achievement integration was false, which should mean hardcore is effectively disabled. Now everything checks the IsHardcoreModeActive method in AchievementManager which processes the setting AND the game state to determine if hardcore mode is actually active.