- May 31, 2019
-
-
Lioncash authored
Stays consistent in our code with using Qt's provided mechanisms, and also properly handles Unicode paths (which file streams on Windows don't do very well).
-
- May 30, 2019
-
-
Lioncash authored
This is equivalent to specifying two separate functions, so we can just do that.
-
- May 26, 2019
-
-
Zach Hilman authored
-
Zach Hilman authored
Preserves list of add ons and the icon, which are the two costliest parts of game list population.
-
- May 20, 2019
-
-
Lioncash authored
Allows the game list worker code to compile successfully with implicit string conversions disabled.
-
- Mar 27, 2019
-
-
Zach Hilman authored
-
- Dec 05, 2018
-
-
Lioncash authored
Similarly, here we can avoid doing unnecessary work twice by retrieving the file type only once and comparing it against relevant operands, avoiding potential unnecessary object construction/destruction.
-
Lioncash authored
While GetFileType() is indeed a getter function, that doesn't mean it's a trivial function, given some case require reading from the data or constructing other objects in the background. Instead, only do necessary work once.
-
- Dec 04, 2018
-
-
Lioncash authored
Avoids potentially allocating a std::string instance when it isn't needed.
-
Zach Hilman authored
-
- Dec 02, 2018
-
-
Lioncash authored
We can just return a new instance of this when it's requested. This only ever holds pointers to the existing registed caches, so it's not a large object. Plus, this also gets rid of the need to keep around a separate member function just to properly clear out the union. Gets rid of one of five globals in the filesystem code.
-
Lioncash authored
Avoids duplicating the same code twice verbatim.
-
Lioncash authored
We don't need to call out to our own file handling functions when we're going to construct a QFileInfo instance right after it. We also don't need to convert to a std::string again just to compare the file extension.
-
- Nov 02, 2018
-
-
Zach Hilman authored
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%.
-
- Oct 24, 2018
-
-
Lioncash authored
Using fmt here requires unnecessary string conversions back into QString. Instead, we can just use QString's formatting and get the end result of the formatting operation in the proper type.
-
- Oct 16, 2018
-
-
Lioncash authored
file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicable The data retrieved in these cases are ultimately chiefly owned by either the RegisteredCache instance itself, or the filesystem factories. Both these should live throughout the use of their contained data. If they don't, it should be considered an interface/design issue, and using shared_ptr instances here would mask that, as the data would always be prolonged after the main owner's lifetime ended. This makes the lifetime of the data explicit and makes it harder to accidentally create cyclic references. It also makes the interface slightly more flexible than the previous API, as a shared_ptr can be created from a unique_ptr, but not the other way around, so this allows for that use-case if it ever becomes necessary in some form.
-
- Oct 09, 2018
-
-
Lioncash authored
patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr Neither of these functions require the use of shared ownership of the returned pointer. This makes it more difficult to create reference cycles with, and makes the interface more generic, as std::shared_ptr instances can be created from a std::unique_ptr, but the vice-versa isn't possible. This also alters relevant functions to take NCA arguments by const reference rather than a const reference to a std::shared_ptr. These functions don't alter the ownership of the memory used by the NCA instance, so we can make the interface more generic by not assuming anything about the type of smart pointer the NCA is contained within and make it the caller's responsibility to ensure the supplied NCA is valid.
-
- Oct 05, 2018
-
-
Zach Hilman authored
-
Zach Hilman authored
Reads as Update (NSP) in add-ons
-
Zach Hilman authored
-
- Oct 01, 2018
-
-
Zach Hilman authored
-
- Sep 09, 2018
-
-
Lioncash authored
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.
-
- Sep 07, 2018
-
-
Lioncash authored
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).
-