Mai Lavelle
e714f6590e
haptic: Fix initial detection of haptic devices on Linux system
...
SDL_UDEV_Scan must be called during SDL_SYS_HapticInit to ensure devices
outside of the 0-31 range are added to the list of haptic devices.
Fixes Bugzilla #3923 .
2018-08-07 12:06:31 -04:00
Sam Lantinga
a37d3e0b1e
Backed out changeset 794a209b2270
...
It turns out the mapping is correct, just the name was confusing
2018-08-06 13:00:11 -07:00
Sam Lantinga
cc682f2013
Removed mapping for VID/PID 0x0079/0x0006, which is a generic PCB used in many different devices
...
Different device with same vid/pic that is kind of a Saitek shape:
https://www.trust.com/en/product/17416-gxt-24-runa-compact-gamepad
n64 with same ID
https://bbs.archlinux.org/viewtopic.php?id=163488
PS shaped with numbers for buttons
https://pineight.com/mw/index.php?title=USB_game_controller#DragonRise_Inc._Generic_USB_Joystick
fightstick with same vid/pid
https://retropie.org.uk/forum/topic/7594/bartop-2-player-zero-delay-encoders-not-working
2018-08-06 11:58:08 -07:00
Ozkan Sezer
f45f33bdc0
SDL_expf: return SDL_exp() instead of SDL_uclibc_exp() for consistency.
2018-08-05 10:01:01 +03:00
Ethan Lee
b4fe7412f9
SDL_exp
2018-08-04 11:52:46 -04:00
Ryan C. Gordon
e061a92dc9
Some drag'and'drop improvements.
...
First: disable d'n'd events by default; most apps don't need these at all, and
if an app doesn't explicitly handle these, each drop on the window will cause
a memory leak if the events are enabled. This follows the guidelines we have
for SDL_TEXTINPUT events already.
Second: when events are enabled or disabled, signal the video layer, as it
might be able to inform the OS, causing UI changes or optimizations (for
example, dropping a file icon on a Cocoa app that isn't accepting drops will
cause macOS to show a rejection animation instead of the drop operation just
vanishing into the ether, X11 might show a different cursor when dragging
onto an accepting window, etc).
Third: fill in the drop event details in the test library and enable the
events in testwm.c for making sure this all works as expected.
2018-08-02 16:03:47 -04:00
Ryan C. Gordon
8f0cc4a4b7
Backed out changeset 2e42ec46061e.
...
This change isn't correct. See comments in Bugzilla #4183 .
2018-07-22 19:42:08 -04:00
Ryan C. Gordon
1089944bee
libm: Fixed signature mismatches for __ieee754_rem_pio2 and __kernel_rem_pio2.
...
Fixes Bugzilla #4201 .
2018-07-22 19:40:42 -04:00
Ryan C. Gordon
862aa4b47d
windows: Fixed some Visual Studio warnings about shadowed variables.
...
Fixes Bugzilla #4118 .
2018-07-22 19:28:27 -04:00
Marc Di Luzio
c3178e67ca
Ensure we still clear the X locale modifiers even if not compiled with ibus or fcitx support
2018-07-12 16:52:45 +01:00
Ryan C. Gordon
b5a420cb11
dbus: Deal with undefined behavior with va_args.
...
Parse out a copy of the varargs ourselves to get to the reply portion, since
the original passed to D-Bus might modify or not modify the caller's copy,
depending on system ABI.
2018-07-13 17:53:24 -04:00
Sam Lantinga
df0d3f1364
More controller drivers support CARTESIAN coordinates.
...
This fixes rumble on the Saitek Cyborg V.3 Rumble Pad
2018-07-12 13:28:15 -07:00
Sam Lantinga
ff8c9538bc
Allow trapping the back button so right mouse click can work on some Android systems (thanks Rachel!)
...
Also, added a function SDL_AndroidBackButton() so applications can respond to the back button directly
2018-07-12 13:28:13 -07:00
Wohlstand
ff8c62f227
Fixed bug 4210 - SSE2-based converter makes junk result of S32 -> Float
...
At the HG state abdd17144682, 64-bit assemblies are using SSE2-based resampler, produces junk sound when converting the S32 -> Float32 -> S16 chain. The `NEED_SCALAR_CONVERTER_FALLBACKS` thing works perfectly.
If I will find a reason that caused this mistake, I'll send a patch by myself.
2018-07-02 03:53:57 +03:00
Ozkan Sezer
013b146de9
SDL_windowstaskdialog.h (struct _TASKDIALOGCONFIG): make unions anonymous
...
otherwise build fails. (at least with my VS2005. and the code accesses the
arms of the unions anonymously anyway.)
2018-06-30 20:55:51 +03:00
Ozkan Sezer
949b8bd8c5
correct the comment correction..
2018-06-30 20:10:40 +03:00
Ozkan Sezer
67f18a1973
comment correction
2018-06-30 20:04:01 +03:00
Ryan C. Gordon
7c2028f8e9
Attempt to fix "cast from pointer to integer of different size" warnings.
2018-06-29 16:56:11 -04:00
Ryan C. Gordon
52857de251
Corrected a comment.
2018-06-29 16:55:55 -04:00
Ryan C. Gordon
3b173f818d
Patched to compile on Visual Studio (typo).
2018-06-25 23:00:38 -04:00
Ryan C. Gordon
58168a8c3c
atomic: Fight with all the assemblers that don't like REP NOP. :/
2018-06-25 16:34:16 -04:00
Ryan C. Gordon
5f123e31a3
atomic: Spin locks now try to use the x86 PAUSE instruction for short waits.
...
Fixes Bugzilla #4151 .
2018-06-25 15:58:35 -04:00
Ryan C. Gordon
5a8ecf4e79
yuv: Patched to make static analysis happy (warned about unused variable).
2018-06-25 13:14:52 -04:00
Ryan C. Gordon
4773690d0f
Deal with possible malloc(0) calls, as pointed out by static analysis.
2018-06-25 12:55:23 -04:00
Ryan C. Gordon
915a7e0341
gles2: Whoops, overzealous copy/paste on my part. :)
2018-06-25 01:57:28 -04:00
Ryan C. Gordon
c8ac909674
wayland: Implemented xdg-wm-base support.
...
This is just in parity with the existing zxdg-shell-unstable-v6 code. Making
the Wayland target robust (and uh, with title bars) is going to take a lot
of work on top of this.
2018-06-24 22:42:36 -07:00
Ethan Lee
0a7faa4ae5
Fix Linux haptic scaling, add 2.1 FIXME
2018-05-04 21:58:39 -04:00
Ethan Lee
de9f5415b3
Filter both SIZE_CHANGED and RESIZED on any SIZE_CHANGED
2018-08-13 12:52:52 -04:00
Sam Lantinga
95579f5f19
Fixed bug 4220 - SDL_GL_CONTEXT_DEBUG_FLAG can fail silently on some Android devices
2018-10-01 09:40:58 -07:00
Sam Lantinga
48f7e7f34d
Corrected PS4 controller entry
2018-09-30 22:43:12 -07:00
Sam Lantinga
f8b4cd410b
Re-enable drag-and-drop events by default
2018-09-30 19:53:26 -07:00
Alex Szpakowski
fb485986eb
macOS: Fix a crash when the video subsystem quits, if SDL_MAC_NO_SANDBOX was defined when SDL was compiled.
2018-09-30 11:26:41 -03:00
Ryan C. Gordon
56ec349d2a
audio: disable NEON converters for now.
...
To be revisited after 2.0.9 ships!
(doesn't fix Bugzilla #4186 , but stops the regression for the time being.)
2018-09-29 16:48:15 -04:00
Sam Lantinga
9e8e0fb7b1
Fixed bug 4283 - SDL's version of memset is different from libc's
...
janisozaur
memset's documentation reads:
* The memset() function shall copy c (converted to an unsigned char) into each of the first n bytes of the object pointed to by s. (http://pubs.opengroup.org/onlinepubs/9699919799/functions/memset.html )
* Sets the first count characters of dest to the character c. (https://msdn.microsoft.com/en-us/library/1fdeehz6.aspx )
* write a byte to a byte string (https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/memset.3.html )
The highlight here is they all mean a single _byte_, even though memset receives a parameter of type int, which can hold more data than a single byte. SDL's implementation of memset, however, does not clear any of the higher bits, causing an erroneous behaviour when passed an argument bigger than 0xff.
2018-09-28 20:48:18 -07:00
Sam Lantinga
74638ea3c5
Ensure we wait on the surface resize before returning from setting fullscreen mode.
2018-09-28 20:39:57 -07:00
Ozkan Sezer
31596f23ce
SDL_vsnprintf: implemented '+' flag for signed integers printing.
...
it is, of course, ignored for %u, %x, %o and %p.
2018-09-29 01:24:10 +03:00
Ozkan Sezer
49803c8660
SDL_vsnprintf: fix numerics if both zero-padding and a field are given.
...
it used to place zeroes between the sign and the number. (space-padding
from within SDL_PrintString() seems OK: spaces are added before sign.)
also fixed the maxlen handling if the number has a sign.
2018-09-29 00:51:24 +03:00
Ozkan Sezer
5454765a22
replace bool stuff in controller_type.h with SDL_bool.
...
remove bool<->SDL_bool dance in SDL_joystick.c:SDL_IsJoystickSteamController()
after the controller_type.h change.
2018-09-28 17:01:24 +03:00
Ozkan Sezer
fde82e5972
SDL_hidapi_ps4.c: add HAVE_ENDPOINTVOLUME_H check to win32 volume code.
...
this makes it build with my old toolchain with mingw-w64 1.0.10 headers
2018-09-28 14:01:40 +03:00
Ozkan Sezer
cf7d64f266
hidapi/windows/hid.c: comment out ntdef.h include after windows.h.
...
not necessary and can cause redefinition errors in some toolchains.
2018-09-28 13:44:10 +03:00
Sam Lantinga
9aa8a75d26
Fixed building with Xcode 10.0
2018-09-28 01:18:54 -07:00
Ozkan Sezer
283680f2c1
hidapi/windows/hid.c: fix misplaced #if 0
...
VendorID && ProductID are only used by the test main(),
otherwise they are unwanted globals.
2018-09-28 11:04:55 +03:00
Sam Lantinga
f964ce03b4
Fixed mingw-w64 build
2018-09-28 01:00:47 -07:00
Sam Lantinga
20dfda4489
Fixed mingw-w64 build
2018-09-28 00:40:35 -07:00
Sam Lantinga
7df0f4fdac
Fixed bug 4277 - warnings patch
...
Sylvain
Patch a few warnings when using:
-Wmissing-prototypes -Wdocumentation -Wdocumentation-unknown-command
They are automatically enabled with -Wall
2018-09-27 14:56:29 -07:00
Ozkan Sezer
d9fb77a3c1
SDL_atomic.c, SDL_spinlock.c: use lock prefix with xchg in Watcom asm.
2018-09-27 11:55:02 +03:00
Ozkan Sezer
bb5516ac8e
SDL_vsnprintf() updates for zero-padding:
...
- remove force-enabling of pad_zeroes for %u for compatibility
(was added in https://hg.libsdl.org/SDL/rev/701f4a25df89 )
- ignore pad_zeroes for %s and %S
- ignore pad_zeroes for %d, %i and %u if a precision is given
2018-09-27 09:37:36 +03:00
Ryan C. Gordon
7689162ca0
cocoa: Force an OpenGL context update when the window becomes key.
...
Fixes missing rendering on macOS 10.14 ("Mojave").
Fixes Bugzilla #4272 .
2018-09-26 20:10:32 -04:00
Ozkan Sezer
6eeb8593ba
SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned mismatch warning
2018-09-27 01:10:50 +03:00
Ozkan Sezer
5342ae2bba
SDL_string.c (SDL_IntPrecisionAdjust): avoid MSVC generating a memset()
2018-09-27 01:00:50 +03:00