Commit graph

16460 commits

Author SHA1 Message Date
Morph
ed9df522ec controllers/npad: Add heuristics to reduce rumble state changes
Sending too many state changes in a short period of time can cause massive performance issues.
As a result, we have to use several heuristics to reduce the number of state changes to minimize/eliminate this performance impact while maintaining the quality of these vibrations as much as possible.
2020-11-15 23:33:20 -05:00
Morph
06bc7678ba configure_input: Hook up the vibration percentage spinbox
This allows setting the vibration strength percentage anywhere from 1% to 100%.
Also hooks up the remaining motion button and checkbox in the Controller Applet.
2020-11-15 23:33:20 -05:00
Morph
3281c3b1cb controllers/npad: Stop games from vibrating incorrect controllers
Fixes vibration in 1-2 Switch and potentially other games where they would vibrate both players' joycons at the same time.
2020-11-15 23:33:20 -05:00
Morph
f474cab023 hid: Fix controller rumble based on new research
This fixes the issue where rumble is only sent to the first controller.
Now, individual controllers can receive their own rumble commands.
2020-11-15 23:33:20 -05:00
Morph
82d901ae8b hid: Pop a struct of parameters instead of popping individual parameters
Some parameters need to be doubleword aligned due to the presence of the applet_resource_user_id.
Previously, this value was invalid in many commands where it was not doubleword aligned when popped.
2020-11-15 23:33:20 -05:00
Morph
dc7a9a7be2 hid: Reorder all HID commands
Reorders all HID commands in command id order.
2020-11-15 23:33:20 -05:00
Morph
c9937559f4 hid: Implement GetVibrationDeviceInfo
The first u32 describes the vibration device type which is a Linear Resonant Actuator used in Nintendo Switch controller hardware.

The second u32 describes the vibration device position, in this case distinguishing between left and right vibration actuators.

Pro Controllers have 2 LRAs each that can vibrate independently of each other, which means they have 2 distinct vibration device handles to distinguish between the two actuators.

Similarly for joycons, the left joycon can be distinguished from the right joycon through the vibration device handle since each joycon has 1 LRA.
2020-11-15 23:33:20 -05:00
Morph
8a35dd51ee hid: Stub InitializeVibrationDevice 2020-11-15 23:33:20 -05:00
Morph
294f3dd914 controllers/npad: Rename NPadType to NpadStyleSet
This more accurately represents the underlying type and avoids confusion with NpadType
2020-11-15 23:33:20 -05:00
Morph
f279871f0b controllers/npad: Add DeviceHandle struct
A DeviceHandle describes a vibration device or six-axis sensor based on the npad type, npad id, and device index/position
2020-11-15 23:33:20 -05:00
Morph
b29a52982a configure_input_player: Change "Defaults" button behavior
RestoreDefaults() now restores the selected devices' mappings using UpdateMappingWithDefaults().
This allows us to move the keyboard mapping from RestoreDefaults() to UpdateMappingWithDefaults().
2020-11-15 23:33:20 -05:00
Morph
1c1a83a20d settings: Preparation for per-game input settings 2020-11-15 23:33:20 -05:00
Morph
5eb160d4c6 udp/client: Reduce testing period to 5 seconds 2020-11-15 23:33:19 -05:00
Morph
82d18bcf61 config: Migrate config files into config/custom
Co-authored-by: lat9nq <lat9nq@virginia.edu>
2020-11-15 23:33:19 -05:00
Morph
0a85f0fd25 controllers/npad: Connect a controller on init if none are connected 2020-11-15 23:33:19 -05:00
Morph
a7dd4f21dd applets/controller: Auto accept a valid single player configuration 2020-11-15 23:33:19 -05:00
Morph
d1d564db07 bootmanager: Allow mouse clicks only if touch is disabled
Previously mouse clicks will not register when touch is disabled.
This rectifies that and allows mouse clicks to be mapped to other buttons if the touchscreen is disabled.
2020-11-15 23:33:19 -05:00
Morph
c3a9d5de40 input_profiles: Implement input profiles 2020-11-15 23:33:19 -05:00
Morph
ad9a909bc7 configure_input_player: Implement input exclusivity and persistence
With this, the "Input Devices" combobox should accurately reflect the input device being used and disallows inputs from other input devices unless the input device is set to "Any".
2020-11-15 23:33:19 -05:00
Morph
4999d2443d ui/themes: Cleanup UI 2020-11-15 23:33:19 -05:00
Lioncash
eccf766a39 motion_input: Mark constructor as explicit 2020-11-15 14:20:41 -05:00
Lioncash
93312282aa motion_input: Mark member functions as [[nodiscard]] where applicable 2020-11-15 14:18:09 -05:00
LC
ef3e76578a Merge pull request #4914 from lat9nq/gl-warnings
bootmanager: Log and show GL_RENDERER string when GPU is insufficient
2020-11-15 06:33:48 -05:00
bunnei
6c12c7afc9 Merge pull request #4895 from Morph1984/cave-story-plus-applet-fix
applets/controller: Introduce additional checks for mode and caller
2020-11-12 21:55:06 -08:00
ReinUsesLisp
bdd8e12504 maxwell_3d: Use insert instead of loop push_back
This reduces the overhead of bounds checking on each element.
It won't reduce the cost of allocation because usually this vector's
capacity is usually large enough to hold whatever we push to it.
2020-11-11 19:52:19 -03:00
ReinUsesLisp
45cfd67ae6 maxwell_3d: Move code to separate functions
Deduplicate some code and put it in separate functions so it's easier to
understand and profile.
2020-11-11 19:52:19 -03:00
german
fbab229893 fix minor clang error 2020-11-10 10:38:15 -06:00
bunnei
ca2f385e38 Merge pull request #4901 from bunnei/caps-stub
hle: service: caps_u: Stub GetAlbumFileList3AaeAruid.
2020-11-09 21:20:08 -08:00
Chloe Marcec
d8f879952c Addressed issues 2020-11-10 15:57:36 +11:00
Chloe Marcec
f0b74aa725 core: Make nvservices more standardized 2020-11-10 15:57:35 +11:00
lat9nq
0a7e008b49 bootmanager: Address review comments
Changes QMessageBox usages to warnings, as the problems they bring to
light are being safely handled by the application and do not warrant
something of the "critical" level.

Changes LOG_CRITICAL to LOG_ERROR for the same reason. Preferring ERROR
to WARNING as yuzu is denying loading of any guest applications after
checking for these conditions.

Moved logging the GL_RENDERER string into GetUnsupportedGLExtensions()
to make more clear that unsupported extensions were already being
logged. Makes placement of the logs easier to understand later, as well.
2020-11-09 22:55:05 -05:00
lat9nq
690801e4fe bootmanager: Log and show GL_RENDERER string when GPU is insufficient
Changes the first message to not include the OpenGL version, as the
error is caused by OpenGL failing to load.

Adds a new check for OpenGL version 4.3. This will display a message
with a similar error as well as the GL_RENDERER string. Adds a CRITICAL
log message when triggered. This prevents a crash with yuzu trying to
use older OpenGL versions.

Modifies the unsupported extension message to output the GL_RENDERER
string in the message, as well as logging the string.
2020-11-09 22:12:41 -05:00
Rodrigo Locatti
88898861a6 Merge pull request #4909 from lioncash/interrupt
cpu_interrupt_handler: Mark move contructor/assignment as deleted
2020-11-08 22:09:40 -03:00
Rodrigo Locatti
b438d575a5 Merge pull request #4910 from lioncash/service
ipc_helpers: Remove usage of the global system instance
2020-11-08 19:11:31 -03:00
Lioncash
e7fe020ace ipc_helpers: Remove usage of the global system instance
Resolves numerous deprecation warnings throughout the codebase due to
inclusion of this header. Now building core should be significantly less
noisy (and also relying on less global state).

This also uncovered quite a few modules that were relying on indirect
includes, which have also been fixed.
2020-11-08 15:58:11 -05:00
Lioncash
9568c94a11 cpu_interrupt_handler: Mark move contructor/assignment as deleted
The interrupt handler contains a std::atomic_bool, which isn't copyable
or movable, so the special move member functions will always be deleted,
despite being defaulted.

This can resolve warnings on clang and GCC.
2020-11-08 15:37:04 -05:00
german
b1f65683bc Allow to dial any angle with digital joystick 2020-11-08 09:15:33 -06:00
Morph
a7bee25d73 applets: Rename LibraryAppletVersion to ControllerAppletVersion 2020-11-08 10:04:12 -05:00
Morph
02b6d04d64 applets/controller: Pop normal data for StrapGuide and FirmwareUpdate 2020-11-08 09:35:25 -05:00
Morph
5c26e16783 applets/controller: Introduce additional checks for mode and caller
Some games like Cave Story+ set invalid values in the ControllerPrivateArg's mode and caller fields.
Use other fields to determine the appropriate mode and caller should either or both fields be invalid.
2020-11-08 09:35:25 -05:00
Morph
eca32e90db applets/controller: Add ControllerUpdateFirmwareArg struct 2020-11-08 09:35:25 -05:00
bunnei
d52953b66e Merge pull request #4903 from bunnei/remove-gpu-integrity
video_core: dma_pusher: Remove integrity check on command lists.
2020-11-08 02:48:22 -08:00
Chloe
7a55a930aa Merge pull request #4908 from lioncash/fmt
externals: Update fmt to 7.1.2
2020-11-08 20:26:03 +11:00
Lioncash
fd41d21896 externals: Update fmt to 7.1.2
Updates to the latest bugfix release of fmt.
2020-11-08 03:44:07 -05:00
LC
d52a8168a2 Merge pull request #4906 from lat9nq/log-cpu-accuracy
settings: log value of CPU_Accuracy
2020-11-07 17:01:33 -05:00
lat9nq
ec0f96cdd1 settings: log value of CPU_Accuracy 2020-11-07 16:14:10 -05:00
bunnei
0b6324b3a6 video_core: dma_pusher: Remove integrity check on command lists.
- This seems to cause softlocks in Breath of the Wild.
2020-11-07 00:08:19 -08:00
bunnei
08056a8c3d Merge pull request #4888 from lioncash/unicorn-remove
core: Remove usage of unicorn
2020-11-06 22:39:05 -08:00
bunnei
479a52a8d4 hle: service: caps_u: Stub GetAlbumFileList3AaeAruid.
- This works similiar to GetAlbumContentsFileListForApplication.
- Since we do not implement the album, this should be safe to stub for now.
- Used by Super Smash Bros. Ultimate (newer updates) in World of Light.
2020-11-06 22:23:15 -08:00
bunnei
c952034426 Merge pull request #4899 from lioncash/fiberimpl
common/fiber: Move all member variables into impl class
2020-11-06 20:01:03 -08:00