Commit Graph

182 Commits

Author SHA1 Message Date
sirmangler
aaa54ae2a7 Updated to 5.0-17430 for more optimisations! 2022-09-24 15:13:21 +01:00
Admiral H. Curtiss
02a967f786
InputCommon: Add equality operators to RawValue. 2022-09-24 01:44:21 +02:00
Admiral H. Curtiss
24a1fe32f1
InputCommon: Make RawValue constructors constexpr. 2022-09-24 01:38:09 +02:00
Minty-Meeo
73dfcc15a5 Use std::llround in MapFloat
I don't see why not.
2022-09-22 11:30:32 -05:00
sirmangler
25010e59e0 Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	CMakeLists.txt
#	Externals/Qt~upstream_master
#	Readme.md
#	Source/Core/Core/Config/MainSettings.h
#	Source/Core/DolphinLib.vcxproj
#	Source/Core/DolphinQt/CMakeLists.txt
#	Source/Core/DolphinQt/DolphinQt.vcxproj
#	Source/Core/UICommon/DiscordPresence.cpp
#	Source/Core/WinUpdater/WinUpdater.vcxproj
2022-09-14 19:26:41 +01:00
Admiral H. Curtiss
b8ca1b2907
InputCommon: Fix deadlock in EmulatedController::UpdateReferences(). 2022-09-07 22:37:24 +02:00
Admiral H. Curtiss
eccf527bf6
Merge pull request #9147 from jordan-woyak/imu-accel-weight-setting
WiimoteEmu: Expose IMU pointing accelerometer weight setting.
2022-07-07 23:17:47 +02:00
Admiral H. Curtiss
24498ca315
Merge pull request #10712 from tellowkrinkle/ControllerLocks
InputCommon/ControllerEmu: Use more locks
2022-07-05 11:39:48 +02:00
Jordan Woyak
4c409411ed DolphinQt: Don't show the advanced input settings on the main dialog. 2022-06-26 22:48:13 -05:00
Jordan Woyak
80d9e79cf1 ControllerEmu: Allow settings to be categorized as "advanced". Make "Virtual Notches" and "Gate Size" categorized as such. 2022-06-26 22:42:16 -05:00
Jordan Woyak
643f82539c ControllerEmu: Expose gate size setting for octagon analog sticks. 2022-06-26 22:33:44 -05:00
Jordan Woyak
1fc86cacd7 WiimoteEmu: Expose IMU pointing accelerometer weight setting. 2022-06-13 00:07:00 -05:00
TellowKrinkle
f9c6eb7b98 InputCommon/ControllerEmu: Use more locks
Loading configs while another thread is messing with stuff just doesn't feel like a good idea
Hopefully fixes Wiimote Scanning Thread crashes on startup
2022-05-31 20:17:37 -05:00
Brandon Sorensen
6bb8e5735d Added OSX supported for mouse input 2022-05-16 17:22:35 +02:00
SirMangler
6e857c6c51 Add Map to Morph Profile / Change to Alt Profile 2022-04-17 15:04:17 +01:00
SirMangler
afc0fb127d Updated to 5.0-15993 2022-02-25 18:06:17 +00:00
Desmondchaser27
4ac3c2b339
Add Feature For Morphball Profiles for Metroid Prime 3 (#91)
* Adding in morphball profiles.

* Fixing bug where profile didn't load immediately when selecting the profile nor when saving the current profile.

* One last change to remove leftover code.

* Fixing coding standard issues.  Moved morphball profile switch into a function in PrimeUtils to more consistent with Primehack, per PR request.

* Adding support for the PrimeHack tab on the standard "Emulated Wiimote" controller GUI.

* Quick rename to "Morphball Profile" on Metroid Wiimote controller just for uniformity with the standard Emulated Wiimote controller menu.

* Updating support for Morphball Profile to work on all the Wii versions of Metroid Prime series.

* Fixed bugs made when rushing... Yeah!
2022-01-29 19:34:59 +00:00
Jordan Woyak
78a9bdf04a InputCommon: Use value of "Modifier" button "Range" setting rather than always applying 50%.
Make "Clear" button reset "Modifier" "Range" settings to 50%.
2022-01-04 14:09:50 -06:00
SirMangler
9569d54f6b Refactor check for mouse support 2021-12-27 05:50:01 +00:00
Pokechu22
de7c78ef3d ControllerEmu: Hide the cursor if the input gate is disabled 2021-12-23 15:22:35 -08:00
Filoppi
1badceb455 ControllerInterface: fix UpdateReferences() deadlock
Removed useless locks to DeviceContainer::m_devices_mutex, as they were all already protected by m_devices_population_mutex.
We have no interest in blocking other threads that were potentially reading devices at the same time so this seems fine.
This simplifies the code, and I've adjusted a few comments which mentioned possible deadlock that should now be totally gone.

The deadlock could have happen if a thread directly called EmulatedController::UpdateReferences(), while another another thread also reached EmulatedController::UpdateReferences() within a call to ControllerInterface::UpdateDevices(), as the mentioned function locked both the DeviceContainer::m_devices_mutex and s_get_state_mutex at the same time.

The deadlock was frequent on game emulation startup on Android, due to the UpdateReferences() call in InputConfig::LoadConfig() and the UI thread triggering calls to ControllerInterface::UpdateDevices().
It could also have happened on Desktop if a user pressed "Refresh Devices" manually in the UI while the input config was loading.

Also brought some UpdateReferences() comments and thread safety fixes from https://github.com/dolphin-emu/dolphin/pull/9489
2021-11-20 16:54:36 +02:00
SirMangler
3eaa48d6a3 Metroid UI for GameCube 2021-11-15 01:57:29 +00:00
SirMangler
4190e5a45c Updated to Beta 5.0-14790 2021-08-15 10:09:23 +01:00
SirMangler
a35a52188e Do not display alt control name unless in Metroid UI 2021-08-15 08:47:01 +01:00
Pierre Bourdon
e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
SirMangler
cd11721d88 General Controller UI Improvements and Open Wiki Button 2021-06-18 13:23:26 +01:00
SirMangler
da3b6d4d6d Updated to Beta 5.0-14344 2021-06-18 11:56:36 +01:00
Filoppi
93e3e691f9 Expose Control Expression variables to mappings UI
-add a way to reset their value (from the mappings UI)
-fix "memory leak" where they would never be cleaned,
one would be created every time you wrote a character after a "$"
-fix ability to create variables with an empty string by just writing "$" (+added error for it)
-Add $ operator to the UI operators list, to expose this functionality even more
2021-05-24 02:38:06 +03:00
Filoppi
379ffc268d IMUGyroscope: make GetState update optional (on by default), fix const, clean code
My future PRs will split the UI state from the Emulation State of some of these emulated
controller values and this readies the code for it.
2021-05-19 20:51:35 +03:00
Filoppi
a19a0096db InputCommon: improve code that returns a controller attachment index
casting a value to a u32 when it's originally an int, and it's exposed as int to users,
could end up in cases where a negative number would result as a positive one.
This doesn't really affect the value range of the attachment enum,
still I think the code was wrong.

Heavily tested.
2021-05-19 20:51:34 +03:00
Filoppi
d43a06ff6a IMUAccelerometer: consistency of BoundCount checks
Similar to the guitar, only control[0] was checked, and that felt random.
2021-05-19 20:51:34 +03:00
Scott Mansell
9f91fb6447
Merge pull request #9688 from Filoppi/input_cleanup
Input cleanup
2021-05-14 20:51:33 +12:00
Filoppi
26f6648421 StickGate: add custom clamp value
Works exactly as before by default.
It will be used by my upcoming input PRs.
2021-05-12 18:27:24 +03:00
Filoppi
4625359a4f InputCommon: clamp the attachment setting max to its actual enum max
NumericSettings support a max, so let's use it.
It might not do much now, but the max and min values will be used to give visual feeback
in the UI in one of my upcoming input PRs
2021-05-12 18:27:24 +03:00
Filoppi
f4fec42165 Add mixed comments to input code, make some tooltip clearer 2021-05-12 18:27:23 +03:00
Filoppi
574477866f InputCommon: fix serialization of control expression with line breaks
The control expression editor allows line breaks, but the serialization was
losing anything after the first line break (/r /n).
Instead of opting to encode them and decode them on serialization
(which I tried but was not safe, as it would lose /n written in the string by users),
I opted to replace them with a space.
2021-05-12 18:25:56 +03:00
Filoppi
e9e41b925b InputCommon: follow coding conventions and rename GetState() to UpdateState()
And remove useless include
2021-05-10 23:48:10 +03:00
Filoppi
a261e61e9e InputCommon: add a ton of missing consts
fix some related grammar errors
only the ButtonManager required code changes
2021-05-10 23:48:10 +03:00
SirMangler
35cf0def0b Updated to beta 5.0-13963 2021-04-08 21:00:25 +01:00
SirMangler
3e69e1cdaf Merged with beta 5.0-13603 2021-03-28 02:15:27 +01:00
SirMangler
f861a72ab2 Fixed saving issue with Metroid Controller UI 2021-03-26 08:52:47 +00:00
SirMangler
7d635c40ce Slightly better impl for Metroid UI and fixed some bugs 2021-03-26 01:11:53 +00:00
iwubcode
8055919905 InputCommon: Allow for partial gyro mapping; for Free Look, this allows you to only pitch or only yaw 2021-03-17 20:58:33 -05:00
iwubcode
32d584a0f5 InputCommon: reduce number of image loads and texture cache invalidations by only running dynamic input textures once for all controllers 2021-02-27 17:29:48 -06:00
Shawn Hoffman
7e1df34735 rename InputCommon/ControllerInterface/Device to CoreDevice 2021-01-27 14:29:48 -08:00
Filippo Tarpini
a5a6ef8512
Fix a couple of typos
[committer note: fixed commit message style]
2021-01-05 15:24:21 +01:00
SirMangler
870d410b22 Merged with beta 5.0-13178 2020-12-20 22:40:43 +00:00
SirMangler
94c36606bd PrimeHack can now compile and run safely on all platforms.
This doesn't mean it will run perfectly on all platforms, Mac still doesn't have mouse support.
2020-12-10 18:13:32 +00:00
JosJuice
52c615f1b1 Remove a redundant i18n comment 2020-11-17 18:23:27 +01:00
Nick Michael
55dd3d7337 Virtual Notch settings and UI for octagonal stick 2020-11-03 22:06:27 +00:00