Commit graph

610 commits

Author SHA1 Message Date
Matthew Parlane
f70a1a27fa Merge pull request #4726 from ligfx/addingwindowsheaders
Fix building without PCH on Windows
2017-01-24 13:47:36 +13:00
Michael Maltese
0bc40cacda No longer need to //clang-format off for Windows headers 2017-01-23 16:23:37 -08:00
Lioncash
a9da2d9e20 ControllerEmu: Add missing virtual destructor to BooleanSetting 2017-01-23 05:08:19 -05:00
Michael Maltese
713ec5ffd5 Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
Matthew Parlane
7ebfd357b5 Merge pull request #4699 from Orphis/cmake_cleanup
CMake cleanup (but wait, there's more!)
2017-01-21 16:38:09 +13:00
Florent Castelli
59fb8042d1 cmake: Add XInput file to the InputCommon target 2017-01-21 02:44:18 +01:00
Florent Castelli
6c197a8f6a cmake: Rename variable for libxi to X11_INPUT 2017-01-21 02:44:18 +01:00
Lioncash
794d0a9d7c Core: Move SI source files to their own directory 2017-01-20 19:33:24 -05:00
Matthew Parlane
753455b379 Merge pull request #4671 from endrift/fix-libusb
InputCommon: Fix FreeBSD 11 libusb incompatibilities
2017-01-17 21:43:08 +13:00
Jeffrey Pfau
c5b3b52d55 InputCommon: Fix FreeBSD 11 libusb incompatibilities 2017-01-17 00:30:08 -08:00
hthh
387164a999 macOS: Add missing includes to fix no-PCH build 2017-01-02 11:45:24 +11:00
Michael Maltese
905750553f ControllerEmu: Fix LoadDefaults to use ciface argument 2016-12-27 17:46:40 -08:00
Tillmann Karras
57a005ff3e evdev: reduce startup time
GetName() creates a new evdev device which calls tons of ioctls. But the
main culprit is close() which for input devices appears to be a slow
path in the kernel.

This commit reduces PopulateDevices() by 50% on my laptop, but ~730 ms
is still ridiculously slow for something that isn't needed right away.
2016-12-26 01:24:35 +01:00
Tillmann Karras
f575902cf3 evdev: set flag in a thread-safe way 2016-12-05 00:47:26 +00:00
Tillmann Karras
3c090a37d4 evdev: fix shutdown hang
Note: This probably means our approach of populating from udev isn't
safe to be called multiple times.
2016-12-05 00:47:26 +00:00
Anthony
ffe20705dd Merge pull request #4362 from ligfx/osxhotplug
ControllerInterface: enable hotplugging on macOS
2016-12-01 00:29:56 -06:00
Michael Maltese
7ed8fb95c5 ControllerInterface: enable hotplugging on macOS 2016-11-30 22:27:46 -08:00
Michael Maltese
3e69d066f5 ControllerInterface: replace Reinitialize with RefreshDevices
The SDL backend crashes when you close a joystick after SDL_Quit has
been called. Some backends don't need to be shutdown and
re-initialized everytime, we can just ask to enumerate devices again.
2016-11-30 16:07:55 -08:00
Michael Maltese
cebb4d84f2 ControllerInterface: clear devices before shutting down backends
The SDL backend faults if it tries to close a joystick after SDL_Quit
has been called.
2016-11-30 16:07:54 -08:00
aldelaro5
00f680b830 Add flexibility to InputConfigDialog
Removed the unecessary forced tabbed layout, removed the layout part of the constructor and remade some method in preparation for tabbed styled input dialog such as the new hotkey configuration one.  It breaks every inputconfigDialog, but this will get fixed in the next commits.

Also moved to a folder since there will be many more files created in the next commits so it gives better separation.
2016-11-28 08:26:27 -05:00
aldelaro5
7e99d03b7f Add the ability to get partial input group
For hotkeys, changed HotkeyManager to allow to get and make partial groups of hotkeys.

Also preserved the old configuration naming scheme for the ini, this is done to preserve compatibility with the older groups structure.

Add the ability to get GCPad control groups

Used like the HotkeyManager methods, this is used for the new GCPad configuration dialog.

Add the ability to get groups of Keyboard input

Same reasons as the previous ones.

Add ability to get groups of Wiimote input

Add the ability to get extensions group

This needed to pass to 3 classes.  Will be used for their respective dialogs.
2016-11-25 02:37:22 -05:00
Markus Wick
b9e4f67d3a Merge pull request #4405 from xrix4096/mac-unknown-joyaxis
Make analog triggers on PS3 controllers accessible on Mac
2016-10-31 13:01:47 +01:00
Markus Wick
2afa877119 Merge pull request #4376 from leoetlino/warning-fix
Warning fixes
2016-10-31 12:57:03 +01:00
Markus Wick
b9e4370023 Merge pull request #4383 from Sintendo/minor-text-fixes
Fix minor comment typos
2016-10-31 12:51:42 +01:00
Chris Pritchard
9da9ba616b Use the IOHIDElement cookie as a part of the axis name for unknown axis. Previously the 'usage' value was used to identify the axis by name, but this is not unique. For example on a PS3 controller *all* axis other than the well known ones return a usage of '1' so there are 30 or more axis all named "1". This stops things such as analog triggers being usable.
Using the element cookie uniquely identifies each axis and allows them to be assigned successfully as controls
2016-10-30 10:36:53 +00:00
JosJuice
1081497cad DiscIO/SConfig: Rename GetUniqueID to GetGameID
We call this "game ID" everywhere else, and it's not
actually completely unique.
2016-10-29 15:24:02 +02:00
Sintendo
f163bd1048 Fix various comment typos 2016-10-24 18:27:49 +02:00
Léo Lam
68156a02ed Fix -Wunused-result warnings 2016-10-23 00:43:08 +02:00
Léo Lam
39fd6dcd5b Fix missing includes
Aren't indirect includes great?
2016-10-07 23:46:41 +02:00
Léo Lam
fad17246db InputCommon: Fix formatting issues in Quartz
This wasn't caught by the lint script because it was broken (by me) at
some point :(

If it had been rebased, it wouldn't have passed lint
2016-10-03 18:59:52 +02:00
shuffle2
e38ddfd787 Merge pull request #4111 from EmptyChaos/startup-perf-langs
InputCommon: Fix slow startup on some Windows systems with language packs (Issue 9744)
2016-10-03 04:02:54 -07:00
shuffle2
2db2e88620 Merge pull request #4010 from leoetlino/relative-input
Add relative input for the Wiimote IR
2016-10-03 03:26:04 -07:00
shuffle2
2747fd3a0d Merge pull request #4102 from ligfx/quartz_input
Add Quartz/CoreGraphics controller interface for default k&m events
2016-10-03 03:13:58 -07:00
shuffle2
f71966866b Merge pull request #4230 from ligfx/build_vendored_libusb
Build vendored libusb with CMake if on Apple or not available system-wide
2016-10-02 21:17:01 -07:00
aldelaro5
f0aa9b3751 Reorganise a ton of logs level
Most of this commits changes performance decreasing logs from info to debug and also cleans up innacurate levels.
2016-10-01 15:50:28 -04:00
Michael Maltese
a403e37901 always build an implementation of GCAdapter (either libusb or android) 2016-09-28 13:32:13 -04:00
Léo Lam
149654df5a Add a recenter control for Wiimote IR relative input
This adds a recenter control binding which allows recentering the
cursor when relative input is enabled.

(EnableSettingControl is renamed to avoid confusions.)
2016-09-24 15:57:47 +02:00
Léo Lam
5cf07fdfbf Add relative input for the Wiimote IR
This adds an option to enable relative input for the Wiimote IR
as described in issue 9014.

Enabling it will result in the pointer not going back to the centre
and the inputs will control the direction, not the absolute position.

Also adds a Dead Zone setting which is really needed when relative
input is enabled to prevent the cursor from slowly drifting on
most controllers. (Note: the Deadzone setting has no effect when
relative input is disabled)
2016-09-24 15:57:46 +02:00
Scott Mansell
62d7a698da Merge pull request #4145 from tenthmile/WiiOrientationModifier
Emulated Wiimote Orientation Modifier
2016-09-07 14:20:02 +12:00
Jasper St. Pierre
928d05ec47 InputCommon: Remove the Xlib backend
The XInput2 backend is more performant, so let's default to it and
remove the old, core-only backend.
2016-09-04 10:44:22 -07:00
Jasper St. Pierre
2b640a4f7d XInput2: Only do a round trip when the mouse has moved
This should cut down on round trips and blocking calls dramatically
during gameplay.
2016-09-04 10:44:22 -07:00
Tim Maile
3266bf052a Toggle and Switches for upward/sideway WiimoteEmu 2016-08-28 12:47:24 +02:00
EmptyChaos
17e4bd9575 InputCommon: Fix slow startup on some Windows systems
Rewrite GetXInputGUIDS to use SetupAPI instead of WMI Queries. When
using a language pack where the system language and user/program
language differ, Windows starts taking a VERY long time (10+ seconds)
to complete Queries for Win32_PNPEntity objects (it's probably
translating every single string since it transfers every single one
from the WMI server into memory in the program).

Fixes Issue 9744.
2016-08-11 09:30:36 +10:00
Michael Maltese
0f5951e324 And pull KeycodeToName into its own function 2016-08-09 19:59:45 -07:00
Michael Maltese
d1594f9529 use a std::map instead of running through the AOS 2016-08-09 19:54:59 -07:00
Michael Maltese
a5cc054bd1 use std::to_string instead of sstream 2016-08-09 17:45:41 -07:00
Michael Maltese
6097d30288 clang-format and cleaning up Key::GetName 2016-08-09 17:23:30 -07:00
Michael Maltese
3889e4d4b2 style fixes 2016-08-09 15:52:02 -07:00
Michael Maltese
3dc8136e14 Add Quartz/CoreGraphics controller interface for default k&m events 2016-08-08 09:38:22 -07:00
Lioncash
041f4f5eea GCAdapter: Return input state by value 2016-08-01 21:27:51 -04:00