Commit Graph

11033 Commits

Author SHA1 Message Date
Ryan C. Gordon
0df9d798c0 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
0033862167 Backed out changeset dfebed374d73.
This change isn't correct. See comments in Bugzilla #4183.
2018-07-22 19:42:08 -04:00
Ryan C. Gordon
3303a441ef 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
64d58fd49a windows: Fixed some Visual Studio warnings about shadowed variables.
Fixes Bugzilla #4118.
2018-07-22 19:28:27 -04:00
Vitaly Novichkov
67c5087370 Remove "lib" prefix from DLL file on MinGW builds
closes bug #4209.
2018-06-29 18:29:17 +03:00
Marc Di Luzio
9d011323c0 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
1b478e753f 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
0b0fb478b6 Clean up captured pointer code to avoid logcat clutter on pre-8.0 systems (thanks Rachel!) 2018-07-13 12:55:50 -07:00
Sam Lantinga
c0c97d336f 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
b5aa40ef52 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
Ozkan Sezer
10c1a4424b ltmain.sh: make OSX autofoo builds' compatibility version match Xcode builds.
closes bug #4208.
2018-07-05 23:01:10 +03:00
Wohlstand
bc41d31441 Fixed bug 4210 - SSE2-based converter makes junk result of S32 -> Float
At the HG state e604fe493d45, 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
a9aa600f55 made the wasapi configury option consistent with others. 2018-07-01 19:50:00 +03:00
Ozkan Sezer
c3ce3107f8 make WASAPI configurable in autofoo and cmake (default is on.)
closes bug #3798.
2018-07-01 17:01:04 +03:00
Ozkan Sezer
a23d6eaa6f 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
7fa5703108 correct the comment correction.. 2018-06-30 20:10:40 +03:00
Ozkan Sezer
b06bbc766b comment correction 2018-06-30 20:04:01 +03:00
Ozkan Sezer
c14e6550d3 ran 'chmod -x' on two files 2018-06-30 20:03:23 +03:00
Ryan C. Gordon
dd773ed7bc Attempt to fix "cast from pointer to integer of different size" warnings. 2018-06-29 16:56:11 -04:00
Ryan C. Gordon
f1d510002f Corrected a comment. 2018-06-29 16:55:55 -04:00
Ryan C. Gordon
076466dd18 Patched to compile on Visual Studio (typo). 2018-06-25 23:00:38 -04:00
Ryan C. Gordon
c10fa9cf22 atomic: Fight with all the assemblers that don't like REP NOP. :/ 2018-06-25 16:34:16 -04:00
Ryan C. Gordon
a9e3810203 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
ff9f4c1cc7 yuv: Patched to make static analysis happy (warned about unused variable). 2018-06-25 13:14:52 -04:00
Ryan C. Gordon
8bb7d568c0 Deal with possible malloc(0) calls, as pointed out by static analysis. 2018-06-25 12:55:23 -04:00
Ryan C. Gordon
5f52a1b1ef wayland: Keep protocol XML files in-tree.
Now you don't need the latest Wayland installed to build with
newer protocols supported, as they'll build correctly; even if
your system can't use them, we can make intelligent decisions
at runtime about what's available on the current machine anyhow.

This also simplifies some logic and possible failure cases in
the configure and CMake scripts.

Fixes Bugzilla #4207.
2018-06-25 09:37:25 -07:00
Ryan C. Gordon
5f757c92d2 gles2: Whoops, overzealous copy/paste on my part. :) 2018-06-25 01:57:28 -04:00
Ryan C. Gordon
532977eb5f 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
Ryan C. Gordon
11e7263850 android: Android.mk should only preserve debug symbols in debug builds.
Fixes Bugzilla #4111.
2018-06-24 15:21:01 -04:00
Ethan Lee
258371154f Fix Linux haptic scaling, add 2.1 FIXME 2018-05-04 21:58:39 -04:00
Ethan Lee
e7dc34deb8 Filter both SIZE_CHANGED and RESIZED on any SIZE_CHANGED 2018-08-13 12:52:52 -04:00
Sam Lantinga
b31712c445 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
5b3831197d Corrected PS4 controller entry 2018-09-30 22:43:12 -07:00
Sam Lantinga
114ac108ad Re-enable drag-and-drop events by default 2018-09-30 19:53:26 -07:00
Alex Szpakowski
44bd9b9bff 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
a39c254424 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
b23a65deb2 Fixed tablet detection on Android 2018-09-29 02:14:46 -07:00
Ozkan Sezer
d5305bcd65 fix permissions 2018-09-29 09:20:50 +03:00
Sam Lantinga
adeec3f1ca Mark a subsystem as dummy, not disabled, if it was intended to be compiled in.
From Tom Black:

I'm having problems initializing the sensor module. I'm compiling with a standard ./configure && make && sudo make install, and the module says it's enabled, but SDL_Init(SDL_INIT_EVERYTHING) is failing with SDL_GetError() returning "SDL not built with sensor support".
2018-09-28 21:19:27 -07:00
Sam Lantinga
bfe46b22f8 commit 8f4dedc039190f5e734c47dcc4fc021b5793b659
Author: Michał Janiszewski <janisozaur+signed@gmail.com>
Date:   Fri Sep 28 20:38:04 2018 +0200

    CMake: fix building tests on Linux

    In case where libunwind.h has been found, it will be used by compiler,
    but linker wasn't updated to reflect use of this new library.
2018-09-28 21:03:39 -07:00
Sam Lantinga
9fc360ae14 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
8bb9fc0467 Ensure we wait on the surface resize before returning from setting fullscreen mode. 2018-09-28 20:39:57 -07:00
Ozkan Sezer
be55d5101a 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
6e7826b49c 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
7134a34e6f 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
f54b8648e5 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
04357dc42b 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
Ozkan Sezer
e2590c813a configury, cmake: add check for endpointvolume.h :
add HAVE_ENDPOINTVOLUME_H, HAVE_MMDEVICEAPI_H and HAVE_AUDIOCLIENT_H
in SDL_config.h.in, SDL_config.h.cmake, SDL_config_windows.h, and in
SDL_config_winrt.h.
2018-09-28 13:41:04 +03:00
Ozkan Sezer
7cf78d7476 configury, cmake: make wasapi option independent of directx. 2018-09-28 11:30:50 +03:00
Sam Lantinga
d023dff8a5 Fixed building with Xcode 10.0 2018-09-28 01:18:54 -07:00