Commit Graph

95 Commits

Author SHA1 Message Date
Mat Sutcliffe
0c78c187f8 Issue #77 Style 2020-08-28 00:45:27 +01:00
Mat Sutcliffe
670b1a1986 Fix cppcheck and compiler warnings 2020-06-29 18:34:16 +01:00
Klaus Basan
8d51c42cfc Ref T784, joystick (PTT) buttons
* style
* more detailed logs
2020-06-12 18:42:56 +01:00
Mat Sutcliffe
1f0c65135d Use qmake $$files function to match wildcards
See https://bugreports.qt.io/browse/QTBUG-81003
2020-01-07 19:57:24 +00:00
Klaus Basan
857e3581b0 Ref T730, style
* set object name
* use m_XYZ member name
2019-10-11 19:00:43 +01:00
Klaus Basan
bad8ad2a8e Ref T650, added more hotkeys such as OEM keys
* based on http://www.kbdlayout.info/
* OEM key solves accent / dead key issue for most cases
* Mac/Linux parts still missing
2019-05-13 11:21:04 +02:00
Klaus Basan
6ff118b3c0 Ref T645, minor style changes 2019-05-13 11:21:04 +02:00
Klaus Basan
74e7fa46b6 Ref T645, added space/dead grave as hotkeys 2019-05-13 11:21:03 +02:00
Roland Rossgotterer
e279b77ca6 Add Windows Joystick hotplug support
A hidden window will listen for device attached and removed signals from Windows. In case such a event occurs, all devices are enumerated again.
ref T587
2019-05-13 11:20:47 +02:00
Klaus Basan
9287713cb8 Ref T606, added back/tab/ESC as hotkeys 2019-05-13 11:20:37 +02:00
Klaus Basan
df119c6e98 Ref T585, only use push buttons as direct input devices 2019-04-11 22:12:13 +01:00
Klaus Basan
a9967e2002 Style 2019-04-11 22:12:13 +01:00
Klaus Basan
e04cb84656 Ref T582, improved joystick error handling
* display details
* hr to string
* reduce number of messages
2019-04-11 22:12:06 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Roland Rossgotterer
e5c435f281 Add function to retrieve all available joystick buttons 2019-02-22 20:36:23 +00:00
Roland Rossgotterer
a36ae7b680 [MacOS] Change keyboard implementation to IOKit 2019-02-22 20:35:48 +00:00
Roland Rossgotterer
cc620698c6 [MacOS] Implement joystick support
Maniphest Tasks: T508
2019-02-22 20:35:48 +00:00
Roland Rossgotterer
6d905f2132 Fix crash and memory leaks in MacOS' keyboard implementation 2019-02-22 20:35:18 +00:00
Mat Sutcliffe
7cb581f865 Ref T488 Fixed cppcheck warnings. 2019-02-22 20:34:57 +00:00
Mat Sutcliffe
225ff81252 Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API. 2019-02-22 20:34:55 +00:00
Mat Sutcliffe
462172a87f Fixed clazy warnings: unnecessary containers and containers being detached in range-for loops. 2019-02-22 20:23:37 +00:00
Mat Sutcliffe
9f85a7b560 Fixed clazy warnings: pass large objects by reference to const. 2019-02-22 20:23:33 +00:00
Mat Sutcliffe
82679a3010 Replace qmake variable BLACK_CONFIG with a system based on json files.
The config is loaded from json files by qmake, and we define the qmake
function `swiftConfig` for checking whether a feature is enabled.
This function can be directly used in `buildconfig_gen.cpp.in`,
so the trick with C++ comment tokens in variables is not needed.
2019-02-22 20:23:25 +00:00
Roland Winklmeier
0f140cb155 Add more special key codes to keyboard keys
ref T404
2018-11-16 02:49:51 +01:00
Roland Winklmeier
5ee8bbe467 Properly initialize and cleanup DirectInput
ref T391
2018-11-04 17:42:42 +01:00
Roland Winklmeier
4b3d3bba48 Destroy DirectInput helper window during shutdown 2018-11-04 17:42:42 +01:00
Klaus Basan
00868c8147 Ref T391, temp. workaround to avoid shutdown crash 2018-10-07 18:58:00 +02:00
Klaus Basan
24ee4da4f9 Ref T391, style 2018-10-07 18:56:53 +02:00
Roland Winklmeier
c42900f959 Release input devices when application is shutdown
If they are released with the deallocation of CInputManager, we might
run into global deallocation hell.
Also on Windows release all DirectX devices before COM library is closed.

ref T391
2018-10-07 16:17:26 +02:00
Roland Winklmeier
7f1d1847ca Revert back to DirectInput COM initialization
Using and linking against DirectInput libraries directly caused dinput.dll
to be loaded at startup time. Windows 10 kills applications started from
services (as the Jenkins slave service) that load dinput.dll.
This commit also adds some safety in case no helper windows could be created.
2018-10-05 17:39:58 +02:00
Roland Winklmeier
84f1e21cf8 Add support for multiple Joystick devices
This includes a major refactoring of the Linux and Windows implementations
Each joystick device is now its own QObject. They all setup their own
native device instances and poll the button states.
On Windows, COM initialization has been removed since it caused segfaults
while releasing the DirectInput8 instance.

ref T254
2018-10-03 03:03:40 +02:00
Roland Winklmeier
f62ab3266f Implement log message fixmes in joystickwindows.cpp 2018-10-03 03:03:40 +02:00
Roland Winklmeier
89ab1a0138 Add alternative method to poll keyboard state on Windows
It seems that Windows is frequently disconnecting the keyboard hook
(eventually if swift was too busy processing messages) and caused all hotkeys
to be unreliable.
Instead use a polling mechanism. The previous method is kept in code for
testing, but is disabled by compile time switch.
2018-10-03 03:03:40 +02:00
Roland Winklmeier
324e16121e Correct wrong variable types in CKeyboardWindows 2018-10-03 03:03:40 +02:00
Roland Winklmeier
84dcc53dc0 Misc clang warning fixes 2018-08-25 22:12:07 +02:00
Roland Winklmeier
a60ee4a7dd Use override for destructors 2018-08-25 22:12:06 +02:00
Roland Winklmeier
9b3b645c12 Use nullptr 2018-08-25 22:12:05 +02:00
Klaus Basan
48738c87ab Keyboard and input manager cleanup/style 2018-08-22 12:32:06 +02:00
Klaus Basan
d39978a1d0 Style 2018-06-13 13:59:38 +02:00
Roland Winklmeier
4aaccb44c3 Cleanup the enabled modules in all sub projects
Most modules were just enabled to add include path for dependent headers
2018-06-02 02:08:46 +02:00
Klaus Basan
d3f46f948a Ref T254, joystick windows avoid crash when shutting down
Temp.workaround, we do not really understand why it crashes here.
2018-04-05 02:52:36 +02:00
Klaus Basan
80c9030bdd Formatting 2018-04-05 02:52:32 +02:00
Klaus Basan
d71e98def3 Changed joystick search class
This finds Saitek controls at KB's place
2018-02-22 13:58:41 +01:00
Klaus Basan
2bbc433d30 Formatting 2018-02-22 01:26:42 +01:00
Klaus Basan
602373c97a Ref T254, avoid crashes when there is no input device
* init with nullptr
* formatting
2018-02-22 01:26:39 +01:00
Klaus Basan
be6b67f95d Filter joystick devices with 0 buttons
ref T254
2018-02-22 01:26:36 +01:00
Roland Winklmeier
f53ec46d20 Change the operating system name from OSX to MacOS everywhere
Summary:
- Changed the name in all build artifacts
- Everywhere in C++

Reviewers: #swift_pilot_client, kbasan

Reviewed By: #swift_pilot_client, kbasan

Subscribers: jenkins

Maniphest Tasks: T205

Differential Revision: https://dev.swift-project.org/D69
2017-12-06 22:50:19 +01:00
Roland Winklmeier
f0bfad40b7 Remove outdated todos
Summary: This commits removes todos which are done or obsolete.

Reviewers: kbasan, msutcliffe

Reviewed By: kbasan

Differential Revision: https://dev.swift-project.org/D6
2017-05-05 22:40:01 +01:00
Mathew Sutcliffe
e3fe8ec39f refs #937 Resolved clazy warnings: miscellaneous. 2017-04-19 19:31:50 +01:00
Mathew Sutcliffe
fce1513dae refs #937 Resolved clazy warnings: unnecessary detaching of containers. 2017-04-19 19:31:38 +01:00