Commit graph

6555 commits

Author SHA1 Message Date
Lioncash
d378d98e26 nvdrv: Get rid of global std::weak_ptr
Rather than use global state, we can simply pass the instance into the
NVFlinger instance directly.
2018-08-07 21:53:05 -04:00
Lioncash
766c1a2d50 vector_math: Remove unimplemented function prototypes 2018-08-07 21:33:48 -04:00
Lioncash
5c323d96e0 vector_math: Make functions constexpr where applicable 2018-08-07 21:32:05 -04:00
Lioncash
4e3bc37791 vector_math: Convert typedefs to type aliases 2018-08-07 21:15:10 -04:00
Lioncash
a7d6efc520 common: Convert type traits templates over to variable template versions where applicable
Uses the C++17 inline variable variants
2018-08-07 19:34:47 -04:00
Lioncash
cd1a96f389 hle: Remove unused romfs.cpp/.h
These files are no longer used, so we can get rid of them.
2018-08-07 19:34:12 -04:00
Lioncash
62b0b83fd8 externals: Update catch to 2.3.0
Updates the library from 2.2.3 to 2.3.0
2018-08-07 19:26:13 -04:00
bunnei
4fa3511a63
Merge pull request #964 from Hexagon12/lower-logs
Lowered down the logging for command processor methods
2018-08-07 19:00:19 -04:00
Hexagon12
7139f05fc5 Fixed the sRGB pixel format (#963)
* Changed the sRGB pixel format return

* Add a message about SRGBA -> RGBA conversion
2018-08-07 18:59:50 -04:00
Zach Hilman
1abfd4166e configure_gamelist: Use explicit QVariant constructor 2018-08-07 17:10:10 -04:00
bunnei
b9829a05be
Merge pull request #920 from DarkLordZach/titlekey
content_archive: Add support for titlekey cryptography
2018-08-07 17:01:25 -04:00
bunnei
7ed8565978
Merge pull request #957 from lioncash/event
nvflinger: Correct typo in name of composition event
2018-08-07 15:56:51 -04:00
bunnei
6576bc8927
Merge pull request #954 from lioncash/hid
services/hid: Add ActivateNpadWithRevision() to the hid function info array
2018-08-07 15:56:34 -04:00
bunnei
2d57cbaec1
Merge pull request #960 from lioncash/apm
service/apm: Add the apm:sys service
2018-08-07 14:57:12 -04:00
bunnei
3242e7c164
Merge pull request #950 from lioncash/hotkey
qt/hotkey: Get rid of global hotkey map instance
2018-08-07 14:45:45 -04:00
bunnei
573a66c23d
Merge pull request #955 from lioncash/view
nvflinger: Use std::string_view in OpenDisplay()
2018-08-07 14:26:51 -04:00
bunnei
97c6f984dc
Merge pull request #953 from lioncash/time
service/time: Amend command IDs of ToPosixTime() and ToPosixTimeWithMyRule()
2018-08-07 14:25:52 -04:00
bunnei
07595987ac
Merge pull request #959 from KAMiKAZOW/cubeb-compilation
Make building cubeb optional
2018-08-07 14:25:17 -04:00
bunnei
b09c4f45c7
Merge pull request #956 from lioncash/nv
nvdrv: Get rid of indirect inclusions
2018-08-07 14:23:32 -04:00
Lioncash
0735a0c8a1 file_util: Avoid sign-conversions in WriteArray() and ReadArray()
Prevents compiler warnings.
2018-08-07 13:51:37 -04:00
Hexagon12
bc6d91a103 Lowered down the logging for methods 2018-08-07 19:51:40 +03:00
bunnei
c392650e21
Merge pull request #952 from lioncash/usb
service: Add usb services
2018-08-07 11:27:49 -04:00
bunnei
8f73f41824
Merge pull request #949 from lioncash/priv
client_port: Make all data members private
2018-08-07 11:20:26 -04:00
Zach Hilman
3e81c09094 loader: Fix scope error in DeconstructedRomDirectory 2018-08-07 10:37:38 -04:00
Lioncash
12ab5a0547 service/apm: Add the apm:sys service
Adds the basic skeleton of the apm:sys service based off the information
on Switch Brew.
2018-08-07 10:05:26 -04:00
Lioncash
d3f64785d1 nvflinger: Correct typo in name of composition event 2018-08-07 09:03:52 -04:00
Lioncash
300ab211e8 nvdrv: Make Ioctl()'s definition match its prototype
The only reason this wasn't a compilation error is because we use
little-endian systems.
2018-08-07 08:57:11 -04:00
Lioncash
fa8017295b nvdrv: Get rid of indirect inclusions 2018-08-07 08:54:50 -04:00
Lioncash
e40b0cf437 nvflinger: Get rid of indirect inclusions 2018-08-07 08:32:05 -04:00
Lioncash
7e49881b7f nvflinger: Use std::string_view in OpenDisplay()
We don't need to use a std::string here, given all that's done is
comparing the character sequence against another. This allows passing
regular const char* without needing to heap allocate.
2018-08-07 08:32:06 -04:00
KAMiKAZOW
0f5c4615ae
Make building cubeb optional 2018-08-07 13:21:56 +02:00
Lioncash
890e543304 services/hid: Add ActivateNpadWithRevision() to the hid function info array
Updated based off the information on Switch Brew.
2018-08-07 03:23:20 -04:00
Lioncash
20c976ff2a service/time: Amend command IDs of ToPosixTime() and ToPosixTimeWithMyRule()
Updates the ID of these based off the information on Switch Brew.
2018-08-07 03:18:07 -04:00
Lioncash
45bc449ff9 service: Add usb services
Adds basic skeleton for the usb services based off the information provided by Switch Brew.
2018-08-07 03:14:03 -04:00
Lioncash
c8f6754417 qt/hotkey: Get rid of global hotkey map instance
Instead, we make a proper registry class and house it within the main
window, then pass it to whatever needs access to the loaded hotkeys.

This way, we avoid a global variable, and don't need to initialize a
std::map instance before the program can do anything.
2018-08-07 02:28:17 -04:00
Zach Hilman
91cfe70301 loader: Add icon and title support to XCI 2018-08-06 23:13:42 -04:00
Zach Hilman
5927cf0e17 Use const where applicable 2018-08-06 23:06:33 -04:00
Zach Hilman
9e88f03e75 Avoid parsing RomFS to directory in NCA 2018-08-06 23:06:33 -04:00
Lioncash
da2f00ab7d client_port: Make all data members private
These members don't need to be entirely exposed, we can instead expose
an API to operate on them without directly needing to mutate them

We can also guard against overflow/API misuse this way as well, given
active_sessions is an unsigned value.
2018-08-06 23:05:17 -04:00
bunnei
826b1394e8
Merge pull request #931 from DarkLordZach/nca-as-drd
loader: Make AppLoader_NCA rely on directory loading code
2018-08-06 22:02:41 -04:00
bunnei
0c3c91e41c
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
Hedges
e2b74f6354 GDBStub works with both Unicorn and Dynarmic now (#941)
* GDBStub works with both Unicorn and Dynarmic now

* Tidy up
2018-08-06 22:01:24 -04:00
bunnei
e218d79cc2
Merge pull request #943 from lioncash/decl
game_list: Join declarations and assignments in onTextChanged()
2018-08-06 22:00:49 -04:00
bunnei
75df8a3969
Merge pull request #946 from lioncash/compress
qt/main: Collapse if statement in UpdateRecentFiles()
2018-08-06 21:34:20 -04:00
bunnei
645d35ac32
Merge pull request #944 from lioncash/menu
qt: Don't show error dialog when canceling the Load Folder dialog
2018-08-06 21:33:23 -04:00
bunnei
168958f8e2
Merge pull request #942 from lioncash/default
qt: Minor cleanup-related changes
2018-08-06 21:32:25 -04:00
bunnei
f179e87864
Merge pull request #940 from lioncash/private
kernel/event: Make data members private
2018-08-06 21:31:25 -04:00
bunnei
cf82358ee6
Merge pull request #936 from bunnei/avoid-copies
gl_rasterizer_cache: Avoid superfluous surface copies.
2018-08-06 21:29:29 -04:00
bunnei
83ef37ca37
Merge pull request #934 from lioncash/chrono
core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
2018-08-06 18:03:05 -04:00
Lioncash
96b6ad11c1 qt/main: Avoid sign conversions in UpdateRecentFiles()
This was intermixing signed and unsigned values when they could all just
be signed.
2018-08-06 15:42:44 -04:00
Lioncash
10d693b9c2 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
Lioncash
a5ac53dd4c game_list: Use QString::fromStdString() where applicable instead of c_str()
The codec used by Qt for const char* and std::string don't necessarily
have to be the same depending on locale. Therefore, we should be using
the correct functions to do the conversions.
2018-08-06 15:06:30 -04:00
Lioncash
251e92513a game_list: Join declarations and assignments in onTextChanged()
There's no need to keep these separate from one another.
2018-08-06 14:35:40 -04:00
Lioncash
cf983888cc qt/main: Collapse if statement in UpdateRecentFiles()
Given the function accepts a boolean, we don't need to use an if
statement here and repeat ourselves.
2018-08-06 14:32:28 -04:00
Lioncash
2b2dc00bfd qt/main: Better file-existence checking within OnMenuRecentFile() and UpdateUITheme()
In OnMenuRecentFile() we don't need to construct a QFileInfo instance
just to check if a file exists, we can just use the static member
function to do that (which Qt's documentation also notes as quicker than
constructing an instance).

In UpdateUITheme(), we just want to try and open the file and check the
success of that operation. Technically speaking, between the existence
check and the open call, the file can be deleted or moved, but still
appear to succeed in code. i.e.

1. Existence check -> Returns true
2. File is moved/deleted
3. Open is called, the return value of which isn't checked
4. Nonsense behavior

This way we combine the existence check and the open into one.
2018-08-06 14:17:13 -04:00
Lioncash
d33f641912 qt: Don't show error dialog when canceling the Load Folder dialog
Previously, when canceling out of the Load Folder dialog, a user would
get an error dialog about the selected folder not containing a main
file, however, by canceling out of the dialog, no selection was actually
made.
2018-08-06 14:02:34 -04:00
Lioncash
9764b4ec0e qt/game_list_p: Remove redundant base class constructor invocations
These occur automatically without the need to call them. While we're at
it, also std::move the QString instance into its member variable.
2018-08-06 13:42:12 -04:00
Lioncash
7846295a8f qt: Add missing override specifiers where applicable 2018-08-06 13:29:14 -04:00
Lioncash
00a68c5eea qt: Default destructors where applicable
Makes code consistent with our style of defaulting special member
functions where applicable.
2018-08-06 13:27:08 -04:00
Lioncash
2feb1a8ba6 kernel/event: Make data members private
Instead we can simply provide accessors to the required data instead of
giving external read/write access to the variables directly.
2018-08-06 12:53:02 -04:00
bunnei
1ac45342dd
Merge pull request #933 from lioncash/memory
memory: Correct prototype of ZeroBlock
2018-08-06 12:34:57 -04:00
mailwl
2ea0f0fd16 Service/Audio: audout_a.cpp: remove pragma once 2018-08-06 12:29:27 +03:00
bunnei
904d7eaa94 maxwell_3d: Remove outdated assert. 2018-08-05 23:57:19 -04:00
bunnei
57eb936200 gl_rasterizer_cache: Avoid superfluous surface copies. 2018-08-05 23:40:03 -04:00
bunnei
0b80bbeb95
Merge pull request #932 from lioncash/func
core_timing: Use transparent functors where applicable
2018-08-05 23:37:53 -04:00
bunnei
f1b93d63d1
Merge pull request #929 from lioncash/addr
gdbstub: Minor changes
2018-08-05 23:36:26 -04:00
bunnei
03b7ebbc08
Merge pull request #930 from lioncash/thread
address_arbiter: Return by value from GetThreadsWaitingOnAddress()
2018-08-05 23:35:59 -04:00
bunnei
bb21c2198a
Merge pull request #925 from bunnei/audren
Implement audren audio output
2018-08-05 23:35:22 -04:00
Lioncash
6c56754322 perf_stats: Correct literal used for MAX_LAG_TIME_US
ms is shorthand for milliseconds, not microseconds, and given there's no
comment indicating that this was intentional, it probably wasn't.
2018-08-05 22:12:58 -04:00
Lioncash
a0c3a46aa9 core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
Enforces the time unit being returned and also allows using the standard
time utilities to manipulate it.
2018-08-05 22:07:30 -04:00
Lioncash
2a7a2b739b memory: Make prototype parameter names match their definitions
Keeps the code consistent.
2018-08-05 21:39:09 -04:00
Lioncash
4aa31b0618 memory: Correct prototype of ZeroBlock
Previously, the prototype wasn't matching the definition, which has a
Processor parameter before the destination address.
2018-08-05 21:39:06 -04:00
Lioncash
2fc5c783ed memory: Remove unnecessary const qualifiers in prototypes
These aren't necessary, as value-wise const only matters in the
definition.
2018-08-05 21:38:22 -04:00
Lioncash
6edd828101 core_timing: Convert typedef into a type alias
Makes the alias a little more readable from left-to-right.
2018-08-05 21:27:14 -04:00
Lioncash
d9815b523b core_timing: Use transparent functors where applicable
Gets rid of the need to hardcode the type in multiple places. This will
now be deduced automatically, based off the elements in the container
being provided to the algorithm.
2018-08-05 21:19:24 -04:00
Zach Hilman
7f9430f7ae loader: Make AppLoader_NCA rely on directory loading code
Eliminates duplicate code shared between their Load methods, after all the only difference is how the romfs is handled.
2018-08-05 18:28:15 -04:00
bunnei
c8e5c74092
Merge pull request #927 from bunnei/fix-texs
gl_shader_decompiler: Fix TEXS mask and dest.
2018-08-05 16:42:21 -04:00
Lioncash
00f7e584ce gdbstub: Use type alias for breakpoint maps
Rather than having to type out the full std::map type signature, we can
just use a straightforward alias. While we're at it, rename
GetBreakpointList to GetBreakpointMap, which makes the name more
accurate. We can also get rid of unnecessary u64 static_casts, since
VAddr is an alias for a u64.
2018-08-05 16:41:22 -04:00
Lioncash
89c076b4b1 gdbstub: Move all file-static variables into the GDBStub namespace
Keeps everything under the same namespace. While we're at it, enclose
them all within an inner anonymous namespace.
2018-08-05 16:41:18 -04:00
bunnei
c0af42d6eb
Merge pull request #912 from lioncash/global-var
video_core: Eliminate the g_renderer global variable
2018-08-05 16:37:39 -04:00
Lioncash
7a77d0a71e address_arbiter: Return by value from GetThreadsWaitingOnAddress()
In all cases the vector being supplied is empty, so we can just return
by value in these instances.
2018-08-05 16:29:17 -04:00
Lioncash
ca96f8db4e gdbstub: Replace PAddr alias with VAddr
In all cases, a virtual address is being passed in, not a physical one.
2018-08-05 15:56:01 -04:00
bunnei
fd715e54a1 gl_shader_decompiler: Fix TEXS mask and dest. 2018-08-05 01:47:09 -04:00
bunnei
ce46fb27ca
Merge pull request #926 from ogniK5377/vertex-attrib-format
gl_rasterizer: Fix glVertexAttribFormat for integers
2018-08-05 01:38:54 -04:00
bunnei
b46df98e93 audio_core: Implement audren_u audio playback. 2018-08-04 21:54:30 -04:00
David Marcec
b96010bfa9 added braces for conditions 2018-08-05 11:36:55 +10:00
David Marcec
6d1e30e041 fix the attrib format for ints 2018-08-05 11:29:21 +10:00
bunnei
a0a605df06
Merge pull request #924 from lioncash/arp
service: Add arp services
2018-08-04 21:20:26 -04:00
bunnei
cd96c04339
Merge pull request #921 from lioncash/view
core/crypto: Minor changes
2018-08-04 21:17:10 -04:00
bunnei
1dee8ceda1 audio_core: Use s16 where possible for audio samples. 2018-08-04 18:22:58 -04:00
bunnei
f1cb3903ac audio_core: Port codec code from Citra for ADPCM decoding. 2018-08-04 18:22:58 -04:00
Lioncash
de72956181 service: Add arp services
Adds the basic skeleton of the arp services based off the information
provided by Switch Brew.
2018-08-04 18:01:12 -04:00
Lioncash
df51207ed2 service: Remove redundant #pragma once directives
These don't do anything within .cpp files (we don't include cpp files,
so...)
2018-08-04 17:39:08 -04:00
Lioncash
0d04ee97dc aes_util: Add static assertion to Transcode() and XTSTranscode() to ensure well-defined behavior
These functions should only be given trivially-copyable types.
2018-08-04 17:30:52 -04:00
Lioncash
64c8212ae1 aes_util: Make CalculateNintendoTweak() an internally linked function
This function doesn't directly depend on class state, so it can be
hidden entirely from the interface in the cpp file.
2018-08-04 17:30:48 -04:00
Lioncash
b25468b498 aes_util: Make Transcode() a const member function
This doesn't modify member state, so it can be made const.
2018-08-04 16:49:42 -04:00
Lioncash
8da651ac4d core/crypto: Remove unnecessary includes 2018-08-04 16:44:07 -04:00
Lioncash
c1f76abfaf key_manager: Use regular std::string instead of std::string_view
The benefit of std::string_view comes from the idea of avoiding copies
(essentially acting as a non-owning view), however if we're just going
to copy into a local variable immediately, there's not much benefit
gained here.
2018-08-04 16:37:30 -04:00
bunnei
02fccc0940 cubeb_sink: Support variable sample_rate and num_channels. 2018-08-04 15:30:10 -04:00
Zach Hilman
2cc962e171 content_archive: Add support for titlekey cryptography 2018-08-04 14:57:21 -04:00