Commit Graph

193 Commits

Author SHA1 Message Date
Henrik Rydgård c29f81da36 Fix issue with the collapsible sections in control mapping collapsing on every change. 2024-01-29 17:57:01 +01:00
Henrik Rydgård 3895cfff74 Add "Analog trigger threshold" setting, for conversion of analog trigger inputs to digital button inputs. 2023-12-28 13:36:03 +01:00
Henrik Rydgård e47791d4c4 Remove unnecessary vector 2023-12-21 11:16:10 +01:00
Henrik Rydgård 9cb3d03098 Add categories for control bindings 2023-12-20 16:20:26 +01:00
Henrik Rydgård 2d4e59eb62 Control mapping UI: Fix bug where we warn about combo mappings unnecessarily for axis input 2023-12-20 15:37:46 +01:00
Herman Semenov 95f535dab0 [UI/Windows] Object out of scope optimization for better codegeneration (lower level scope) 2023-12-20 12:35:02 +03:00
Henrik Rydgård 812b1024f0 Move TouchTestScreen to DevScreens 2023-12-14 19:01:19 +01:00
Henrik Rydgård b941f40b32 Remove unused function 2023-12-14 19:01:18 +01:00
Henrik Rydgård b78c7ad470 Merge pull request #18545 from GermanAizek/const-ref-params
Objects in function parameters have been replaced with constant references
2023-12-14 13:49:33 +01:00
Herman Semenov 3d422b11c0 [GPU Common Vulkan/UI/Windows Debugger] Added const reference for function params 2023-12-14 14:23:31 +03:00
Henrik Rydgård a6d717cb39 Add option in dev tools to ask Android for 60hz display using Surface.setFrameRate
Might help #18514 and #18480 if we're lucky.
2023-12-12 15:30:39 +01:00
Henrik Rydgård e8f70594a4 Implement running the game in the background on the pause screen. Fix some bugs. 2023-12-11 12:41:44 +01:00
Henrik Rydgård 22295a6412 Plumb through a ScreenRenderMode parameter 2023-12-10 13:05:17 +01:00
Henrik Rydgård ee93e4a2ca Batch axis events all the way into ControlMapper 2023-09-29 11:14:19 +02:00
Henrik Rydgård b501abf576 Add more display information to system info. 2023-08-30 17:38:22 +02:00
Henrik Rydgård 2b7fe0d729 Cleanup: callbacks->lambdas 2023-08-24 11:08:43 +02:00
Henrik Rydgård be2f81c3eb Controls: Make the analog/digital mapping clash resolution more gentle.
Now takes the time into account, so clashing digital input will only shrink
analog inputs once it's a few seconds old.

Also fixes a bug where if there are both inputs, it was hard to reach
the limits because the digital input itself ended up getting shrunk.

This might help #17860
2023-08-23 18:51:27 +02:00
Henrik Rydgård bed06f46d7 Bugfix: Also check the allow-combo setting for analog inputs. 2023-07-11 11:00:57 +02:00
Henrik Rydgård 952e125c7e Break out rendering of "notices" from OnScreenDisplay. They can now also be used as views.
Use it for the new message in ControlMappingScreen, when you try to map
a combo when that's disabled. It'll have more uses.
2023-07-07 15:23:19 +02:00
Henrik Rydgård b9327073bb Add checkbox controlling if new mappings can be combo mappings.
These can be problematic with certain controllers that send double
signals. Like PS4 controllers on Android, the analog triggers send dual
axis events, and additionally digital events.
2023-07-07 10:42:08 +02:00
Henrik Rydgård 356cc64eb5 Logging improvements, cleanup 2023-07-06 14:56:52 +02:00
Henrik Rydgård fc3f7da3af TouchTestScreen: Have 8 entries logged instead of 2. 2023-07-06 11:48:25 +02:00
Henrik Rydgård 4f1be34f24 Revert "Remove the Android display resolution selector"
This reverts commit ea0eaa31e6.
2023-05-17 09:37:15 +02:00
Henrik Rydgård 311a1a0fe2 Fix glitch when mapping analog inputs, caused by multiple TriggerFinish caused by stray analog axis events.
ADd some guards all over the place against the same thing.
2023-05-06 15:33:28 +02:00
Henrik Rydgård cd33b79ae7 Fix an issue where stray KEY_UP events could confuse the control mapper into setting empty events
This had some not-so-good consequences, like inability to map anything
in VR, and sometimes empty MultiMappings would result that we could end
up asserting on before the previous commit.
2023-05-05 23:00:01 +02:00
Henrik Rydgård eec1ad5a75 Add some checks to try to prevent empty MultiInputMapping from arising, assert->log 2023-05-05 22:26:44 +02:00
Henrik Rydgård ee6234ecb6 I18N: Switch to getting categories by index instead of by string lookup
Also gets rid of the shared_ptr usage, and generally makes things nicer.

Needed for later config refactorings, good to get in early.
2023-04-07 10:35:01 +02:00
Henrik Rydgård 4e0babc950 Add a "reset to default" for all float-slider settings
Unfortunately, the default values from the configs are not exposed
outside Config.cpp, so there's duplication.

Need to figure out how to do fix that, but it's out-of-scope for this
PR.
2023-04-05 10:50:53 +02:00
Henrik Rydgård 9146020aa4 Logic fix, optimization, remove hack. See post-comments on #17215 2023-04-01 22:45:26 +02:00
Henrik Rydgård c1b5aed9b7 Cleanup, confine g_controllerMap access to KeyMap.cpp 2023-04-01 20:28:42 +02:00
Henrik Rydgård 88e73801fe Fix the binding UI to support multi-bind 2023-04-01 17:51:45 +02:00
Henrik Rydgård 8c9fee064e Display multi-mappings correctly in the mapping list 2023-04-01 15:00:22 +02:00
Henrik Rydgård 0e1c42ce70 Plumb multimappings all the way through. 2023-04-01 13:50:57 +02:00
Henrik Rydgård 04321284c0 Remove redundant callback 2023-04-01 08:57:42 +02:00
Henrik Rydgård 025ec248e4 Don't need two SetCallback functions. 2023-03-31 11:11:46 +02:00
Henrik Rydgård 526b4f782d Fixes, add callback for analog virtual keys
Some fixes
2023-03-31 11:05:33 +02:00
Henrik Rydgård 26bf40c497 ControlMapper: Change the callbacks to be more suitable for the upcoming refactor. (#17209)
* ControlMapper: Change the callbacks to be more suitable for the upcoming refactor.

* SetAllButtons: Separate bits to set and bits to clear.

* Oops, missed committing some files somehow
2023-03-30 10:47:28 +02:00
Henrik Rydgård d00809ae53 Rename KeyDef to InputMapping and give it responsibility for Axis encoding 2023-03-29 11:59:31 +02:00
Henrik Rydgård 534896d2ab ControlMapper: Allow overriding PSP button event handling through a callback. 2023-03-28 00:23:18 +02:00
Unknown W. Brackets 441c940fa9 UI: Remove some unnecessary Host.h includes. 2023-03-25 17:19:21 -07:00
Henrik Rydgård 4c99712b60 And "immersive", "audio_resetDevice" 2023-03-22 23:52:38 +01:00
Henrik Rydgård ac47476253 And share_text, toast, recreate 2023-03-22 23:52:25 +01:00
Henrik Rydgård 5a55fd5fd3 And replace "graphics_restart", "toggle_fullscreen", etc 2023-03-22 23:52:15 +01:00
Henrik Rydgård 8b431b39ba Wrap the display globals in a struct (#16998)
* Wrap the display globals in a struct

Makes it easier to search/replace these, for future refactorings.

* Some renaming

* Qt buildfix, also fix the Qt build on Mac (got broken with battery changes)

* Attempt at buildfixing ios

* UWP buildfix
2023-02-25 13:09:44 +01:00
Henrik Rydgård a88bafff4d Break out the JoystickHistoryView 2023-02-01 14:58:16 +01:00
Henrik Rydgård 102607a6e8 Code style fixes, translation key fix, cleanup 2023-02-01 14:24:55 +01:00
Unknown W. Brackets 4cb37d4391 UI: Highlight buttons on press in visual PSP map. 2023-01-28 17:42:23 -08:00
Unknown W. Brackets 76c9ddc175 UI: Label visual PSP buttons on focus.
For clarity on what button they are and that they are focused.
2023-01-28 17:41:43 -08:00
Henrik Rydgård ea0eaa31e6 Remove the Android display resolution selector
I think its benefit is absolutely tiny if any, and causes a lot more
problems than it's worth. Bye.

Note that this isn't the rendering resolution selector, that will of
course still be there, but it's the "hardware scaler" resolution.
2023-01-11 22:53:42 +01:00
Henrik Rydgård c27689910e Break out ScrollView from ViewGroup.h, and PopupScreens from UIScreen.h 2023-01-11 10:56:31 +01:00