Commit graph

61 commits

Author SHA1 Message Date
Pokechu22
43e146a1d5 GameList: Convert file extensions to lowercase
This means that dol/elf files with upercase extensions (e.g. BOOT.DOL) are properly detected.
2022-01-16 17:00:16 -08:00
Pokechu22
6e5f4125e3 Use Common::ToLower and Common::ToUpper 2022-01-16 17:00:12 -08:00
Pokechu22
161c627466 Treewide: Remove unused inclusions of <cinttypes>
Most of these became unneeded when fmt was introduced.
2022-01-09 12:43:11 -08:00
Admiral H. Curtiss
2906889804
Core: Add a Maker field for GameModDescriptors. 2022-01-02 06:06:53 +01:00
Admiral H. Curtiss
418bb0b087
GameFile: Calculate a sensible sync hash for mod descriptors. 2021-12-12 21:26:09 +01:00
Admiral H. Curtiss
da161faff4
GameList: Show game mod descriptor .json files in game list. 2021-12-12 21:26:09 +01:00
Tillmann Karras
bd5c604718 GameFile: don't download covers for empty game IDs 2021-07-11 17:14:43 +01:00
Pierre Bourdon
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
Léo Lam
ddacbf83f6
Merge pull request #9461 from cbartondock/master
Working Game IDs for Elf/Dol files
2021-02-10 22:50:40 +01:00
cbartondock
83c127784b Working Game IDs for Elf/Dol files 2021-01-30 09:51:37 -05:00
Shawn Hoffman
84128d9532 rename Common/File to Common/IOFile 2021-01-27 14:29:48 -08:00
JosJuice
5e70dda4cc Android: Allow disabling cover downloading
In case someone wants to be very careful with how much bandwidth
they use or with what data GameTDB.com collects on you.
This is already an option in DolphinQt (though in DolphinQt it
will switch entirely from using covers to banners when turned off).
2020-10-19 20:03:47 +02:00
JosJuice
1084cfec1a Add helper function for fmt::format(GetStringT(... 2020-10-19 14:36:08 +02:00
JosJuice
d64fc67b04 Show NKitness in file format string
To make people more aware that they're not using a normal disc image.
2020-10-06 19:35:00 +02:00
JosJuice
f01ccfdb82 Android: Only allow conversion when appropriate 2020-09-16 18:48:25 +02:00
JosJuice
5cad82137d Allow translations and custom names in GameFile::GetNetPlayName
There is no longer any major reason for why this function would
need to return the same result for all players.
2020-08-02 22:46:53 +02:00
JosJuice
a41166bb37 Make netplay's "same game" check more robust
Instead of comparing the game ID, revision, disc number and name,
we can compare a hash of important parts of the disc including
all the aforementioned data but also additional data such as the
FST. The primary reason why I'm making this change is to let us
catch more desyncs before they happen, but this should also fix
https://bugs.dolphin-emu.org/issues/12115. As a bonus, the UI can
now distinguish the case where a client doesn't have the game at
all from the case where a client has the wrong version of the game.
2020-08-02 22:46:53 +02:00
JosJuice
fe5e92f706 DolphinQt: Show WAD as "WAD" instead of "" in file format column
https://bugs.dolphin-emu.org/issues/12190
2020-07-19 21:30:48 +02:00
JosJuice
f24566bf39 DiscIO: Add Volume::IsDatelDisc 2020-07-04 14:51:13 +02:00
JosJuice
d494e0230c Show file format details in game properties 2020-06-21 20:47:23 +02:00
JosJuice
acd00723ad DolphinQt: Make scrubbing configurable in convert dialog 2020-04-24 15:11:20 +02:00
JosJuice
dae2c14f7f DolphinQt: Turn the compress/decompress action into a dialog 2020-04-24 15:10:35 +02:00
JosJuice
5f6598f9e9 StringUtil: Add PathToFileName function 2020-03-16 21:03:34 +01:00
Lioncash
b28db1d4e6 UICommon: Make use of fmt where applicable
Continues the migration to using fmt.

Notably, this allows safely converting a map within USBUtils over to
containing string view instances, rather than std::string instances, as
fmt safely handles the formatting of string views.
2019-11-23 19:41:40 -05:00
JosJuice
d8958fbdf7 GameFile: Use enums for custom/length parameters 2019-09-25 12:25:59 +02:00
JosJuice
59f27ae4e1 GameFile: Support HBC-style XML metadata
This feature was originally exclusive to the previous iteration of
DolphinQt (the one that was the reason for the current iteration
being named DolphinQt2 initially).

https://bugs.dolphin-emu.org/issues/8949
2019-09-25 12:25:33 +02:00
JosJuice
f79ca65170 UICommon: Remove Android hacks from GameFile 2019-08-21 18:48:52 +02:00
JosJuice
561a4cfcce Replace "Override Language on NTSC Games" with "Allow Mismatched Region Settings"
This new setting is like Override Language on NTSC Games, except
instead of only applying to the GameCube language setting,
it also applies to the Wii language setting.

Fixes https://bugs.dolphin-emu.org/issues/11299
2019-08-09 17:33:05 +02:00
JosJuice
0f5a4b37ee DiscIO: Add functions CreateDisc and CreateWAD
...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-07-18 22:29:04 +02:00
Lioncash
eb475025b8 Common/FileUtil: Make WriteStringToFile consistent with ReadFileToString
Makes the parameter ordering consistent and less error-prone.
2019-05-29 07:06:53 -04:00
Lioncash
b4470ad4c2 UICommon/GameFile: Make COVER_URL a plain C string
Same behavior but doesn't take up 8 bytes in the executable to store a
pointer. While we're at it, move it into an anonymous namespace within
the UICommon namespace.
2019-05-28 07:27:41 -04:00
Lioncash
8229ada922 UICommon/GameFile: Remove unused includes
Nothing within the source file makes use of anything in those includes,
so they can be removed.
2019-05-28 07:27:41 -04:00
Lioncash
80786cd295 UICommon/GameFile: Remove unnecessary value() calls in DownloadDefaultCover()
We already check ahead of time if the optional contains a value within
it before accessing it, so we don't need to use the throwing value()
accessor. We can just directly use operator->
2019-05-28 07:27:41 -04:00
Lioncash
ab0892e5a5 UICommon/GameFile: Deduplicate string paths where applicable
Rather than construct strings twice, we can just construct it once and
reuse it. While we're at it, we can move variables closer to where
they're actually used within DownloadDefaultCover()
2019-05-28 07:27:35 -04:00
Lioncash
56faf750be UICommon/GameFile: std::move std::string argument in constructor
Allows for calling code to move the argument into the constructor,
avoiding a copy.
2019-05-28 06:57:48 -04:00
Lioncash
8e65869484 UICommon/GameFile: Default no-arg constructor and destructor within the cpp file
A GameFile instance contains quite a lot of non-trivial types, so
default construction and destruction in the same translation unit.
2019-05-28 05:53:40 -04:00
Lioncash
49ca31467d UICommon/GameFile: Use in-class initializers where applicable
Allows deduplicating code within the constructor initializer list.
2019-05-28 05:51:51 -04:00
Léo Lam
bec85a0962
Merge pull request #8013 from JosJuice/titledatabase-japanese-gc
Show Japanese GC games in Japanese when using TitleDatabase
2019-05-01 17:37:31 +02:00
JosJuice
3bef561e5d Make GameFile::GetUniqueIdentifier independent of language setting
My bad.

We need this in the situation where two users are using different
languages and the game has a different name in each language.
2019-04-27 14:00:58 +02:00
JosJuice
e98f5fe665 Show Japanese GC games in Japanese when using TitleDatabase
Because the GC language setting cannot be set to Japanese, we
need a special condition for Japanese GC games. I accidentally
removed it in PR 7816, but here it is again in a new form.

We could do the same thing with Korean GC games if we want to
(which we couldn't do before PR 7816), but due to how spotty
GameTDB is with having Korean names for Korean GC releases,
things will be more consistent if we just use English for them.
2019-04-20 12:12:35 +02:00
JosJuice
9df763b4ac TitleDatabase: Don't merge multiple languages into same map
Instead of selecting languages based on the user config at the time
of TitleDatabase creation and merging the different languages into one
map for GC and one map for Wii, have one map for each language, and
have the caller supply the language they want. This makes us not need
the IsGCTitle function, which is inaccurate for IDs that start with D.
2019-02-25 19:55:46 +01:00
JosJuice
8842a0f402 Keep track of GameTDB ID separately from game ID
The difference between Dolphin's game IDs and GameTDB's game IDs
is that GameTDB uses four characters for non-disc titles, whereas
Dolphin uses six characters for all titles.

This fixes:

- TitleDatabase considering Datel discs to be NHL Hitz 2002
- Gecko code downloading not working for discs with IDs starting with P
- Cover downloading mixing up discs with channels (e.g. Mario Kart Wii
  and Mario Kart Channel) and making extra HTTP requests. (Android was
  actually doing a better job at this than DolphinQt!)
2019-02-25 19:54:25 +01:00
JosJuice
5ace78bf20 Don't show asterisk next to DOL/ELF size in game list 2019-02-23 16:17:39 +01:00
JosJuice
db76994a9a Android: Don't crash when loading games into game list
Regression from PR #7285 / PR #7293.
2018-07-30 18:08:53 +02:00
spycrab
8fb3085b07 Revert "Revert "Qt/GameList: Add option to show covers in grid mode"" 2018-07-30 03:16:37 +02:00
Pierre Bourdon
9b94c76f81
Revert "Qt/GameList: Add option to show covers in grid mode" 2018-07-28 03:03:21 +02:00
spycrab
5ade5f4fe7 Qt/GameList: Add option to show covers in grid mode 2018-07-27 11:14:24 +02:00
Léo Lam
bdfc6de9fd
Merge pull request #7137 from lioncash/copy
GameFile: Avoid copying map pairs in GetLanguages()
2018-06-19 22:57:29 +02:00
Lioncash
d3ed750c9d GameFile: Avoid copying map pairs in GetLanguages()
We can just reference the pairs instead of taking them by value,
avoiding copying std::string instances.
2018-06-19 12:25:16 -04:00
Lioncash
1e4f3607c3 GameFile: Remove unused variable within GetUniqueIdentifier() 2018-06-19 12:18:09 -04:00