Commit graph

9057 commits

Author SHA1 Message Date
Lioncash
dc276f0e3f qt: Update telemetry links
These were pointing to a non-existent webpage.
2018-10-06 03:16:39 -04:00
David Marcec
188da5880b Ported #4296 from citra
This will allow us to easily remove the use of "NFC" in "System"
2018-10-06 16:49:01 +10:00
bunnei
21986d86ca Merge pull request #1332 from FearlessTobi/port-web-backend
Port web_service from Citra
2018-10-06 02:43:09 -04:00
bunnei
74286daa64 Merge pull request #1447 from lioncash/mutex
kernel/mutex: Amend behavior of TransferMutexOwnership()
2018-10-06 01:38:34 -04:00
Lioncash
809edc848f kernel/mutex: Amend behavior of TransferMutexOwnership()
This was the result of a typo accidentally introduced in
b355b43bfa. This restores the previous
correct behavior.

The behavior with the reference was incorrect and would cause some games
to fail to boot.
2018-10-06 01:13:02 -04:00
bunnei
9773271937 Merge pull request #1440 from lioncash/array
ui_settings: Place definition of the theme array within the cpp file
2018-10-05 22:54:01 -04:00
bunnei
aba62e8f2e Merge pull request #1438 from ReinUsesLisp/quads
gl_rasterizer: Implement quads topology
2018-10-05 22:53:22 -04:00
bunnei
c277d09486 Merge pull request #1445 from lioncash/sched
thread: Make the scheduler pointer a regular pointer
2018-10-05 22:33:03 -04:00
balika011
6069aae43b thread: Make the scheduler pointer a regular pointer
Conceptually, it doesn't make sense for a thread to be able to persist
the lifetime of a scheduler. A scheduler should be taking care of the
threads; the threads should not be taking care of the scheduler.

If the threads outlive the scheduler (or we simply don't actually
terminate/shutdown the threads), then it should be considered a bug
that we need to fix.

Attributing this to balika011, as they opened #1317 to attempt to fix
this in a similar way, but my refactoring of the kernel code caused
quite a few conflicts.
2018-10-05 14:53:01 -04:00
bunnei
b355b43bfa Merge pull request #1439 from lioncash/thread
kernel/thread: Make all instance variables private
2018-10-05 13:41:54 -04:00
bunnei
fba4735f29 Merge pull request #1442 from lioncash/format
text_formatter: Avoid unnecessary string temporary creation in PrintMessage()
2018-10-05 10:48:58 -04:00
Zach Hilman
598ca547b2 romfs_factory: Extract packed update setter to new function 2018-10-05 08:53:51 -04:00
Zach Hilman
91de5d554e patch_manager: Add support for NSP packed updates
Reads as Update (NSP) in add-ons
2018-10-05 08:48:44 -04:00
Zach Hilman
df89cf3541 game_list: Add XCI update versioning to game list 2018-10-05 08:47:55 -04:00
Zach Hilman
19ed4d8558 patch_manager: Add support for packed updates
Will prefer any installed update over the packed version.
2018-10-05 08:47:24 -04:00
Zach Hilman
bbbac65dc4 loader: Add getter for packed update
Reads the update included with the game if it has one and adds the new ErrorNoPackedUpdate status.
2018-10-05 08:46:31 -04:00
Zach Hilman
9488564c1e loader: Add ReadRomFSIVFCOffset to NSP, XCI, and NAX loaders
Fixes errors with certain updates
2018-10-05 08:46:31 -04:00
Lioncash
025ab5f04f text_formatter: Avoid unnecessary string temporary creation in PrintMessage()
operator+ for std::string creates an entirely new string, which is kind
of unnecessary here if we just want to append a null terminator to the
existing one.

Reduces the total amount of potential allocations that need to be done
in the logging path.
2018-10-04 23:55:53 -04:00
Zach Hilman
34bbd314d5 patch_manager: Avoid romfs_ext requirement for patching 2018-10-04 14:09:11 -04:00
Zach Hilman
cc50704b77 fsmitm_romfsbuild: Extract stubs and IPS to romfs_ext dir 2018-10-04 12:29:20 -04:00
Zach Hilman
fc0f2197e8 fsmitm_romfsbuild: Add support for stubbing and IPS patches in LFS 2018-10-04 12:29:14 -04:00
Zach Hilman
794fdbd680 ips_layer: Fix inaccuracies with comments and flags
Specifically bugs/crashes that arise when putting them in positions that are legal but not typical, such as midline, between patch data, or between patch records.
2018-10-04 12:23:27 -04:00
Zach Hilman
c60739016d ips_layer: Deduplicate resource usage 2018-10-04 11:34:36 -04:00
Zach Hilman
8593274f69 ips_layer: Add support for escape sequences and midline comments
More accurately follows IPSwitch specification.
2018-10-04 11:34:30 -04:00
Zach Hilman
b571894b46 patch_manager: Add support for IPSwitch format patches 2018-10-04 11:34:06 -04:00
Zach Hilman
a2602dddbe ips_layer: Add IPSwitchCompiler to process IPSwitch format 2018-10-04 11:32:10 -04:00
Zach Hilman
e0ea8e6ca5 hex_util: Add HexVectorToString and HexStringToVector
Converts between bytes and strings when the size is not known at compile time.
2018-10-04 11:32:04 -04:00
Lioncash
3eb26feb5c ui_settings: Place definition of the theme array within the cpp file
Placing the array wholesale into the header places a copy of the whole
array into every translation unit that uses the data, which is wasteful.
Particularly given that this array is referenced from three different
translation units.

This also changes the array to contain pairs of const char*, rather than
QString instances. This way, the string data is able to be fixed into
the read-only segment of the program, as well as eliminate static
constructors/heap allocation immediately on program start.
2018-10-04 09:43:51 -04:00
bunnei
8d1f393308 Merge pull request #1415 from DarkLordZach/ips
file_sys: Add support for loading IPS patches
2018-10-04 09:42:37 -04:00
Lioncash
e57c8ae2b3 kernel/thread: Make all instance variables private
Many of the member variables of the thread class aren't even used
outside of the class itself, so there's no need to make those variables
public. This change follows in the steps of the previous changes that
made other kernel types' members private.

The main motivation behind this is that the Thread class will likely
change in the future as emulation becomes more accurate, and letting
random bits of the emulator access data members of the Thread class
directly makes it a pain to shuffle around and/or modify internals.
Having all data members public like this also makes it difficult to
reason about certain bits of behavior without first verifying what parts
of the core actually use them.

Everything being public also generally follows the tendency for changes
to be introduced in completely different translation units that would
otherwise be better introduced as an addition to the Thread class'
public interface.
2018-10-04 00:14:15 -04:00
ReinUsesLisp
db80264fae gl_rasterizer: Implement quads topology 2018-10-04 00:03:44 -03:00
bunnei
9d1c5eb661 Merge pull request #1434 from DarkLordZach/dlc-edge-case
aoc_u: Fix edge case with DLC that causes breaks
2018-10-03 21:39:23 -04:00
bunnei
0b30509b9a Merge pull request #1428 from lioncash/qt
configure_graphics: Make functions internally linked where applicable
2018-10-03 21:38:29 -04:00
bunnei
0d11c7fc53 Merge pull request #1431 from lioncash/audio
configure_audio: Minor cleanup-related changes
2018-10-03 19:14:22 -04:00
bunnei
72a7131c04 Merge pull request #1433 from lioncash/fs
services/fsp_srv: Amend service function table
2018-10-03 19:13:57 -04:00
bunnei
66307969cc Merge pull request #1429 from lioncash/translate
configure_input: Make analog mapping strings translatable
2018-10-03 19:13:20 -04:00
bunnei
3bb12e0e67 Merge pull request #1436 from lioncash/view
submission_package: Cleanup and bug fixes
2018-10-03 19:05:19 -04:00
bunnei
e590be654e Merge pull request #1432 from lioncash/lbl
service/lbl: Update service function table
2018-10-03 18:45:15 -04:00
bunnei
b7c1a76867 Merge pull request #1426 from FearlessTobi/port-4253
Port citra-emu/citra#4253: "common/string_util cleanup"
2018-10-03 18:44:51 -04:00
bunnei
8f0975be07 Merge pull request #1435 from lioncash/xci
card_image: Ensure program_nca_status is always initialized
2018-10-03 18:44:28 -04:00
FernandoS27
c6978b43b3 Implemented Texture Processing Modes in TEXS and TLDS 2018-10-03 08:41:12 -04:00
Lioncash
b9b8610d6d submission_package: Avoid dangling std::string_view within SetTicketKeys()
GetName() returns a std::string by value, not by reference, so after the
std::string_view is constructed, it's not well defined to actually
execute any member functions of std::string_view that attempt to access
the data, as the std::string has already been destroyed. Instead, we can
just use a std::string and erase the last four characters.
2018-10-03 02:13:51 -04:00
Lioncash
689010c2fa submission_package: Correct location of null check within SetTicketKeys()
If a ticket file was ever a null pointer, we'd cause a null pointer
dereference, as we were calling GetExtension() on the pointer instance.
2018-10-03 02:06:30 -04:00
Lioncash
b77f6a32ff submission_package: Use std::string's rfind() when looking for the extension in InitializeExeFSAndRomFS()
When searching for a file extension, it's generally preferable to begin
the search at the end of the string rather than the beginning, as the
whole string isn't going to be walked just to check for something at the
end of it.
2018-10-03 01:51:01 -04:00
Lioncash
8f51371d7b submission_package: Ensure the 'extracted' member variable is always initialized
If an error occurs when constructing the PartitionFilesystem instance,
the constructor would be exited early, which wouldn't initialize the
extracted data member, making it possible for other code to perform an
uninitialized read by calling the public IsExtractedType() member
function. This prevents that.
2018-10-03 01:47:34 -04:00
Lioncash
e4f994749b submission_package: Move ExeFS and RomFS initialization to its own function
Like the other two bits of factored out code, this can also be put
within its own function. We can also modify the code so that it accepts
a const reference to a std::vector of files, this way, we can
deduplicate the file retrieval.

Now the constructor for NSP isn't a combination of multiple behaviors in
one spot. It's nice and separate.
2018-10-03 01:46:07 -04:00
Lioncash
eb438661e6 submission_package: Move NCA reading code to its own function
This too, is completely separate behavior from what is in the
constructor, so we can move this to its own isolated function to keep
everything self-contained.
2018-10-03 01:35:41 -04:00
Lioncash
17fb526fd9 submission_package: Move ticket key setting to its own function
This behavior is entirely independent of the surrounding code, so it can
be put in its own function to keep the behavior separate.
2018-10-03 01:20:57 -04:00
Lioncash
0b2773e2c6 submission_package: Invert conditionals within NSP's constructor to reduce nesting
We can use early continues here to reduce the amount of nesting.
2018-10-03 01:11:16 -04:00
Lioncash
d91cd1d638 card_image: Ensure program_nca_status is always initialized
If any of the error paths before the NCA retrieval are taken, it'll
result in program_nca_status being left in an inconsistent state. So we
initialize it by default with a value indicating an error.
2018-10-02 23:16:05 -04:00