Commit graph

80 commits

Author SHA1 Message Date
fearlessTobi
13891fd62d Change QList to QVector 2019-09-04 16:47:33 +02:00
fearlessTobi
5aaafa6a56 Separate UserNand and Sdmc directories 2019-09-04 16:47:32 +02:00
fearlessTobi
dfec9c9a43 Address more trivial review comments 2019-09-04 16:47:32 +02:00
fearlessTobi
7a8f484020 Address trivial review comments 2019-09-04 16:47:32 +02:00
fearlessTobi
2d8eba5baf yuzu: Add support for multiple game directories
Ported from https://github.com/citra-emu/citra/pull/3617.
2019-09-04 16:47:32 +02:00
Lioncash
5980aa1e51 yuzu/CMakeLists: Remove qt5_wrap_ui macro usage
We can simply enable CMAKE_AUTOUIC and let CMake take care of handling
the UI code generation for targets.

As part of letting CMake automatically handle the header file parsing,
we must not name includes with "ui_*" unless they're related to the
output of the Qt UIC compiler. Because of this, we need to rename
ui_settings, given it would conflict with this restriction.
2019-08-09 17:54:08 -04:00
Zach Hilman
c417b4fe28 game_list: Accept *.kip as a file extension of executables 2019-06-05 00:33:05 -04:00
Lioncash
bc32474901 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
382722b9c4 Fix Clang Format 2019-04-12 16:40:35 +02:00
FreddyFunk
dffa1a872a ui_settings: Rename game directory variables 2019-04-11 19:55:56 +02:00
bunnei
61f63bb994
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
41d2565f29 game_list: Register content with ContentProvider 2019-03-26 22:05:37 -04:00
unknown
9d411699d8 frontend: Open transferable shader cache for a selected game in the gamelist 2019-02-08 09:05:51 +01:00
bunnei
bc879ae880
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
f6f6503578 qt: Add Properties menu to game list right-click 2018-12-04 13:34:50 -05:00
Frederic Laing
6d7514ccec game_list: Remove a reference of a reference 2018-12-03 19:26:36 +01:00
Bartosz Kaszubowski
5f07ca3dce remove border from GameList 2018-11-30 23:35:08 +01:00
Zach Hilman
2d2ef05d8c 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
d9590d7dfa
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
a1c85b8c55 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
47f081d513 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
f7da74d18e
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
ba0873d33c qt: Add UI elements for LayeredFS and related tools 2018-09-21 19:53:33 -04:00
zhupengfei
44228ee3ed 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
e980e90d6e 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
0e61e8362f 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
7fe10dea3e game_list: Use QJsonValueRef() within LoadCompatibilityList()
This way, we aren't constructing unnecessary QJsonValue instances.
2018-09-11 22:28:35 -04:00
Lioncash
bd8065295c 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
564b7fdc9c 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
23a16c1720 patch_manager: Centralize Control-type NCA parsing 2018-09-04 16:25:10 -04:00
Zach Hilman
c91b60a421 game_list: Fix version display on non-NAND titles 2018-09-04 16:24:02 -04:00
Zach Hilman
2814ca3624 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
8e150c46b9 game_list: Display patch names and versions on list 2018-09-04 16:24:02 -04:00
Zach Hilman
d2caf4af7d game_list: Use RegisteredCacheUnion for installed
Reduces code
2018-09-04 16:21:40 -04:00
Zach Hilman
58473309a0 qt: Add UI support for NSP files 2018-09-04 14:28:41 -04:00
Lioncash
a813c10e1c 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
a405373144 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
4a587b81b2 core/core: Replace includes with forward declarations where applicable
The follow-up to e2457418da, 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
78653f7339 Show game compatibility within yuzu 2018-08-29 15:42:53 +02:00
Zach Hilman
60b7a3b904 game_list: Add SD registration loading to game list 2018-08-23 11:53:30 -04:00
tech4me
cc71832b19 qt/main: Port part of citra(#3411), open savedata works 2018-08-21 02:04:33 -07:00
Lioncash
477eee3993 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
ffd60ee476 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
6b76b77400 registration: Add support for force overwrite of installed 2018-08-11 23:01:42 -04:00
Zach Hilman
fdf27bf390 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
10812f8407 game_list: Populate control data from installed NAND 2018-08-11 22:50:48 -04:00
Zach Hilman
b67e751ccb game_list: Modify game list to scan installed titles 2018-08-11 22:50:48 -04:00
Zach Hilman
8069fbd37f game_list: Reorder error checks
clang-format fix
2018-08-09 21:37:35 -04:00
Zach Hilman
ec3bef7b4c 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
94cf327e77 vfs: Fix typo in VfsFilesystem docs 2018-08-08 21:18:45 -04:00