Commit Graph

41 Commits

Author SHA1 Message Date
2b0cd16c8c Modernize std::none_of with ranges
In JitRegCache.cpp, the lambda predicate were replaced by a pointer to member function because ranges algorithms are able to 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.

In BoundingBox.cpp, the lambda predicate was returning the bool element unchanged, so `std::identity` was a better fit.
2024-12-15 19:54:17 -08:00
140252ffc0 Modernize std::any_of with ranges
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-15 19:54:16 -08:00
860e6cf5cb Modernize std::all_of with ranges
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-15 19:50:34 -08:00
214756dd18 Small wording changes for dump conversions 2024-08-16 18:39:23 +01:00
9d2f5245f4 i18n: Add comments and improve source strings
Most of these changes are to improve consistency in capitalization.
2024-07-28 14:38:20 +02:00
43e69d3e6a DolphinQt: Remove unnecessary qOverloads
qOverload is used to disambiguate pointers to overloaded functions, but
most of the usages in the code base were with non-overloaded functions.
2023-11-04 14:14:14 -07:00
e2fb8fab2f DolphinQt: Set window decorations for all top-level QWidgets. 2023-08-12 16:54:54 +02:00
49e897422f Use a success count instead of files count 2023-02-17 15:49:31 +01:00
cb42a03299 Check the input and destination paths before converting a game file onto itself
Before these changes you could tell Dolphin to convert a game file into the same format it is already in, leading to the FileDialog using the input path as the default destination path
An unsuspecting user could then click Save and Dolphin would try to convert the input file by writing the destination file on top of it... leading to an I/O error and the input file being entirely removed
2023-02-17 14:26:50 +01:00
deba9ce256 Added a way to check Block Size, Compression Method, and Compression Level flags to dolphin-tool
New dolphin-tool command: "header"
-b / --block_size
-c / --compression
-l / --compression_level

Informative RVZ/WIA header2 value "compression_level" is now a s32 instead of a u32, because negative compression is a thing.

Speaking of, it is now possible to use negative compression levels in dolphin-tool's convert command (not the GUI, though).
2022-03-19 17:13:28 -05:00
1aa8a4d46f DolphinTool: CLI utility interface and disc image tools 2021-12-03 15:40:19 -06:00
839b04014e Add wrapper function to disable hotkeys for QFileDialog
Previously, if you have "Hotkeys Require Window Focus" disabled, you could repeatedly use the "Open" hotkey, for example, to stack File Open windows over top of each other over and over.

This commit allows the hotkey manager to disable/enable on QFileDialog creation and destruction.
2021-10-09 22:43:56 -04:00
9bb85ca706 DolphinQt/Android: Add warning when converting NKit files
Yes, that's right! It's time to add even more NKit warnings,
because users still don't understand what NKit is or how it works!

More specifically, some users seem to be under the impression that
converting an NKit file to for instance RVZ using Dolphin's convert
feature will result in a normal RVZ file, when it in fact results in
an NKit RVZ file (since NKit is not a container format in the sense
that GCZ/WIA/RVZ/WBFS/CISO is, but rather a kind of trimmed ISO).
I can hardly blame users for not knowing this, because it's not
intuitive unless you know the technical details of how NKit works.
2021-10-02 11:09:36 +02:00
a65fcb5e5b ConvertDialog: Provide complete translation string for conversion
Gives the translator full control over the string's localization instead
of only one part of it.
2021-08-24 10:21:53 -04:00
e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
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.
2021-07-05 04:35:56 +02:00
ffbf3d71f0 Frontends: Migrate logs over to fmt 2020-11-25 21:19:08 -05:00
ca46028cde DiscIO: Use std::function for compression callback 2020-09-16 18:36:50 +02:00
f6ba54b74e Fix disc image conversion button not being clear #3
It wasn't clear whether the conversion would create a new file or replace the old one

Recreated #8952 directly from github
2020-07-22 23:00:20 +03:00
7a45ca0334 DolphinQt: Mark Zstandard as recommended for RVZ 2020-07-05 12:52:59 +02:00
5360ec80c8 DolphinQt: Fix scrubbing not being disabled for Datel discs
The code for disabling scrubbing for RVZ was overriding the code
for disabling scrubbing for Datel discs.
2020-07-04 15:06:05 +02:00
a2c51e027f DolphinQt: Fix a -Wshadow warning in ConvertDialog 2020-06-25 16:44:02 +02:00
94fd583147 DolphinQt: Fix a -Wswitch warning in ConvertDialog 2020-06-25 16:34:43 +02:00
8c205ef8f3 DolphinQt: Show version number for WIA/RVZ introduction 2020-06-21 21:16:10 +02:00
f2c38c0e67 RVZ: Make m_rvz a template parameter
Needed for the next commit.
2020-06-17 13:48:45 +02:00
2ec608f059 DolphinQt: Set block size to 128 KiB by default 2020-06-17 13:48:45 +02:00
4b74993374 RVZ: Store pseudorandom junk data efficiently 2020-06-17 13:48:42 +02:00
b06c50ed2e RVZ: Support chunk sizes between 32 KiB and 2 MiB
WIA doesn't support smaller than 2 MiB.
2020-06-17 13:48:15 +02:00
0d433baeb5 RVZ: Remove PURGE support
PURGE isn't especially useful, while requiring some annoying
special handling in the file format. If you want no compression,
use NONE. If you want fast compression, use Zstandard.
2020-06-17 13:48:15 +02:00
1f7c0b636f RVZ: Add Zstandard as a compression method 2020-06-17 13:48:12 +02:00
e2ae2b3b0b Add new file format RVZ based on WIA 2020-06-17 13:47:34 +02:00
e8b019ac29 WIA: Implement compression 2020-06-17 13:47:30 +02:00
115edea34e WIA: Add early support for WIA writing 2020-06-17 13:43:54 +02:00
b45f2c2ad3 DolphinQt: Disable convert dialog dropdowns when they have one option 2020-06-17 13:23:58 +02:00
ec3ea6c1df DolphinQt: Allow converting to same format
Mainly useful for WIA and RVZ, but also has some use for GCZ.
2020-06-17 12:44:16 +02:00
20a3119d7a DolphinQt: Make conversion error messages actually show up
I don't know why QErrorMessage doesn't work, but ModalMessageBox
works, so let's use ModalMessageBox.
2020-06-16 10:39:40 +02:00
2b25e1d6b9 DolphinQt: Don't show success message when converting missing file 2020-06-16 10:35:00 +02:00
99c8ce9d8d DolphinQt: Add info about formats in convert dialog 2020-04-24 15:11:20 +02:00
466b2d7202 DolphinQt: Make block size configurable in convert dialog 2020-04-24 15:11:20 +02:00
acd00723ad DolphinQt: Make scrubbing configurable in convert dialog 2020-04-24 15:11:20 +02:00
6ffcbcee70 DiscIO: Move scrubbing code out of ConvertToGCZ
This way, scrubbing can also be performed when converting
to other formats.
2020-04-24 15:11:20 +02:00
dae2c14f7f DolphinQt: Turn the compress/decompress action into a dialog 2020-04-24 15:10:35 +02:00