Commit graph

74 commits

Author SHA1 Message Date
Zach Hilman
5f6dba8ece game_list: Accept *.kip as a file extension of executables 2019-06-05 00:33:05 -04:00
Lioncash
b254ac5a1e yuzu/game_list: Specify string conversions explicitly
Allows the game list code to compile successfully with implicit string
conversions disabled.
2019-05-20 15:30:50 -04:00
FreddyFunk
27f51145b5 Fix Clang Format 2019-04-12 16:40:35 +02:00
FreddyFunk
9ddb70acb2 ui_settings: Rename game directory variables 2019-04-11 19:55:56 +02:00
bunnei
53c9e7aab2 Merge pull request #1957 from DarkLordZach/title-provider
file_sys: Provide generic interface for accessing game data
2019-04-09 19:16:37 -04:00
Zach Hilman
ec383a021b game_list: Register content with ContentProvider 2019-03-26 22:05:37 -04:00
unknown
b1e56cc6b2 frontend: Open transferable shader cache for a selected game in the gamelist 2019-02-08 09:05:51 +01:00
bunnei
e3e62ddf7e Merge pull request #1848 from FreddyFunk/QJsonArray
game_list: Remove a reference of a reference
2019-01-12 02:01:13 -05:00
Zach Hilman
cb527149ee qt: Add Properties menu to game list right-click 2018-12-04 13:34:50 -05:00
Frederic Laing
5b61b0124c game_list: Remove a reference of a reference 2018-12-03 19:26:36 +01:00
Bartosz Kaszubowski
d9193f8718 remove border from GameList 2018-11-30 23:35:08 +01:00
Zach Hilman
defffa3ec3 game_list: Make add-ons column optional
As the add-ons column takes the most processing time out of any (as it needs to search registration for updates/dlc, patch control NCAs, search for mods, etc.), an option was added to disable it. This does not affect the application of add-ons. In large game collections, this decreases game list refresh time by as much as 70%.
2018-11-01 20:27:12 -04:00
bunnei
7163b7d506 Merge pull request #1568 from lioncash/dir
game_list: Use QFileInfo instead of common's file functions
2018-10-24 17:13:51 -04:00
Lioncash
849265a3de game_list: Use QFileInfo instead of common's file functions
We can just use the facilities that Qt provides instead of pulling in
stuff from common. While we're at it, we can also simplify the nearby
logging statement's argument by just calling .toStdString()
2018-10-24 08:40:22 -04:00
Lioncash
17c920b7a4 game_list: Make game list column headers translatable
These are user-facing strings, so they should be marked as translatable
2018-10-24 08:20:35 -04:00
bunnei
a5f39e4de1 Merge pull request #1360 from FearlessTobi/port-3979
Port citra-emu/citra#3979 game_list: move SearchField to game_list_p.h and fix untranslated text
2018-09-27 17:09:11 -04:00
Zach Hilman
600867c594 qt: Add UI elements for LayeredFS and related tools 2018-09-21 19:53:33 -04:00
zhupengfei
4dc46e8bae game_list: move SearchField to game_list_p.h and fix untranslated text
I have tested and made sure the text is translatable, but this would require a translation update to take effect.
2018-09-21 18:47:41 +02:00
Lioncash
6d8d7a1f11 game_list: Handle plurals within setFilterResult() better
Qt provides an overload of tr() that operates on quantities in relation
to pluralization. This also allows the translation to adapt based on the
target language rules better.

For example, the previous code would result in an incorrect translation
for the French language (which doesn't use the pluralized version of
"result" in the case of a total of zero. While in English it's
correct to use the pluralized version of "result", that is, "results"

---

For example:

English: "0 results"

French: "0 résultat" (uses the singular form)

In French, the noun being counted is singular if the quantity is 0 or 1.
In English, on the other hand, if the noun being counted has a quantity
of 0 or N > 1, then the noun is pluralized.

---

For another example in a language that has different counting methods
than the above, consider English and Irish. Irish has a special form of
of a grammatical number called a dual. Which alters how a word is
written when N of something is 2. This won't appear in this case with a
direct number "2", but it would change if we ever used "Two" to refer to
two of something. For example:

English: "Zero results"

Irish: "Toradh ar bith"

English: "One result"

Irish: "Toradh amháin"

English: "Two results"

Irish: "Dhá thorthaí" <- Dual case

Which is an important distinction to make between singular and plural,
because in other situations, "two" on its own would be written as "dó"
in Irish. There's also a few other cases where the order the words are
placed *and* whether or not the plural or singular variant of the word
is used *and* whether or not the word is placed after or between a set
of numbers can vary. Counting in Irish also differs depending on whether or not
you're counting things (like above) or counting people, in which case an
entirely different set of numbers are used.

It's not important for this case, but it's provided as an example as to why one
should never assume the placement of values in text will be like that of
English or other languages. Some languages have very different ways to
represent counting, and breaking up the translated string like this
isn't advisable because it makes it extremely difficult to get right
depending on what language a translator is translating text into due to
the ambiguity of the strings being presented for translation.

In this case a translator would see three fragmented strings on
Transifex (and not necessarily grouped beside one another, but even
then, it would still be annoying to decipher):

- "of"
- "result"
- "results"

There is no way a translator is going to know what those sets of words
are actually used for unless they look at the code to see what is being
done with them (which they shouldn't have to do).
2018-09-20 01:35:50 -04:00
Lioncash
7b527cc06f game_list: Resolve variable shadowing within LoadCompatibilityList()
"value" is already a used variable name within the outermost ranged-for
loop, so this variable was shadowing the outer one. This isn't a bug,
but it will get rid of a -Wshadow warning.
2018-09-11 22:34:09 -04:00
Lioncash
2e84bcfe06 game_list: Use QJsonValueRef() within LoadCompatibilityList()
This way, we aren't constructing unnecessary QJsonValue instances.
2018-09-11 22:28:35 -04:00
Lioncash
9516eccd69 yuzu: Move compatibility list specifics to their own source files
Lets us keep the generic portions of the compatibility list code
together, and allows us to introduce a type alias that makes it so we
don't need to type out a very long type declaration anymore, making the
immediate readability of some code better.
2018-09-09 19:45:25 -04:00
Lioncash
bdd7f4b362 yuzu: Move GameListWorker to its own source files
This has gotten sufficiently large enough to warrant moving it to its
own source files. Especially given it dumps the file_sys headers around
code that doesn't use it for the most part.

This'll also make it easier to introduce a type alias for the
compatibility list, so a large unordered_map type declaration doesn't
need to be specified all the time (we don't want to propagate the
game_list_p.h include via the main game_list.h header).
2018-09-07 16:25:28 -04:00
Zach Hilman
14a18fd7ae patch_manager: Centralize Control-type NCA parsing 2018-09-04 16:25:10 -04:00
Zach Hilman
ac7d3882b4 game_list: Fix version display on non-NAND titles 2018-09-04 16:24:02 -04:00
Zach Hilman
e4d55fc9b0 game_list: Use friendly game versions
Mainly, from control.nacp metadata instead of cnmt metadata
2018-09-04 16:24:02 -04:00
Zach Hilman
56280fd666 game_list: Display patch names and versions on list 2018-09-04 16:24:02 -04:00
Zach Hilman
bf86700873 game_list: Use RegisteredCacheUnion for installed
Reduces code
2018-09-04 16:21:40 -04:00
Zach Hilman
d0467f930a qt: Add UI support for NSP files 2018-09-04 14:28:41 -04:00
Lioncash
a9f4e31cc0 file_sys: Replace includes with forward declarations where applicable
Cuts down on include dependencies, resulting in less files that need to
be rebuilt when certain things are changed.
2018-09-03 22:52:24 -04:00
Lioncash
df444a4a8e vfs_real: Forward declare IOFile
Eliminates the need to rebuild some source files if the file_util header
ever changes. This also uncovered some indirect inclusions, which have
also been fixed.
2018-09-02 12:38:14 -04:00
Lioncash
84f855a61d core/core: Replace includes with forward declarations where applicable
The follow-up to 88597535d6, which
replaces most of the includes in the core header with forward declarations.

This makes it so that if any of the headers the core header was
previously including change, then no one will need to rebuild the bulk
of the core, due to core.h being quite a prevalent inclusion.

This should make turnaround for changes much faster for developers.
2018-08-31 16:30:14 -04:00
fearlessTobi
f30bf4d48d Show game compatibility within yuzu 2018-08-29 15:42:53 +02:00
Zach Hilman
b56f075c4e game_list: Add SD registration loading to game list 2018-08-23 11:53:30 -04:00
tech4me
5e70a75986 qt/main: Port part of citra(#3411), open savedata works 2018-08-21 02:04:33 -07:00
Lioncash
1d77a31e1d service/filesystem: Use forward declarations where applicable
Avoids the need to rebuild multiple source files if the filesystem code
headers change.

This also gets rid of a few instances of indirect inclusions being
relied upon
2018-08-20 23:28:46 -04:00
Lioncash
9981f15c87 game_list: Avoid uninitialized variables when retrieving program ID
Avoids potentially leaving this variable uninitialized based off the
loader failing to retrieve the ID value.
2018-08-20 04:23:05 -04:00
Zach Hilman
8c33f20792 registration: Add support for force overwrite of installed 2018-08-11 23:01:42 -04:00
Zach Hilman
9bae8b24ae game_list: Split game list scans to multiple functions
Avoids unnecessary rebuilds of control data on every layer of recursion in AddFstEntriesToGameList
2018-08-11 22:50:48 -04:00
Zach Hilman
8f96b88d0b game_list: Populate control data from installed NAND 2018-08-11 22:50:48 -04:00
Zach Hilman
53ca6f8846 game_list: Modify game list to scan installed titles 2018-08-11 22:50:48 -04:00
Zach Hilman
9946a70305 game_list: Reorder error checks
clang-format fix
2018-08-09 21:37:35 -04:00
Zach Hilman
da921ac3f3 loader: Add more descriptive errors
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09 21:06:59 -04:00
Zach Hilman
1e2232797a vfs: Fix typo in VfsFilesystem docs 2018-08-08 21:18:45 -04:00
Zach Hilman
4cbef33915 core: Port core to VfsFilesystem for file access 2018-08-08 21:18:45 -04:00
Zach Hilman
d53b3a13b3 loader: Add icon and title support to XCI 2018-08-06 23:13:42 -04:00
Zach Hilman
469f7cefe4 Use const where applicable 2018-08-06 23:06:33 -04:00
Zach Hilman
f89988272e Avoid parsing RomFS to directory in NCA 2018-08-06 23:06:33 -04:00
bunnei
caf5d8d15a Merge pull request #947 from lioncash/encoding
game_list: Use QString::fromStdString() where applicable instead of c_str()
2018-08-06 22:02:01 -04:00
Lioncash
35f1943b0f game_list: Remove unnecessary conversion to std::string in ValidateEntry()
We can just use the file interfaces that Qt provides to prevent needing
to convert to std::string.
2018-08-06 15:06:29 -04:00