Commit graph

55 commits

Author SHA1 Message Date
Megamouse 4984e87776 implement interception for cellKb and cellMouse
this needs to be tested
2020-10-31 02:11:27 +03:00
Megamouse 0a121e9d26 DS4: Add error logging and remove some unused code 2020-10-27 15:25:08 +01:00
Bevan Weiss 04deb97f94 MSVC 16.8 Preview 3.1 compiler fix
The latest MSVC 16.8 Preview 3.1 cl.exe no longer likes the implicit conversion from false->std::shared_ptr
But it's happy with nullptr

Not the ideal solution, but it will kick the can down the road a little.
2020-09-23 12:44:32 +02:00
Megamouse 5d50602397 Qt/Input: fix default pad handler
We accidentally always saved keyboard to Player 1 if null was selected.
The new code will only apply keyboard by default if the config file was not found.
2020-09-22 06:59:38 +02:00
SEt 9a6aac1662
Improve pad support (#8800)
* Add support for another DS3 HID Report ID for Win7
* Add support for reading accel/gyro pad data over SCP
2020-09-16 22:36:06 +02:00
Megamouse f0053bfc1a Input/Qt: Dont lock unused mouse in keyboard pad 2020-09-09 00:22:48 +02:00
Megamouse 1dac01498c Update mouse lock logic
- fix headers
- update cursor whenever the mouse is moved
- unify cursor logic
- move m_mouse_hide_and_lock logic to handle_cursor (toggle_fullscreen is the trigger, not the handler)
- disable mouse lock and idle timer if the window is inactive
2020-09-02 14:22:00 +02:00
Bevan Weiss ae0e454fc2 Use dynamic_cast to convert QWindow m_target to gs_frame
Used to access get_mouse_lock_state rather than going through the QWindow property tables.

Modify mouse hide and lock to default OFF when entering Windowed mode, and to default ON when entering Fullscreen unless 'show cursor in fullscreen' is configured
2020-09-02 14:22:00 +02:00
Bevan Weiss ca3ee019cc GUI: Mouse Hide and Lock Keyboard Shortcut
This should address the second point of #4502.

A few notes:
1. it changes the current behaviour of the 'Fullscreen cursor'.  Currently it defaults to be captive.  This changes it so that it defaults to NOT being captive, but can be made captive with the CTRL+L key combination.
2. There are situations when in windowed mode it's possible to escape the captivity (it's like a minigame if you will).  This requires the mouse movement to exceed the bounds of the window in a single event scan.  It will just show up as a temporary visibility of the cursor when outside of the window bounds.  It's not too difficult to 'fix', but might not be a likely enough scenario to warrant either.
3. There currently isn't an ability to change what this keyboard combo maps to, but it's inline with a collection of other similar keyboard mappings.  I think adding such a more generic keyboard mapping system (not for just keypad items, but system items.. e.g. so that Emulator stop could be mapped to something other than CTRL+S etc) is a bit out-of-scope of this particular PR.
2020-09-02 14:22:00 +02:00
Megamouse 9af66e22da evdev: log axis information in pad settings 2020-08-18 18:29:35 +02:00
Megamouse 4d9533ea54 input: use left and right squircle values 2020-07-13 21:23:48 +02:00
Megamouse f1b1c9053c Input/Qt: Check if gui callbacks are nullptr 2020-07-04 14:28:19 +02:00
Megamouse b5f01372ee Windows: distinguish left and right modifiers
This is just some workaround until we either use a different input api for keyboards or until we refactor the keyboard_pad_handler to use Qt with native scan codes
2020-07-02 12:55:27 +02:00
Megamouse bec6bde919 Qt/Input: update keyboard_pad_handler shortcuts
This is just some patchwork before the shortcuts get refactored eventually
2020-07-02 12:55:27 +02:00
Megamouse 1f25924384 Qt/Input: remove unused function: GetModifierCode 2020-07-02 12:55:27 +02:00
Megamouse 5a8eb9d3d7 Input: skip keyboard input when pads are disabled 2020-06-26 09:28:58 +02:00
Megamouse ab4c40c988 pad_thread facepalm 2020-06-26 09:28:58 +02:00
Megamouse 76faaf43f7 Input: Use global variables for pad modifications 2020-06-26 04:42:52 +02:00
Megamouse eb5ec211c2 Input: remember registered ldd controllers
- Don't reset ldd pads when saving a pad config
- Prevent configuration of registered ldd pads in the gui while ingame
2020-05-13 11:17:58 +02:00
Megamouse 5c4b8e8dee Input: fix xinput deadzones 2020-05-06 09:33:38 +02:00
Megamouse d4606cfdb9 Input: remame some functions 2020-05-06 09:33:38 +02:00
Megamouse a568c958af evdev: simplify evdevbutton madness a bit
I hope this doesn't regress anything
2020-05-01 12:03:06 +02:00
Megamouse 2de6a9bc44 evdev: revert facepalm change 2020-05-01 12:03:06 +02:00
Megamouse 8e95c0e44d evdev: add keys used by wii controller driver
I'll probably rework the current system sometime soon so that I don't have to add keys every now and then
(or I'll just add them all XD)
2020-04-25 22:55:08 +02:00
Megamouse 3788ef3e27 evdev: fixup for relax controller criteria 2020-04-25 16:37:20 +02:00
Megamouse 3937733182 evdev: relax controller criteria 2020-04-25 10:50:38 +02:00
Megamouse de58f19866 input: add Rock Revolution Drum Controller product info 2020-04-25 10:17:48 +02:00
Megamouse e4cb9ef7cd cellpad: add pclass_profile flags 2020-04-25 10:17:48 +02:00
Megamouse 4e6d95c5b8 Qt/input/cellpad: enable product choice 2020-04-25 10:17:48 +02:00
JohnHolmesII 4838f72e50 Prevent unecessary copy in loop 2020-04-13 14:37:11 +03:00
RipleyTom dce81d4a66 fix AddLddPad when more than one ldd pad 2020-04-08 07:39:54 +03:00
Megamouse f0edcc16fe evdev: add more buttons to button list 2020-03-12 19:43:52 +01:00
Megamouse e7adef9fe1 evdev: remove unused call to update_device 2020-03-12 19:43:52 +01:00
Megamouse 9c5da55dca evdev: Some random cleanup 2020-03-12 19:43:52 +01:00
Nekotekina b4f416cb76 Fix narrow warning in ds4_pad_handler.cpp 2020-03-10 18:45:49 +03:00
Nekotekina e4a81b1d13 Move Log.h to util/logs.hpp 2020-03-07 12:29:23 +03:00
Megamouse 9e449db0c2 Qt/Input: piggyback on existing callback for battery_level
removes ds4 timer workaround
2020-03-05 22:37:48 +01:00
Adiost f776910966 Qt/Input: new ds4 LED settings 2020-03-05 22:37:48 +01:00
Nekotekina 7a8772dafa Replace std::string::npos with umax 2020-03-05 14:05:23 +03:00
gamerforEA 93552a5958 Apply some Clang-Tidy fixes 2020-02-27 00:38:55 +03:00
Megamouse f7666f44da Untangle GUI and input includes 2020-02-24 16:31:01 +01:00
Megamouse 7b49249f5f Input: Add config lerp factor for buttons and triggers
Adds new lerp factors to the keyboard pad handler In order to simulate triggers and analog buttons.
See "Analog Button Lerp Factor" and "Trigger Lerp Factor" in the yml in InputConfigs/Keyboard/.
Values Range from 0-100 as before, where 100 is instant press and 0 is never.

Currently I'm not planning any GUI element for this.
2020-02-24 08:56:57 +01:00
Megamouse 64ed2f1151 Input: use std::lerp instead of lerp template 2020-02-24 08:56:57 +01:00
Nekotekina 972e0ab31d Remove -Wno-reorder and make it an error 2020-02-21 15:20:34 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Nekotekina 8a176de6a1 Restore -Wenum-compare and fix some [=] warnings 2020-02-18 17:37:30 +03:00
Megamouse fe75311be2 move config structs to own files and clean up some headers 2020-02-17 15:08:17 +03:00
Nekotekina 21f7b0ff0f Remove HLE log channel 2020-02-01 11:52:24 +03:00
Nekotekina 3c0bd821c8 Give log channels fancier names
Improve LOG_CHANNEL macro to accept custom name.
2020-02-01 10:43:43 +03:00
Nekotekina d9a0619ddd Remove legacy GENERAL log channel
Add some more log channels instead.
2020-02-01 07:49:38 +03:00