1
0
Fork 0
Commit graph

91 commits

Author SHA1 Message Date
Scott Giese
3c0d5661b5 Maintenance: cJSON
unguarded if statements... suppress warnings
2021-02-20 23:15:29 -06:00
Scott Giese
20c386a2f4 Maintenance: flite
fix whitespace and unguarded warning.
2021-02-20 11:09:12 -06:00
Scott Giese
01d912ad73 Maintenance: flite - unused variable 2021-02-20 10:07:27 -06:00
Scott Giese
92e34d5bf5 Maintenance: flite
logic error: Use of uninitialized variable.
clean up a few whitespace issues.
2021-02-20 10:06:23 -06:00
Scott Giese
9fdb3e2c2a Maintenance: flite - type safety
address of struct containing union.  explicit cast to suppress warning.
2021-02-19 23:49:30 -06:00
Scott Giese
2e6ee5c2d3 Maintenance: iaxclient - Prevent buffer overflow 2021-02-19 23:03:12 -06:00
Scott Giese
d73bc11cf5 Maintenance: iax_transfer
Set but unused return code.  Removed.
2021-02-19 22:48:14 -06:00
Scott Giese
580d069a1f Maintenance: Prevent buffer overflow 2021-02-19 22:43:44 -06:00
Scott Giese
0df12d9c60 Maintenance: _BSD_SOURCE is deprecated
_DEFAULT_SOURCE supercedes _BSD_SOURCE
Suppresses glib warning
2021-02-19 22:03:02 -06:00
Scott Giese
0019b22046 Code Maintenance - nullptr checking 2021-02-18 23:52:46 -06:00
Scott Giese
0555d70a37 HTS: Code Maintenance
Resolve logic bug
Strengthen type safety
Prevent buffer overrun
2021-02-18 23:17:46 -06:00
Automatic Release Builder
39f3a83a7e macOS joystick: reduce warnings on some devices
Don’t SG_WARN when we see an unhandled HID page or element, it’s not
necessary.
2021-02-04 10:31:17 +00:00
James Turner
ec30b0d5db HTS: fix a crash if malloc returns null
This is probably only a partial fix, but won’t hurt.

Sentry-Id: FLIGHTGEAR-39N
2020-12-18 14:02:03 +00:00
James Turner
fe17cfc84d Fix a crash on macOS if a joystick fails to open 2020-12-17 13:53:00 +00:00
Scott Giese
43c530b660 Modernize: std::string_literals 2020-12-05 14:25:59 -06:00
James Turner
329d3cdd13 PLIB includes fix from Florent 2020-09-29 12:30:34 +01:00
James Turner
22bad9db33 Fix for CMake/system libSGM issue: consistent path
Our copy of libGSM, and a system-wide version have different include
suffixes, so adjust the FindGsm.cmake so that the returned include-path
is consistent with our internal version.

See discussion in:https://sourceforge.net/p/flightgear/codetickets/2368/
2020-09-03 19:18:57 +01:00
Scott Giese
ad2bf3cd09 Revert "Resolve Deprecation Warnings"
This reverts commit 8cede3f065.
2020-08-30 17:58:36 -05:00
Scott Giese
5a29e7aade Resolve warning: Double Delete 2020-08-29 10:47:12 -05:00
Scott Giese
8cede3f065 Resolve Deprecation Warnings 2020-08-29 10:12:35 -05:00
James Turner
55e971f808 Asan: fix an Flite error found by Michael Danilov
We have been missing a build flag for FLite, to specify the alignment
of some unions. ASan detected this as access outwith allocated memory.
Fix is to pass a defining indicating we’re on a 64-bit system.

See discussion here:
https://sourceforge.net/p/flightgear/codetickets/2361/
2020-08-24 17:40:35 +01:00
James Turner
fef50310bf Cmake: fix some issues Scott spotted. 2020-08-23 18:15:07 +01:00
James Turner
87a7221051 Linux Cmake fixes 2020-08-23 11:31:37 +01:00
James Turner
47ff3e9f67 Improve CMake strucutre 2020-08-23 11:31:37 +01:00
James Turner
2084e11d60 Trying to fix read of uninitialised memory on Linux
This should ‘already work’, but seeing if this makes any difference.
2020-08-12 15:30:33 +01:00
James Turner
3bbb9ed9ac Update to latest Sqlite.
Amongst other things, this fixes a warning with newer macOS SDK version
(use of OSAtomic which is deprecated).
2020-06-22 10:25:51 +01:00
James Turner
dce282d7b8 Rename js.h -> FlightGear_js.h
Ensure we don’t get weird conflicts as our internal version is
starting to diverge from the original PLIB one.
2020-06-11 17:48:49 +01:00
James Turner
00cffc2f01 Allow correct re-init of joysticks on macOS
With this change, “Reload Input” will discover newly attached devices
on macOS, which previously did not work.

Also add correct detection of disconnected devices, which previously
was not handled well, especially with the new ‘keep trying to open
devices’ behaviour of FGJoystickInput.

Should fix:
https://sourceforge.net/p/flightgear/codetickets/2259/
2020-06-11 17:43:55 +01:00
James Turner
a7d8d9c2ab Use -fPIC for building Sqlite 2020-06-09 10:34:02 +01:00
James Turner
61ed9efac8 FreeBSD: Merge from fixes from martymac
These were applied to upstream PLIB, ensure they’re applied to our
fork
2020-05-09 14:22:13 +01:00
James Turner
67af9ebc25 Fix Cmake typo, don’t quote multiple definitions 2020-05-08 14:53:09 +01:00
James Turner
fe16551cf6 Better RelWithDebInfo flags for CL.exe 2020-05-08 14:32:40 +01:00
James Turner
96be636240 Fixing up HID event input on Mac/Windows
Removing old macOS separate input - the HID version is better in
every way.
2020-04-01 15:29:58 +01:00
James Turner
f93aadbae6 Clang: fix a warning (char used as array subscript) 2020-03-24 22:37:23 +00:00
James Turner
c2ce25136a Tweak HTS code to allow UTF-8 paths on Windows 2020-03-13 12:22:22 +00:00
James Turner
7e9930e871 Move fnt code from PLIB into 3rdparty
This enables us to fix TXF loading to use UTF8 paths, required for
handling non-ASCII paths on Windows.
2020-03-13 12:21:56 +00:00
Julian Smith
f3d1135320 Various fixes for building on OpenBSD. 2019-09-04 10:55:43 +01:00
James Turner
309aaa794f Flite always compiled now. 2019-06-03 16:51:08 +01:00
James Turner
84c5ea976b Try to make UDev detection quieter 2019-05-28 09:14:49 -07:00
James Turner
396d9e4c3b Soften the HID dependency, so we can build
without HID if the necessary 3rdparty libs are not found.
2019-05-28 17:09:58 +01:00
Florent Rougon
df352346ad jsWindows: fail gracefully when joyGetDevCaps() returns undocumented values
According to Pfeffer's report[1] and many other messages on the
Internet, joyGetDevCaps() can return the (so far) undocumented value
165, which some say is JOYERR_PARMS. Since this is a valid return code
for joyGetPosEx() (not joyGetDevCaps()!), handle a few return codes from
that function too, and don't throw an exception when joyGetDevCaps()'s
return value is not one of the documented ones (we simply can't trust
its documentation).

[1] https://sourceforge.net/p/flightgear/mailman/message/36657149/
2019-05-04 08:58:15 +02:00
Florent Rougon
a5792617f7 jsWindows: throw exception instead of using an assert
Since asserts can be compiled as no-ops, throw an exception rather than
doing assert(false), in case the code passed to
joyGetDevCaps_errorString() is not one of the expected values.
2019-04-30 08:14:35 +02:00
Florent Rougon
babf0ded0c jsWindows: add debug output
Every code path that causes a joystick to report notWorking() should now
have an associated error message logged with class 'input' at level
'debug' or higher.
2019-04-29 16:38:11 +02:00
Florent Rougon
8e0271d9f6 jsWindows: remove undefined behavior when joyGetNumDevs() > INT_MAX
If joyGetNumDevs() > INT_MAX, casting it to an 'int' leads to undefined
behavior. On the other hand, after the 'ident >= 0' test succeeded, it
is perfectly safe to use static_cast<unsigned int>(ident), since 'ident'
is of type 'int'. Then we get to compare two unsigned ints, which is
well defined.
2019-04-29 13:42:32 +02:00
James Turner
9d71d09072 Enable HID-input on Windows 2019-04-27 18:54:13 +01:00
James Turner
6366dea197 HID event-input debugging
Adding more debugEvents-enabled log output to HDI input
2018-10-04 12:17:01 +01:00
Ganael Laplanche
bc01619fe1 jsSetError() takes only two arguments (unlike ulSetError()) 2018-06-12 12:10:00 +02:00
Ganael Laplanche
327d8021d0 Add missing defines and includes from removed ul.h 2018-06-12 12:09:41 +02:00
James Turner
87e461bb7e Hopefully fix FreeBSD joystick support 2018-05-21 17:17:42 +02:00
James Turner
4a38fa7f19 Windows build fix 2018-05-04 08:31:11 +01:00