|
e43550c0
|
2019-06-09T14:08:18
|
|
Fixed bug 4658 - iOS 12 fullscreen flag and SDL_HINT_IOS_HIDE_HOME_INDICATOR not working
Caleb Cornett
On iOS 12, creating a window with the SDL_WINDOW_FULLSCREEN flag does not dim the home indicator or defer system gestures. The same goes for setting the SDL_HINT_IOS_HIDE_HOME_INDICATOR to "2" -- it has no effect at all.
I've tracked down the source of this misbehavior to a timing issue. The initial `setNeedsUpdate...` calls were happening too early and getting applied to the launch screen by mistake. In the attached patch, I've added a call to those functions right after the launch screen is hidden so that they apply to the main view controller instead. This appears to fix the issue, at least on my iPhone 6s Plus.
|
|
762b788f
|
2019-06-09T12:46:10
|
|
Cleanup on bug 3894 - Fuzzing crashes for SDL_LoadWAV
Simon Hug
Attached is a minor cleanup patch. It changes the option name of one hint to something better, puts one or two more checks in, and adds explicit casting where warnings could appear otherwise.
I hope the naming of the hints and their options is acceptable. It would be kind of awkward to change them after they get released with an official SDL version.
|
|
225ae690
|
2019-06-09T11:54:51
|
|
Add notes for SDL_WinRTRunApp and SDL2-WinRTResources for non-C++ projects
|
|
b5e9ebba
|
2019-06-08T19:12:05
|
|
Fixed compiler warning
warning C4018: '<' : signed/unsigned mismatch
|
|
a21b5b30
|
2019-06-08T19:09:43
|
|
Fixed build
|
|
990e166a
|
2019-06-08T19:02:42
|
|
Fixed bug 3894 - Fuzzing crashes for SDL_LoadWAV
Simon Hug
I had a look at this and made some additions to SDL_wave.c.
The attached patch adds many checks and error messages. For some reason I also added A-law and ?-law decoders. Forgot exactly why... but hey, they're small.
The WAVE format is seriously underspecified (at least by the documents that are publicly available on the internet) and it's a shame Microsoft never put something better out there. The language used in them is so loose at times, it's not surprising the encoders and decoders behave very differently. The Windows Media Player doesn't even support MS ADPCM correctly.
The patch also adds some hints to make the decoder more strict at the cost of compatibility with weird WAVE files.
I still think it needs a bit of cleaning up (Not happy with the MultiplySize function. Don't like the name and other SDL code may want to use something like this too.) and some duplicated code may be folded together. It does work in this state and I have thrown all kinds of WAVE files at it. The AFL files also pass with it and some even play (obviously just noise). Crafty little fuzzer.
Any critique would be welcome. I have a fork of SDL with a audio-loadwav branch over here if someone wants to use the commenting feature of Bitbucket:
https://bitbucket.org/ChliHug/SDL
I also cobbled some Lua scripts together to create WAVE test files:
https://bitbucket.org/ChliHug/gendat
|
|
48ac92af
|
2019-06-08T18:40:11
|
|
Fixed bug 4041 - Android, SDL_Renderer OpenGLES 1 is loading GLESv2 library
Sylvain
On Android, if you set no attribute using SDL_GL_SetAttribute(), and try to create a SDL Render OpenGLES 1:
- it loads first by default GLESv2 libraries
- creates the rendere OpenGLES 1
- recreates the Window to have a context 1.1 ( https://hg.libsdl.org/SDL/file/4db4cfd59470/src/render/opengles/SDL_render_gles.c#l298 )
But it doesn't unload libraries, then reload GLESv1 lib. So the SDL_Renderer OpenGLES 1 is working with GLES 2 libs, which seems inconsistent.
If you, at first, set
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
It will correctly load GLES v1 libraries.
Here's a small patch to reload egl libs when SDL_RecreateWindow() is called.
It fixes the issue, also the case from bug 4042
( SDL_RecreateWindow() is used by SDL_Renderer gl, gles1, gles2. )
|
|
1b73d578
|
2019-06-08T18:32:29
|
|
Temporary fix for bug 4254 - a _lot_ of strict aliasing warnings
Ozkan Sezer
A horde of strict aliasing violation warnings are emitted from joystick
layer, and also from a few other places. This happens with gcc-4.4.7 on
Linux CentOS 6.10. Some other sysjoystick would possibly have the same
warnings.
Attached my full log here. Example entry:
src/joystick/SDL_joystick.c: In function 'SDL_GetJoystickGUIDInfo':
src/joystick/SDL_joystick.c:1094: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
|
|
31765242
|
2019-06-08T18:22:18
|
|
Fixed bug 4294 - Audio: perform more validation on conversion request
janisozaur
There are many cases which are not able to be handled by SDL's audio conversion routines, including too low (negative) rate, too high rate (impossible to allocate).
This patch aims to report such issues early and handle others in a graceful manner. The "INT32_MAX / RESAMPLER_SAMPLES_PER_ZERO_CROSSING" value is the conservative approach in terms of what can _technically_ be supported, but its value is 4'194'303, or just shy of 4.2MHz. I highly doubt any sane person would use such rates, especially in SDL2, so I would like to drive this limit further down, but would need some assistance to do that, as doing so would have to introduce an arbitrary value. Are you OK with such approach? What would a good value be? Wikipedia (https://en.wikipedia.org/wiki/High-resolution_audio) lists 96kHz as the highest sampling rate in use, even if I quadruple it for a good measure, to 384kHz it's still an order of magnitude lower than 4MHz.
|
|
3f19a6d5
|
2019-06-08T18:07:58
|
|
CVE-2019-7578: Fix a buffer overread in InitIMA_ADPCM
If IMA ADPCM format chunk was too short, InitIMA_ADPCM() parsing it
could read past the end of chunk data. This patch fixes it.
CVE-2019-7578
https://bugzilla.libsdl.org/show_bug.cgi?id=4494
Signed-off-by: Petr P?sa? <ppisar@redhat.com>
|
|
316ff384
|
2019-06-08T17:43:23
|
|
Fixed bug 4526 - replace SDL_RW* macros with functions for using in bindings
ace
I got this bug in SDL_ttf:
https://bugzilla.libsdl.org/show_bug.cgi?id=4524
Sylvain proposed solution:
SDL_RWseek(RWops, 0, RW_SEEK_SET);
And it works, but i can use it my project, because it written in C# with SDL2-CS wrapper and there not export for macroses:
#define SDL_RWsize(ctx) (ctx)->size(ctx)
#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR)
#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
#define SDL_RWclose(ctx) (ctx)->close(ctx)
Therefore, I suggest replacing this macros with functions so that they can be exported and used in bindings
|
|
2b6473dc
|
2019-06-08T15:10:20
|
|
Fixed bug 4533 - Update ANGLE to load d3dcompiler_47.dll instead of d3dcompiler_46.dll
msmshazan
Update ANGLE Libraries to support d3dcompiler_47.dll since chrome does not ship with d3dcompiler_46.dll and d3dcompiler_43.dll
|
|
a73dacbf
|
2019-06-08T14:58:49
|
|
Backed out Ben's chinese Xbox controller patch, as the generic catch-all for Xbox controllers should handle it.
|
|
8728ce44
|
2019-06-08T14:54:37
|
|
Fixed bug 4557 - SDL_SIMDAlloc and *Free should be in the public interface
Martin Gerhardy
These functions are really useful and should get exposed imo.
|
|
56b7f4cf
|
2019-06-08T14:40:27
|
|
Fixed bug 4583 - PollAllValues appears to use an incorrect index for all axes above 0x18
Noam Preil
In src/joystick/linux/SDL_sysjoystick.c:
The ConfigJoystick function's axes detection starts with a for loop using an index i for Linux's axes names. When i gets to ABS_HAT0X, it's set to ABS_HAT3Y and a continue statement appears, to skip the hats. This makes sense, as SDL handles hats separately from axes.
However, in PollAllValues, *two* indices are used: a and b. Both start out the same, and remain so until the hats are reached. At that point, a becomes identical to the i from ConfigJoystick's loop, but b is equal to a - (ABS_HAT3Y - ABS_HAT0X), or a - 8.
While all the joystick->hwdata->abs_* structures in ConfigJoystick used i - which would here be a - as both the index and the ioctl argument, PollAllValues uses b for the structure index and a as the ioctl argument.
It would appear, however, that no joystick HAS such axes, and that the b index is entirely unnecessary.
I tested three separate joysticks, and while that was far from a complete listing, I was unable to find a joystick with an axis above 0x08.
|
|
59483c64
|
2019-06-08T14:36:03
|
|
Fixed bug 4593 - Respect CMake's BUILD_SHARED_LIBS default behavior
tschwinger
Respect the BUILD_SHARED_LIBS variable when defined, and build either shared or static libs, which is CMake's default behavior (See https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html).
If the variable is not defined, the current behavior remains unchanged and both variants are built where the platform supports it. This way, it remains possible to build both in one shot, which seems convenient for distro builds and useful to promote some consistency between them.
|
|
68bb8d6c
|
2019-06-08T14:34:38
|
|
Fixed bug 4594 - Fix install location of CMake targets on Apple platforms
tschwinger
Followup to #3651
As already noted by Ryan, no framework is being built, so we better install to lib/cmake.
That code was originally part of a patch submitted by David Demelier, whose credit BTW got lost (I combined his patch for #3572 with fixes for #2576 and #3613 resulting in #3651 because things started to depend on another).
I tested that the configuration files are found correctly in the new location on MacOS X based on a hint to the root (see https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure).
|
|
d97387cc
|
2019-06-08T14:32:19
|
|
Fixed bug 4600 - Dualshock 4 touchpad press is not detectable with SDL_JoystickGetButton
Dexter Friedman
When using a Dualshock 4 controller (model numbers CUH-ZCT1U and CUH-ZCT2U), pressing anywhere on the center touchpad does not send an SDL_JOYBUTTONDOWN event. I have verified this with testjoystick:
Repro steps:
1. Plug in a DS4 over USB
2. Compile testjoystick and run: testjoystick.exe 0
3. Press and hold the touchpad. Observe that no lime green box appears
Expected behavior:
A lime green box appears while the touchpad is pressed.
Notes:
I've attached a patch here that works on my PC and produces the expected behavior in testjoystick, for both DS4 model numbers I listed earlier.
If I understand correctly, by exposing this as a joystick button, the gamecontroller API mapping can be modified with a change to gamecontrollerdb.txt in the future.
|
|
30a5e90b
|
2019-06-08T14:29:05
|
|
Fixed bug 4603 - The iOS Test Xcode project file needs to add the metal framework
Dominik Reichardt
Similar to bug #4088 the iOS test suite needs the metal framework to link. Same linking error in the final linking phase.
|
|
8a37848d
|
2019-06-08T13:41:46
|
|
Fixed bug 4605 - WASAPI_WaitDevice hang
Matt Brocklehurst
We've noticed that if you are playing audio on Windows via the WASAPI interface and you unplug and reconnect the device a few times the program hangs.
We've debugged the problem down to
static void
WASAPI_WaitDevice(_THIS)
{
... snip ...
if (WaitForSingleObjectEx(this->hidden->event, INFINITE, FALSE) == WAIT_OBJECT_0) {
... snip ...
}
This WaitForSingleObjectEx does not havbe a time out defined, so it hangs there forever.
Our suggested fix we found was to include a time out of say 200mSec
We have done quite a bit of testing with this fix in place on various hardware configurations and it seems to have resolved the issue.
|
|
82af4276
|
2019-06-08T13:36:59
|
|
hidapi: Use GameCube adapter controller port for player index
The Nintendo USB GameCube adapter has four controller ports. Return
the port number as 0 to 3 from SDL_JoystickGetPlayerIndex() and
SDL_JoystickGetDevicePlayerIndex().
|
|
15bae953
|
2019-06-08T13:03:36
|
|
Fixed bug 4642 - Rework SDL_netbsdaudio to improve performance
Nia Alarie
The NetBSD audio driver has a few problems. Lots of obsolete code, and extremely bad performance and stuttering.
I have a patch in NetBSD's package system to improve it. This is my attempt to upstream it.
The changes include:
* Removing references to defines which are never used.
* Using the correct structures for playback and recording, previously they were the wrong way around.
* Using the correct types ('struct audio_prinfo' in contrast to 'audio_prinfo')
* Removing the use of non-blocking I/O, as suggested in #3177.
* Removing workarounds for driver bugs on systems that don't exist or use this driver any more.
* Removing all usage of SDL_Delay(1)
* Removing pointless use of AUDIO_INITINFO and tests that expect AUDIO_SETINFO to fail when it can't.
These changes bring its performance in line with the DSP audio driver.
|
|
f2c8d8e9
|
2019-06-08T10:47:43
|
|
Fixed bug 4443 - Incorrect scan code reported for numpad 5
bplu4t2f
When num lock is on, the scancode reported for numpad 5 is SDL_SCANCODE_KP_5, which is correct. However, when num lock is off, windows reports the VK_CLEAR virtual key code, which is incorrectly translated into SDL_SCANCODE_CLEAR inside of the VKeytoScancode(WPARAM vkey) function.
|
|
b1100ec1
|
2019-06-08T10:23:52
|
|
Fixed Android build warning
|
|
03cf2416
|
2019-06-08T10:21:38
|
|
OpenSL ES audio cleanup and added a note with low latency audio discussion
|
|
166d15fd
|
2019-06-07T15:09:15
|
|
Fixed surround sound channel setup for Android OpenSL ES audio driver
|
|
23a2b477
|
2019-06-07T09:00:26
|
|
Protect against NULL device in the Android hidapi implementation
|
|
9261e473
|
2019-06-07T09:00:24
|
|
Potential fix for a crash we're seeing on Android that should in theory never happen.
|
|
20ec8664
|
2019-06-06T08:20:53
|
|
Added support for the Rotor Riot gamepad, and upcoming Xbox and PS4 controller support on iOS and tvOS
Patch contributed by Nat Brown
|
|
6c0b304c
|
2019-06-05T12:03:45
|
|
Fixed bug 4655 - evdev is available on FreeBSD, check in 'configure' limited to Linux
Jan Martin Mikkelsen
The evdev interface is available on FreeBSD, with the xf86-input-evdev for include files in /usr/local/include/linux, so <linux/input.h> works, or when build with the native evdev option, where <dev/evdev/input.h> is available.
|
|
23569362
|
2019-06-05T12:01:26
|
|
Use SDL sized types
|
|
3e329464
|
2019-06-05T08:54:07
|
|
Fixed bug 4656 - SDL_evdev.c uses Linux specific integer types
Jan Martin Mikkelsen
The file src/core/linux/SDL_evdev.c uses the Linux specific types __u32 and __s32. This breaks things on FreeBSD when building with evdev.
|
|
723d0143
|
2019-06-04T17:32:15
|
|
Fixed bug 4171 - SDL_GetQueuedAudioSize is broken with WASAPI
Cameron Gutman
I was trying to use SDL_GetQueuedAudioSize() to ensure my audio latency didn't get too high while streaming data in from the network. If I get more than N frames of audio queued, I know that the network is giving me more data than I can play and I need to drop some to keep latency low.
This doesn't work well on WASAPI out of the box, due to the addition of GetPendingBytes() to the amount of queued data. As a terrible hack, I loop 100 times calling SDL_Delay(10) and SDL_GetQueuedAudioSize() before I ever call SDL_QueueAudio() to get a "baseline" amount that I then subtract from SDL_GetQueuedAudioSize() later. However, because this value isn't actually a constant, this hack can cause SDL_GetQueuedAudioSize() - baselineSize to be < 0. This means I have no accurate way of determining how much data is actually queued in SDL's audio buffer queue.
The SDL_GetQueuedAudioSize() documentation says: "This is the number of bytes that have been queued for playback with SDL_QueueAudio(), but have not yet been sent to the hardware." Yet, SDL_GetQueuedAudioSize() returns > 0 value when SDL_QueueAudio() has never been called.
Based on that documentation, I believe the current behavior contradicts the documented behavior of this function and should be changed in line with Boris's patch.
I understand that exposing the IAudioClient::GetCurrentPadding() value is useful, but a solution there needs to take into account what of that data is silence inserted by SDL and what is actual data queued by the user with SDL_QueueAudio(). Until that happens, I think the best approach is to remove the GetPendingBytes() call until SDL is able to keep track of queued data to make sense of it. This would make SDL_GetQueuedAudioSize() possible to use accurately with WASAPI.
|
|
b5d3b6fc
|
2019-05-28T17:39:13
|
|
test: unify all the command line usage logging.
|
|
9b581159
|
2019-05-26T18:53:36
|
|
iOS: return SDL_GetWindowSize from SDL_GL_GetDrawableSize if there's no GLES view in the window (matches the behaviour of SDL_GL_GetDrawableSize on other platforms). Addresses bug #4629.
|
|
dce56ab9
|
2019-05-23T14:19:00
|
|
Added a function to get the current Android SDK version at runtime
|
|
f3e76ea1
|
2019-05-23T13:47:30
|
|
Use the OpenSL ES audio driver by default on Android, as it has the lowest latency.
|
|
02f9667a
|
2019-05-23T13:47:27
|
|
Fixed static and buzzing when trying to use floating point audio on the OpenSL ES audio driver.
|
|
e401b950
|
2019-05-23T11:32:36
|
|
Return an error if both mouse relative mode and mouse warping are unavailable, instead of asserting.
|
|
8b57331e
|
2019-05-23T11:05:43
|
|
Fixed hiding the Android virtual keyboard when the return key is pressed
|
|
f91b8785
|
2019-05-23T09:08:40
|
|
Android: minimum size for IME, so that it takes focus
In API 28, 0 width views can't take focus, so if someone tries to position the IME without setting a width, they'll stop getting text events.
Tested on Android 9: with a 0 size, it would send correctly letters a, b, c, etc. but not numbers.
|
|
7ec514d4
|
2019-05-22T17:39:51
|
|
Improved iOS Bluetooth keyboard support
* Don't stop text input after the return key is pressed
* Handle arrow and escape keys
|
|
50aab198
|
2019-05-21T17:33:31
|
|
Fixed bug 4639 - CMake build does not generate libhidapi.so for Android
Manuel Sabogal
I noticed that the current Android.mk builds a libhidapi.so library for Android but the CMake build hasn't been updated to do so. I'll attach a patch that fixes this issue.
|
|
a4e33b9c
|
2019-05-20T14:31:03
|
|
Added support for Bluetooth keyboards on iOS
In this case the keyboard is shown and immediately hidden, but we still want to accept text input
|
|
582a3c99
|
2019-05-20T14:08:35
|
|
Fixed mouse focus for touch events on iOS
|
|
4bd80834
|
2019-05-20T00:41:18
|
|
vulkan: Swapped out a free() that should have been an SDL_free().
Fixes (for real this time!) the Visual Studio builds.
|
|
ebbb295e
|
2019-05-19T23:29:50
|
|
vulkan: Patched to compile on Visual Studio.
|
|
d778b26d
|
2019-05-19T20:25:02
|
|
Patched to compile in C89 mode.
|
|
5f341620
|
2019-05-19T12:06:58
|
|
Fixed bug 4474 - Add support for an ASUS Gamepad variation
Trent Gamblin
This patch adds a variation of the ASUS Gamepad to the game controller DB. All the values are the same except the GUID.
|
|
41c718db
|
2019-05-19T12:04:06
|
|
Fixed bug 4469 - make SDL_CreateTextureFromSurface pick a more appropriate format
Sylvain
Currently SDL_CreateTextureFromSurface picks first valid format, and do a conversion.
format = renderer->info.texture_formats[0];
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) {
format = renderer->info.texture_formats[i];
break;
It could try to find a better format, for instance :
if SDL_Surface has no Amask, but a colorkey :
if surface fmt is RGB888, try to pick ARGB8888 renderer fmt
if surface fmt is BGR888, try to pick ABGR8888 renderer fmt
else
try to pick the same renderer format as surface fmt
if no format has been picked, use the fallback.
I think it goes with bug 4290 fastpath BlitNtoN
when you expand a surface with pixel format of size 24 to 32, there is a fast path possible.
So with this issue:
- if you have a surface with colorkey (RGB or BGR, not palette), it takes a renderer format where the conversion is faster.
(it avoids, if possible, RGB -> ABGR which means switching RGB to BGR)
- if you have a surface ABGR format, it try to take the ABGR from the renderer.
(it avoids, if possible, ABGR -> ARGB, which means switch RGB to BGR)
|
|
c377de54
|
2019-05-19T11:56:26
|
|
Fixed bug 4436 - [OpenBSD] fix D-pad
Thomas Frohwein
Hi,
If a gamepad lists the Dpad as 4 buttons (Dpad Up,Down, Left, Right) like with the Xbox 360 gamepad / XInput report descriptor used by OpenBSD (https://github.com/openbsd/src/blob/master/sys/dev/usb/uhid_rdesc.h#L184), this is not recognized by the SDL BSD backend and no hat or any other listing for the D-pad exists, e.g. in sdl2-jstest (https://gitlab.com/sdl-jstest/sdl-jstest).
The attached diff fixes this and makes the D-pad on my Xbox 360 and Logitech F310 controllers usable. It adds a hat to nhats when usage HUG_DPAD_UP is found, reads the state of the D-pad buttons into array dpad[], and turns the value of dpad[] into an SDL hat direction (dpad_to_sdl()).
Tested and works with Xbox 360 controller and Logitech F310 in XInput mode. Software-side tested with sdl2-jstest and Owlboy where this worked without problems or regressions.
I don't know if this would be applicable to other *BSDs and don't have an install to test it with, therefore wrapped it in __OpenBSD__ ifdefs.
Thanks,
thfr
|
|
ee0a482a
|
2019-05-19T11:52:25
|
|
Fixed bug 4401 - SDL_GetWindowPosition() wrong after SDL_SetWindowPosition() until window is moved on macOS
Removed incorrect call to SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y);
If the position of the window isn't adjusted in the SetWindowPosition() call, then sending the window event would have no effect because x and y equals the window x and y. If the position of the window is adjusted in the SetWindowPosition() call, then we don't want to clobber it with values that the user passed in.
|
|
2ee9b1dd
|
2019-05-19T11:01:36
|
|
Fixed bug 4025 - SDL_Renderer OpenGL : add support for textures ABGR, RGB, BGR
Sylvain
OpenGLES2 SDL renderer has support for textures ARGB, ABGR, RGB and BGR, whereas OpenGL SDL renderer only had ARGB.
If you think it's worth adding it, here's a patch. I quickly tried and it worked, but there may be missing things or corner case.
|
|
8dea23c7
|
2019-05-19T10:44:14
|
|
Fixed bug 3911 - SYSWM generic X11 events missing event data
Andrei Drexler
For X11 GenericEvents, the associated data is only available between a call to XGetEventData and the matching XFreeEventData, i.e. in X11_HandleGenericEvent. Trying to call XGetEventData a second time on the same event will fail, so an application that wants to inspect XInput2 events (e.g. for stylus pressure) has no way of retrieving its data from queued SYSWM events.
The attached patch (based on SDL-2.0.7-11629) sends SYSWM messages from X11_HandleGenericEvent while the data is still available, allowing client code to register an event filter/watcher and process the event inside the callback.
|
|
29f34453
|
2019-05-19T10:36:44
|
|
video: Add Vulkan support for vivante fb
Vivante drivers use the VK_KHR_display extension for rendering directly
to the frame buffer. This patch adds support to the video driver for
Vulkan rendering using that method.
- Add an utility function SDL_Vulkan_Display_CreateSurface that creates
a surface using this extension. The display to use (if there are
multiple) can be overridden using the environment variable
"SDL_VULKAN_DISPLAY".
- Use this function in a new compilation unit SDL_vivantevideo.c,
which implements the SDL_VIDEO_VULKAN methods of the driver structure.
|
|
00e5eeb4
|
2019-05-19T01:45:15
|
|
test: added SDLTest_CommonDefaultArgs()
This is for test apps that don't need custom command line arguments; it lets
us reduce the boilerplate code a tiny bit.
|
|
18d83093
|
2019-05-18T23:47:57
|
|
test: configure/make shouldn't build GL/GLES1/GLES2 programs if unsupported.
|
|
62a57970
|
2019-05-15T14:01:15
|
|
Windows are not in a minimized state when they are shown
This fixes https://github.com/ValveSoftware/steam-for-linux/issues/4313
"Exiting game a in Steam Big Picture Mode gets semi-windowed BPM"
|
|
abcfe804
|
2019-05-14T14:20:54
|
|
[SDL] iOS fix bug with audio interrupted by a phone call not restoring.
|
|
59da5b72
|
2019-05-14T07:55:42
|
|
[SDL] ios Touch Fix.
|
|
ba0fc92d
|
2019-05-11T12:41:21
|
|
Patched to compile.
|
|
6eb05211
|
2019-05-09T12:09:45
|
|
Emscripten: Use EMSCRIPTEN_EVENT_TARGET_*
|
|
4e5b5cba
|
2019-05-09T12:09:40
|
|
Emscripten: Switch from canvas[XY] to target[XY]
Allows mouse/touch events to work on non-default canvases
|
|
60c48ed7
|
2019-05-09T12:09:34
|
|
Emscripten: Store canvas id in WindowData
Also replace all hardcoded uses of "#canvas" or NULL
|
|
5cb14f44
|
2019-04-30T20:37:49
|
|
Ignore Xbox One S gamepads with older firmware in HIDAPI
This older firmware had a different HID report style that we don't support.
|
|
9b220282
|
2019-04-28T17:37:49
|
|
Fix use-after-free when pumping the event loop after SDL_DestroyWindow()
Closing the window is asynchronous, but we free the window data immediately,
so we can get an updateLayer callback before the window is really destroyed which
will cause us to access the freed memory.
Clearing the content view will cause it to be immediately released, so no further
updateLayer callbacks will occur.
|
|
f0a4fea8
|
2019-04-25T14:17:07
|
|
Fixed bug 4608 - Android: not getting SDL_WINDOWEVENT_FOCUS_GAINED on start of our app
Dan Ginsburg
I've seen this on several devices including Moto Z running Android 7 and a Snapdragon 845 running Android 9.
What happens is as follows:
SDLActivity.onWindowFocusChanged(true) happens pretty early on, but it's before we've done SDL_CreateWindow and so Android_Window is 0x0 thus this message does not get sent:
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeFocusChanged)(
JNIEnv *env, jclass cls, jboolean hasFocus)
{
SDL_LockMutex(Android_ActivityMutex);
if (Android_Window) {
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeFocusChanged()");
SDL_SendWindowEvent(Android_Window, (hasFocus ? SDL_WINDOWEVENT_FOCUS_GAINED : SDL_WINDOWEVENT_FOCUS_LOST), 0, 0);
}
SDL_UnlockMutex(Android_ActivityMutex);
}
When the window does get created, in Android_CreateWindow it does this:
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizeable */
window->flags &= ~SDL_WINDOW_HIDDEN;
window->flags |= SDL_WINDOW_SHOWN; /* only one window on Android */
window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
/* One window, it always has focus */
SDL_SetMouseFocus(window);
SDL_SetKeyboardFocus(window);
The SDL_SetKeyboardFocus does send an SDL_WINDOWEVENT_FOCUS_GAINED message, but it gets eaten in SDL_SendWindowEvent because we've forced SDL_WINDOW_INPUT_FOCUS beforehand:
case SDL_WINDOWEVENT_FOCUS_GAINED:
if (window->flags & SDL_WINDOW_INPUT_FOCUS) {
return 0;
}
window->flags |= SDL_WINDOW_INPUT_FOCUS;
SDL_OnWindowFocusGained(window);
break;
I can fix the problem if I comment out this line from Android_CreateWindow:
window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
I would propose that as a fix unless there is a reason not to.
|
|
1a38853e
|
2019-04-24T12:53:15
|
|
Fixed bug 4566 - Hot-plugging Bluetooth controller causes force-quit on Android
Anthony @ POW Games
I tried adding different configChanges and sure enough, "navigation" worked! Now bluetooth controllers hot-plug nicely. So shall we add it as a default to the AndroidManifest.xml?
Funny that this is how this activity is described:
"navigation" The navigation type (trackball/dpad) has changed. (This should never normally happen.)
I think the reason behind this is because the bluetooth game controller I was testing doubles-up as a keyboard, which probably comes with a DPAD? It's a MOCUTE-032X_B63-88CE
|
|
53a6196b
|
2019-04-23T16:57:34
|
|
Don't redefine __SSE__ and related macros if they're already defined
|
|
f5252530
|
2019-04-23T14:08:14
|
|
Change my previous fix based on feedback from dev @saml
|
|
624f8ca8
|
2019-04-23T14:08:09
|
|
Created Xcode schemes for building on iOS and tvOS
|
|
ecce803d
|
2019-04-23T12:59:28
|
|
Fix compile errors I hit when building org.libsdl in source2 (part 2 of 2) @saml
|
|
45b5453b
|
2019-04-23T12:59:20
|
|
Fix compile errors I hit when building org.libsdl in source2 (part 1 of 2)
|
|
f79190f4
|
2019-04-23T07:59:31
|
|
Use _Exit() when available
|
|
2c92c8e8
|
2019-04-23T14:24:58
|
|
Android: add static variable initialization in non blocking event loop
|
|
cb18117c
|
2019-04-22T16:34:42
|
|
Added a helper function to tell whether or not a window can be minimized
|
|
f1b57f37
|
2019-04-22T16:25:49
|
|
Only leave fullscreen mode if we're actually going to minimize
|
|
9950271b
|
2019-04-22T16:19:52
|
|
Fixed bug 4580 - Android 8: immersive fullscreen notification causes flickering between fullscreen and non-fullscreen and app is unresponsive
Sylvain 2019-04-18 21:22:59 UTC
Changes:
- SDL_WINDOWEVENT_FOCUS_GAINED and SDL_WINDOWEVENT_FOCUS_LOST are sent when the java method onWindowFocusChanged() is called.
- If we have support for MultiWindow (eg API >= 24), SDL event loop is blocked/un-blocked (or simply egl-backed-up or not), when java onStart()/onStop() are called.
- If not, this behaves like now, SDL event loop is blocked/un-blocked when onPause()/onResume() are called.
So if we have two app on screen and switch from one to the other, only FOCUS events are sent (and onPause()/onResume() are called but empty. onStart()/onStop() are not called).
The SDL app, un-focused, would still continue to run and display frames (currently the App would be displayed, but paused).
Like a video player app or a chronometer that would still be refreshed, even if the window hasn't the focus.
It should work also on ChromeBooks (not tested), with two apps opened at the same time.
I am not sure this fix Dan's issue. Because focus lost event triggers Minimize function (which BTW is not provided on android).
https://hg.libsdl.org/SDL/file/bb41b3635c34/src/video/SDL_video.c#l2653
https://hg.libsdl.org/SDL/file/bb41b3635c34/src/video/SDL_video.c#l2634
So, in addition, it would need to add by default SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS to 0.
So that the lost focus event doesn't try to minimize the window. And this should fix also the issue.
|
|
2f6c988e
|
2019-04-21T21:34:14
|
|
configure: Cleaned up audio/video summaries when building for Windows.
|
|
90b08881
|
2019-04-17T20:41:05
|
|
iOS: Remove code trying to support compilation on the iOS 7 SDK, the deployment target has been set to iOS 8 for years and there's other unconditionally compiled code that depends on newer SDKs so that code is useless.
|
|
9d7b2615
|
2019-04-17T20:14:40
|
|
macOS: Fix compilation when using the 10.9 SDK or older.
|
|
cf87d576
|
2019-04-16T20:00:14
|
|
Explicitly load hidapi as a dependency of the SDL library
This fixes loading on Android 4.2
|
|
bd344c22
|
2019-04-12T23:15:26
|
|
Android: when event loop is not blocking in pause, backup EGL context (Bug 4578)
Backup the EGL context when SDL_APP_DIDENTERBACKGROUND has been removed from the
event queue.
|
|
00c824a8
|
2019-04-10T22:30:58
|
|
Fix disabling OpenGL vsync on macOS 10.14.4+ (bug #4575).
|
|
aae49015
|
2019-04-10T10:59:53
|
|
Fixed bug 4581 - generate synthetic mouse events at window boundaries
when real touch events are actually outside the window.
|
|
cfefe543
|
2019-04-08T21:27:24
|
|
Fixed bug 4581 - mouse events with SDL_TOUCH_MOUSEID make window lost focus
Virtual mouse events should never leave the window or change focus for single window applications.
|
|
d68e501d
|
2019-04-08T13:43:48
|
|
Fixed bug 4582 - Maximize/Resize not working on Windows 10
When viewport is set, projectionAndView changes, but ID3D11DeviceContext_UpdateSubresource was not called.
|
|
46af90d8
|
2019-04-07T23:01:07
|
|
Add a configure option allowing users to choose whether to install sdl2-config
sdl2-config is installed by default if no flag is specified.
|
|
eb7affee
|
2019-04-06T21:52:51
|
|
SDL_HINT_MOUSE_TOUCH_EVENTS: move tracking appart in case of 'window' is null
|
|
a1a9fd50
|
2019-04-06T21:43:16
|
|
Bug 4581: move tracking appart so it doesn't require the window to have focus
|
|
a46af76b
|
2019-04-05T08:15:01
|
|
Fixed bug 4579 - SDL_android.c s_active not being atomic
Isaias Brunet
This bug cause a false assert due to multiple threads modifying the same variable without any atomic operation.
|
|
9eac91dd
|
2019-04-05T08:10:12
|
|
Set SDL_HINT_MOUSE_TOUCH_EVENTS for iPhone and iPad as well
|
|
b6f33a68
|
2019-04-05T07:51:11
|
|
https://bugzilla.libsdl.org/show_bug.cgi?id=4577
SDL_GetWindowDisplayMode was returning an incorrect result on iPhone Plus devices (tested on iOS 12.1/12.2). The problem was that the value returned by UIScreenMode was assumed to be the physical pixels on the display, rather than the scaled retina pixels. The fix is to use the scale returned by UIScreen.scale rather than the nativeScale.
|
|
05333a6e
|
2019-04-05T09:16:30
|
|
Android: add hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE
to set whether the event loop will block itself when the app is paused.
|
|
b470cd9b
|
2019-04-05T08:36:31
|
|
Android: default SDL_HINT_MOUSE_TOUCH_EVENTS to 1 as previous behaviour
|
|
6f732d4e
|
2019-04-04T20:24:22
|
|
Update WhatsNew.txt
|
|
458c60e6
|
2019-04-04T20:10:55
|
|
Update WhatsNew.txt
|
|
bfdd0b22
|
2019-04-04T17:01:02
|
|
Android: remove SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH
java layer runs as if separate mouse and touch was 1,
Use SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS
for generating synthetic touch/mouse events
|
|
e4157618
|
2019-04-04T16:51:50
|
|
Add hint SDL_HINT_MOUSE_TOUCH_EVENTS for mouse events to generate touch events
controlling whether mouse events should generate synthetic touch events
By default SDL will *not* generate touch events for mouse events
|
|
ab03892d
|
2019-04-04T15:19:00
|
|
Bug 4576: track both FingerId and TrackId
|