Commit Graph
90 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5 375fa0fc11 Misc correctness fixes
GetStringErrorMsg had the strerror_r result test backwards. The XSI variant returns
0 on success, so every successful lookup returned "Unknown error"; and under glibc
with _GNU_SOURCE the GNU variant is selected instead, which returns the message by
pointer and typically leaves the buffer untouched, so it returned an empty string.
Either way GetLastErrorMsg() was useless on Linux, Android and macOS. Pick the right
handling by overload resolution rather than guessing which signature we got.

KeyMap's "no gamepad button mapped to cancel" fallback pushed into confirmKeys
instead of cancelKeys - and pushed the confirm button. So unmapping cancel left no
gamepad way out of menus, and duplicated an entry in the confirm list.

ControlMapper::AddListener mutated listeners_ without taking mutex_, while
RemoveListener takes it and the input thread iterates the vector under it. Opening a
screen while an axis is moving could reallocate it mid-iteration. The comment about
piggybacking on a screenmanager mutex was stale - there isn't one.

Config's two std::stof calls on PostShaderSetting values ran on user-editable ini
text with no try/catch, so a malformed entry called std::terminate during startup
config load. Use the same checked sscanf that LoadGameConfig already uses.
(CmdLine.cpp and Compatibility.cpp have the same pattern; not touched here.)

The screenshot downscale path leaked its final buffer on every downscaled shot,
which savestate thumbnails hit on every save at 3x and above.

HandleUploadPost is registered unconditionally, so closing the Upload screen left an
unauthenticated file-write endpoint live for as long as anything else kept the server
up. Check the flag in the handler.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCPmm7FoQUoqrbMdhfqhQ2
2026-08-31 01:19:06 +02:00
Henrik Rydgård bc9a047ef1 Search: Skip spaces and control characters, code cleanup, fix minor issue on desktop 2026-05-11 11:45:04 +02:00
Henrik Rydgård b5bc36a37f Filter out problematic shortcut keys 2026-04-14 19:44:20 -06:00
Henrik Rydgård 232ea1a8a1 Add a "hold" version of the axis swap toggle. Often more convenient.
This is useful for working around some annoying control schemes.

Fixes #21354
2026-03-05 23:05:35 +01:00
Henrik Rydgård b40b4fc1d0 Fix adding excessive buttons to the UI input mappings 2026-03-04 12:03:01 +01:00
Henrik Rydgård 7fa52a0916 Fix problem with confirm button set to O.
Fixes #21042
2026-02-13 22:08:28 +01:00
Henrik Rydgård f546dc3835 Add an Enable checkbox to tilt control, add mappable control
- Fixes #20830
2026-02-05 09:44:11 +01:00
Henrik Rydgård 48d50fe712 Add strings for the two gesture zones 2026-02-04 15:01:06 +01:00
Henrik Rydgård 7d987cd78b Make fast_matrix_mul_4x4 inlineable 2026-01-30 14:10:32 +01:00
Henrik Rydgård 471b9846e0 Delete unused function 2026-01-28 09:22:35 +01:00
Henrik Rydgård 25d216a20a Release all keys and axes on game controller disconnect on Android 2026-01-26 11:08:55 +01:00
Henrik Rydgård 41bb9a04b3 Add visual notifications about game controller connect/disconnect 2026-01-26 10:57:41 +01:00
Henrik Rydgård 0543b34a27 Windows: Make joystick autoconfigure work with DualSense / DualShock devices 2026-01-25 16:18:53 +01:00
Henrik Rydgård 7d4cfdaf91 KeyMap: Add NotifyPadDisconnected, minor cleanup 2026-01-25 15:36:15 +01:00
Henrik Rydgård 14ddad5ce3 Change how defaults work in the inifile reader (more flexible this way) 2025-10-31 21:57:52 +01:00
Henrik Rydgård 5bfaaddedb Implement iOS keyboard mappings for Ctrl/Shift/Alt/Meta 2025-08-19 09:48:58 +02:00
Henrik Rydgård eadd32e00a Keycodes: Restore the old PrintScreen keymapping, fixing mistake from #19656
Fixes #20588
2025-07-08 14:03:04 +02:00
Henrik Rydgård a431560831 Remove pretense of supporting the Ouya (we don't anymore) 2025-02-24 15:57:38 -06:00
Henrik Rydgård e19705d10b Add new mappable key to pause without the pause menu. Useful for reading text for example.
This re-uses debug break/resume, so you can also add it as a hotkey for
that.
2025-01-17 15:35:37 +01:00
Henrik Rydgård caf27a5c0d Add a mappable key for toggling the imgui interface. For now it's called Toggle debugger. 2024-11-04 23:33:03 +01:00
Henrik Rydgård da2e5e76c4 Fix the Retroid controller defaults for the latest firmware. More standard now. 2024-10-23 13:23:38 +02:00
Henrik Rydgård 2613745cdd Add mappable devkit-only L2/L3/R2/R3 controls.
Can be used to bring up a debug menu in Castlevania: SOTN, see issue #17464

Could also be used in PPSSPP-specific homebrew, in theory.

Fixes #17464
2024-09-24 10:49:10 +02:00
Henrik Rydgård a33839d220 Add Reset as a mappable control 2024-09-18 14:18:04 +02:00
Lubos f56f696386 OpenXR - Cleanup 2024-08-08 12:35:45 +02:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Henrik Rydgård 338758f430 iOS: Fix "Home" button on controllers (like the PS logo button on a PS4 controller) 2024-06-05 15:01:02 +02:00
Henrik Rydgård d46a7ed228 iOS gamepad mapping: Better mapping, better defaults. Fixes the start button problem.
controller.controllerPausedHandler should not be set.
2024-05-26 11:12:13 +02:00
Henrik Rydgård e1b1ae449b Don't crash after mapping analog speed to a stick.
Fixes #18689
2024-01-16 14:32:42 +01:00
Henrik Rydgård 679b8330ff Add bindings for toggling mouse control and touch screen controls. Not bound by default.
I think I'll find myself using both of these for testing, feel worthwhile.

Suggested in #18464
2023-12-29 17:40:57 +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 16a31c2554 Avoid spamming the keymap lock during input processing 2023-12-21 11:54:30 +01:00
Henrik Rydgård e47791d4c4 Remove unnecessary vector 2023-12-21 11:16:10 +01:00
Henrik Rydgård 144ed7a3ab Reduce memory allocations during controller processing 2023-12-21 11:15:40 +01:00
Henrik Rydgård 9cb3d03098 Add categories for control bindings 2023-12-20 16:20:26 +01:00
Herman Semenov af41281761 [Core/Dialog/ELF/FileSystems/HLE/HW/Util] Added const reference for function params 2023-12-14 14:22:24 +03:00
Henrik Rydgård e8c5456021 Don't try to autoconfigure XInput controls on other platforms than Windows 2023-12-08 16:24:48 +01:00
Henrik Rydgård 85001bf71f Remove some redundant uses of MOBILE_DEVICE. Goal is to one day get rid of that define. 2023-12-07 17:30:15 +01:00
Henrik Rydgård 1da6da446b More std::string conversion 2023-11-13 23:43:57 +01:00
Henrik Rydgård 2910303d20 Clean up the checks for triangle-button-for-info on the main screen 2023-11-13 12:49:08 +01:00
Henrik Rydgård 12de5bdead Add hotkey to exit the app from within gameplay
Requested by bluemonkeyinsuit07 and trivial to implement, so..
2023-10-04 14:10:14 +02:00
Henrik Rydgård 3264209772 Add some missing locking in KeyMap.cpp.
Plus minor assert change and java null check.
2023-09-24 12:33:01 +02:00
Henrik Rydgård 0e56ed1f38 Android: Fix bug where autoconfigure for unknown pad types didn't do anything, instead of just doing the defaults. 2023-08-24 11:08:52 +02:00
Henrik Rydgård feb0ea245e Add mappable key to toggle networking
Fixes #17352

Requested in #17343
2023-08-23 22:14:51 +02:00
Henrik Rydgård 9a8919810b Translation cleanups 2023-08-01 13:04:52 +02:00
Henrik Rydgård ac4506e389 Stop "messages from java" to leak out to NativeMessageReceived except where explicitly allowed 2023-07-06 17:13:04 +02:00
Henrik Rydgård 2675d6ea43 Input event and device enums (#17514)
* Switch deviceID from int to enum InputDeviceID, globally

* Switch axisId to enum InputAxis

* Change int keycodes to InputKeyCode where it makes sense.

* SDL input buildfix

* SDL keycode buildfix

* Switch on enum warning fixes

* Qt keycode buildfix

* iOS keycode buildfix

* UWP keycode buildfix

* More iOS buildfix

* More iOS buildfix

* Update DinputDevice.cpp
2023-05-26 18:40:13 +02:00
Nicolas Adenis-Lamarre f32b0dc9c3 previous slot shortcut
Signed-off-by: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
2023-05-25 11:32:49 +00: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 c085990f21 Add locking around g_controllerMap 2023-05-04 09:49:14 +02:00
Henrik Rydgård 7594ae8785 Resurrect and refactor the AxisSwap feature. Fixes #17292 2023-04-20 10:53:11 +02:00