1
0
Fork 0
Commit graph

346 commits

Author SHA1 Message Date
James Turner
4db129cb01 Guard against a null result from HID code.
It seems strange that CFGetTypeID on null would crash, but the reports
from users suggest this might be the case.
2016-11-20 22:42:48 +00:00
Torsten Dreyer
994ea1674b replace many auto_ptr by unique_ptr 2016-11-14 22:20:46 +01:00
James Turner
e2f7585d9c Use a Cmake imported target for SimGear 2016-10-30 22:15:54 +00:00
James Turner
c4f584dadf Rewrite Mac Event-Input code 2016-09-28 21:16:24 -05:00
James Turner
347a89c1f2 Extend event-input with report-setting.
Can generate feature report data via Nasal callbacks. This is used to
drive the GoFlight LCD / LEDs.
2016-09-28 21:16:24 -05:00
James Turner
b06f4208e4 Adjustments to mouse picking API 2016-07-31 22:44:03 +01:00
Jeremy Bicha
25928bf614 Use CMAKE_INSTALL_BINDIR
Allow /bin install directory to be overriden. Debian for example uses this
to install FlightGear to /usr/games/ instead of /usr/bin/

https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
2016-07-09 18:52:58 -04:00
James Turner
9cffcf63ae Further SGPath encoding fixes. 2016-07-01 04:54:29 -05:00
James Turner
6d0c2070fd Use future-proof SGPath APIs.
Remove uses of .str(), .c_str() and some other methods of SGPath.
Pass SGPath directly where possible, or explicitly convert to the
appropriate 8-bit encoding.
2016-06-28 10:08:38 +01:00
James Turner
03ecac9dbc Work with new SGPath API. 2016-06-22 17:36:05 +01:00
James Turner
861b682acf VS2015 fixes
Explicitly specialize these templates.
2016-06-01 22:57:11 +01:00
Torsten Dreyer
62d0d2ab06 event input system: be a little more helpful on errors 2015-11-02 11:42:30 +01:00
James Turner
70c4972f48 Fix a clang warning. 2015-04-11 21:59:37 +01:00
James Turner
f2d6b76b13 Portability: Fix compile errors on MSVC (cmath)
From Scott (xDraconian)
2015-03-24 11:11:42 -05:00
Torsten Dreyer
bca8b75a81 Allow input systems to be disabled
To avoid trouble when running multiple instances on one machine, disable
e.g. joystick input for second instance by
--prop:bool:/sim/input/no-joystick-input=true

Also allowed:
--prop:bool:/sim/input/no-event-input=true
--prop:bool:/sim/input/no-mouse-input=true
--prop:bool:/sim/input/no-keyboard-input=true
2014-11-06 22:27:59 +01:00
Thomas Geymayer
90f197fbc4 Do not assume there is a mouse mode with index 3. 2014-07-30 23:54:04 +02:00
Thomas Geymayer
88b7d4f530 Update for SGPropertyNode changes. 2014-03-06 00:41:41 +01:00
Philosopher
6870a88696 Fix for issue #999
Introduces delay-sec and release-delay-sec properties. The former is how
long to wait to run the binding(s) after pressing the button, the latter
is how long to wait after releasing the button. interval-sec now
specifies the delay before a repeat event occurs.
2014-03-05 00:33:45 +01:00
James Turner
f07042f7d7 Use binding-list fire helper. 2013-12-15 20:43:27 +00:00
Thomas Geymayer
39c41eaab9 FGLinuxEventInput: check return value of write. 2013-12-07 13:48:04 +01:00
James Turner
88aef8caf8 Reset: guard against picks during re-init 2013-11-16 12:28:56 +00:00
James Turner
5c97b7e713 Change tooltips to enable explicit.
Instead of using a negative delay to disable, make the setting
operate directly. This simplifies UI on top.
2013-10-25 09:18:59 +01:00
James Turner
52e5a9abe8 Reduce amount of log output at level=debug. 2013-09-28 14:47:20 +01:00
Tom Paoletti
81cd33e2fa Performance optimization: empty() instead of size()>0
empty() is guaranteed to be constant complexity for both vectors and lists, while size() has linear complexity for lists.
2013-08-19 09:01:59 +01:00
James Turner
6acf1c12fc Fix unused private vars.
Xcode is warning about these, they're a mixture of
copy-pasted code, evolved use (e.g. using a property
node to store state), and so on.
2013-07-04 20:24:56 +01:00
James Turner
b1b6d2f6e2 Namespace fixes for std::string 2013-06-27 09:53:12 +01:00
Thomas Geymayer
0239e9c8c8 Fix cursor hide timeout if hovering on canvas windows 2013-06-21 22:00:09 +02:00
Thomas Geymayer
d9881aecf8 Allow Canvas placed on 3D objects receiving mouse events.
- Add option 'capture-events' to canvas aircraft and scenery
   placements to allow events being forwarded to the respective
   canvas.
 - Clean up and restructure parts of the mouse event/picking
   handling to support forwarding events to canvasses.
2013-05-09 21:38:40 +02:00
James Turner
6bd8bbc25e Limit hover-picks to once per frame.
Hopefully fixes the observed issues on Linux when spamming
mouse-moves over a large pickable, but only testing will say for sure.
2013-03-28 17:52:08 +00:00
Anders Gidenstam
46eadabf3a Added support for tracking mouse movements with shift and control+shift pressed. 2013-03-13 21:20:17 +01:00
James Turner
4786923838 Tweak hover logic.
Fixes tooltips vanishing on mouse-move.
2013-03-11 17:13:03 +00:00
James Turner
67a0acb64a Live cursor updating during pick-drags.
This gives nice cursors when hovering and dragging slider and knob-animations, and the cursor is set correctly on mouse-up after the drag too. Makes directional knobs/sliders much easier to understand.
2013-03-10 12:06:20 +00:00
James Turner
0971ed1f2c Make tooltips independent of cursor auto-hide. 2013-03-10 10:17:27 +00:00
James Turner
b5a6812c95 Clean up mouse-input property handling.
Use a listener to avoid reading state each event/update. Support setting some values on the SGKnobAnimation configure global behaviour.
2013-03-08 16:34:21 +00:00
James Turner
30fcfd219e Pass key-mod state into pick-callbacks.
Allow pick-callbacks to get the current mod-state at all times. (Required for matching SG change)
2013-03-07 18:41:38 +00:00
James Turner
12bcea2861 Make Ctrl+axis bindings explicit (and work).
Thanks to Clement/F-JJTH for the fix.
2013-03-06 14:24:29 +00:00
James Turner
d5c382a780 Fix updating of mouse position props.
Some cockpits rely on mouse position props being updated even when using a dragged pick-callback. Thanks to Clement for noticing. Re-structured so however we process the mouse (PUI, pick-callback, normal motion), we always update the props.
2013-03-05 14:31:58 +00:00
James Turner
50c70035b3 More explicit check for cursor feedback. 2013-03-05 08:40:17 +00:00
James Turner
f2c267f5d7 MouseInput changes to support hover.
This adds the framework for platform cursor implementations; Windows and X11 to be done.
It also extend the mouse-input code to generate hover events suitable for driving tooltips.

Note there should be no visible functionality change from this commit, since everything
is inactive until fgdata changes are made.
2013-03-04 23:35:30 +00:00
Thomas Geymayer
6c10f99573 Make compiling of all utils/tools optional 2013-02-12 17:38:46 +01:00
James Turner
7b663cd7f7 Split huge NasalSys header apart. 2013-02-09 15:33:05 +00:00
Christian Schmitt
2013f7149d Some headers missing... ;) 2013-02-07 19:00:54 +01:00
James Turner
1a5b968d7e Update for tweaked SGPickCallback API.
(Requires corresponding SimGear commit)
2013-02-03 16:34:36 +00:00
James Turner
31995420d3 Guard libudev include with extern "C". 2013-01-30 20:49:50 +00:00
James Turner
11f15a9b36 Joystick/dialog caches, commit the transactions. 2013-01-25 09:30:31 +01:00
James Turner
37900e22a8 Wrap dialog and joystick stat-cache in a transaction.
Should improve startup times when the cache is rebuilt.
2013-01-24 09:27:09 +01:00
James Turner
e9ecf4eb52 Bug #923 : repeatable flag set on input reload.
Clean-up how axes and button bindings are destroyed are re-built on reinit of the FGJoystickInput subsystem, so we get new, cleanly initialised items each time.
2012-12-29 12:16:51 +00:00
ThorstenB
076bbb8487 Fix some compiler warnings.
Unused vars, loss of precision, bool type conversions.
2012-10-13 17:59:47 +02:00
James Turner
ae6218ff10 Restore named JS/input configs (overrides)
Thanks to jano for pointing out I'd broken this feature!
2012-09-25 14:20:18 +01:00
ThorstenB
293d6b3565 Fix compilation with enabled EVENT_INPUT
Need to move the definition to the toplevel cmake file, since sources
are no longer compiled on directory level (individual libs per dir).
2012-09-22 14:23:15 +02:00