|
52ae92ea
|
2016-10-07T19:08:22
|
|
ALSA_snd_pcm_drop() can hang on some systems (Steam Link) so don't use that when shutting down the ALSA audio driver.
|
|
808c75d1
|
2016-10-07T18:57:40
|
|
Fixed bug 2824 - Add Fcitx Input Method Support
Weitian Leung
Just moved ibus direct call to SDL_IME_* related functions, and adds fcitx IME support (uses DBus, too),
enable with env: SDL_IM_MODULE=fcitx (ibus still the default one)
|
|
89abbbfe
|
2016-10-07T18:24:34
|
|
Fixed bug 3438 - SDL_GameControllerEventWatcher: Log on event with value >= k_nMaxReverseEntries
|
|
eea76fc1
|
2016-10-07T18:11:03
|
|
Fixed bug 3063 - Wayland: SDL resizes EGL surface to 0x0.
x414e54
Wayland will sometimes send empty resize events (0 width and 0 height) to the client. I have not worked out the exact conditions a client would receive these but I can assume it might be if the window is offscreen or not mapped yet.
This causes issues with some SDL clients as they receive the 0x0 event and unexpected resize event or might not request to resize back to the correct size.
As per the wl_shell Wayland spec configure events are only a suggestion and the client is free to ignore or pick a different size (this is how min/max and fixed aspect ratio is supped to be implemented).
A patch is attached but is just the first iteration and I will fix any issues such as checking for FULLSCREEN/MAXIMIZED or RESIZABLE flags unless someone else fixes this first.
I have update to take into account non resizable and fullscreen windows. Also adding in maximize/restore and title functions for Wayland.
|
|
62b9e1c7
|
2016-10-07T18:09:09
|
|
Fixed bug 3061 - Selecting the dummy video driver on Mac OS X results in an error
Darren Kulp
The dummy video driver is not available on Mac OS X if SDL_VIDEO_OPENGL is set at library compilation time.
In src/video/SDL_video.c, there is a compile-time check in SDL_CreateWindow() for (SDL_VIDEO_OPENGL && __MACOSX__). When it succeeds, SDL_WINDOW_OPENGL is always requested. Since the dummy video driver does not supply an OpenGL implementation, the error "No OpenGL support in video driver" is supplied to the user, and SDL_CreateWindow() is exited early.
|
|
abefe785
|
2016-10-07T18:03:08
|
|
Fixed bug 3043 - fix alsa configury and cmake checks
Ozkan Sezer
SDL's alsa uses snd_pcm_recover() which has been available only since alsa-lib-1.0.11.
|
|
9c483655
|
2016-10-07T18:00:30
|
|
Fixed bug 3029 - software renderer cuts off edges when rotate-blitting with a multiple of 90 degrees
Adam M.
When doing a rotated texture copy with the software renderer, where the angle is a multiple of 90 degrees, one or two edges of the image get cut off. This is because of the following line in sw_rotate.c:
if ((unsigned)dx < (unsigned)sw && (unsigned)dy < (unsigned)sh) {
which is effectively saying:
if (dx >= 0 && dx < src->w-1 && dy >= 0 && dy < src->h-1) {
As a result, it doesn't process pixels in the right column or bottom row of the source image (except when they're accessed as part of the bilinear filtering for nearby pixels). This causes it to look like the edges are cut off, and it's especially obvious with an exact multiple of 90 degrees.
|
|
5c2320f1
|
2016-10-07T17:58:02
|
|
Fixed bug 3022 - SDL_UnlockMutex(SDL_EventQ.lock) in SDL_PeepEvents can cause error when lock is null
|
|
d3cbc664
|
2016-10-07T17:49:33
|
|
Fixed bug 2983 - Update Android.readme to include Tegra Graphics Debugger compatibility tip
Michael Labb?
NVidia has released some pretty nice Tegra profiling tools for their Android devices. The NVidia Tegra Graphics Debugger works by providing an interposer library that intercepts ES2 and EGL calls. You must link against these libraries.
Unfortunately, this quietly fails with SDL2 because libEGL and libGLES2 are dynamically loaded with dlopen().
NVidia offers a secondary approach to using the Tegra Graphics Debugger: root your device and install a global interposer library. Almost no devs will try this first if they don?t have a rooted device.
I propose an update to the Android readme that explains why the static linking approach recommended by NVidia doesn?t work.
|
|
104c9541
|
2016-10-07T17:46:58
|
|
Converted README documentation to DOS text format
|
|
bf076c22
|
2016-10-07T17:30:21
|
|
Fixed bug 2957 - De-reference rz_src without NULL check in SDLgfx_rotateSurface function
Nitz
In function SDLgfx_rotateSurface:
rz_dst =
SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS,
rz_src->format->Rmask, rz_src->format->Gmask,
rz_src->format->Bmask, rz_src->format->Amask);
Here rz_src get De-referenced without NULL check, which is risky.
|
|
8b64a78d
|
2016-10-07T17:26:25
|
|
Fixed bug 2956 - De-reference videodata without NULL check in X11_DispatchEvent(_THIS) function
|
|
93ff12ce
|
2016-10-07T17:23:20
|
|
Fixed bug 2952 - SDL_MixAudioFormat does not support audio format AUDIO_U16LSB/AUDIO_U16MSB
Simon Sandstr?m
As stated in Summary. The switch statement will execute the default case and set a SDL error message: "SDL_MixAudio(): unknown audio format".
There are atleast two more problems here:
1. SDL_MixAudioFormat does not notify the user that an error has occured and that a SDL error message was set. It took me awhile to understand why I couldn't mix down the volume on my AUDIO_U16LSB formatted audio stream.. until I started digging in the SDL source code.
2. The error message is incorrect, it should read: "SDL_MixAudioFormat(): unknown audio format".
|
|
d2676c29
|
2016-10-07T17:04:58
|
|
Fixed bug 2924 - SDL_CreateRGBSurface[From] versions that take SDL_PIXELFORMAT enum
Daniel Gibson
Currently, SDL_CreateRGBSurface() and SDL_CreateRGBSurfaceFrom() take Uint32 masks for RGBA to "describe" the Pixelformat of the surface.
Internally those value are only used to map to one of the SDL_PIXELFORMAT_* enum values that are used for further processing.
I think it would be both handy and more efficient to be able to specify SDL_PIXELFORMAT_* yourself without using SDL_PixelFormatEnumToMasks() to create masks first, so I implemented functions that do that:
SDL_CreateRGBSurfaceWithFormat() and SDL_CreateRGBSurfaceWithFormatFrom() which are like the versions without "WithFormat" but instead of taking 4 Uint32s for R/G/B/A masks, they take one for a SDL_PIXELFORMAT_* enum value.
Together with https://bugzilla.libsdl.org/show_bug.cgi?id=2923 creating a SDL_Surface* from RGBA data (e.g. from stb_image) is as easy as
surf = SDL_SDL_CreateRGBSurfaceWithFormat(0, w, h, bppToUse*8, SDL_PIXELFORMAT_RGBA32);
|
|
73f2c541
|
2016-10-07T16:44:42
|
|
Fixed bug 2885 - SDL_stdinc.h doesn't need to include iconv.h
Ryan C. Gordon
We still include iconv.h in SDL_stdinc.h, probably because this header might have referenced the native iconv functions and types directly. Since these are hidden behind a stable ABI now and never just a #define for the system iconv, we shouldn't need this header included from a public SDL header anymore, slowing down external apps compiles and pulling tons of stuff into the namespace.
|
|
7d2108ce
|
2016-10-07T19:39:43
|
|
audio: Backed out the audio-thread detaching changes.
It added a ton of complexity. A simpler solution might arise at some
point though.
|
|
24df68ea
|
2016-10-07T16:32:58
|
|
Fixed bug 2833 - Access Violation on SDL_PollEvent after init, delay and quit of joystick subsystem
Jan Klass
Not sure if this is limited to the joystick subsystem,
but I created a minimal program for reproducibility,
which is attached.
The issue occurs with my gamepad Razer Onza (an xbox-style gamepad) plugged in.
On initialization, the gamepad is being recognized.
After quitting the subsystem, the poll will receive the joystick added event,
which it instantly handles itself, calling SDL_SYS_JoystickDetect again,
which this time calls IDirectInput8_EnumDevices with dinput = NULL (after it was released on quit).
This seems to lead to an access violation within said function, which I have no source for.
|
|
dac38928
|
2016-10-07T16:19:50
|
|
Fixed bug 2832 - Inverted arrow-key navigation in MessageBox
Jan Hellwig
On Windows, you are able to navigate between the buttons on a MessageBox that was created using SDL_ShowMessageBox using the arrow keys. However, if you press the left arrow key, the selection jumps to the button on the right of the currently selected one (and vice versa).
This can be fixed by reversing the order in which the buttons are added to the dialog.
The attached patch files fixes this problem. However the first press of an arrow key leads to the selection of the leftmost or rightmost button on the MessageBox, not to the selection of the button left/right of the one that is selected by default.
|
|
8bc5c57d
|
2016-10-07T16:13:37
|
|
Fixed recentering triggers when the application doesn't have focus
|
|
72164985
|
2016-10-07T16:04:15
|
|
Fixed bug 2823 - Release events for triggers receive wrong centered value
Ryochan7
I have been using SDL 2 for a little project that I have been developing for a while. My project is called antimicro and it takes gamepad input and then translates gamepad events into keyboard and mouse events. SDL is used to read the input from an XInput gamepad and it works great for the most part. However, there is one glaring problem that I have encountered.
When a device is unplugged and SDL sends the centered value release events for all axes, buttons, and hats, SDL does not use the proper centered value for the triggers. It pushes an SDL_JOYAXISMOTION event onto the queue with a value of 0 for all axes. That value is converted to around 16,000 for a Game Controller. That value is incorrect for triggers and, in my program, that causes any bindings that are assigned to the triggers to get activated. With most profiles, that will typically mean that a mouse right click and left click will be activated before the device is finally seen as removed and then those bindings are released by antimicro.
|
|
f674f231
|
2016-10-07T15:21:19
|
|
Fixed bug 2808 - Fix SDL reporting wrong window size on resume
Jonas Kulla
At startup time, the single android window is assigned a "windowed" (window->windowed.{w,h}) size based on the current orientation of the mobile device; this size is never updated throughout the lifetime of the app.
This becomes problematic when the app is paused and then resumed in an orientation that it did not start up in. Eventually, 'SDL_OnWindowRestored()' is called, which calls 'SDL_UpdateFullscreenMode()'. This function is very problematic because it is written with a desktop monitor in mind: it tries to find a matching display mode for the windowed size, doesn't find any, and finally applies the windowed size as the fullscreen one. In the end, the windowed size is reported in a RESIZED event, which doesn't correspond to the actual surface size.
To see this in action: Start an orientation aware SDL app in eg. portrait mode, suspend the app, put the device into landscape orientation and resume the app. It will erroneously render in portrait mode (until the device is rotated again).
|
|
5c1ab403
|
2016-10-07T15:08:37
|
|
Applied Ubuntu patch bug_822210_fix_sdl2-config.cmake_whitespace.patch
|
|
f6a280ab
|
2016-10-07T15:13:46
|
|
audio: Don't trust audio drivers to drain pending audio.
This tends to be a frequent spot where drivers hang, and the waits were
often unreliable in any case.
Instead, our audio thread now alerts the driver that we're done streaming audio
(which currently XAudio2 uses to alert the system not to warn about the
impending underflow) and then SDL_Delay()'s for a duration that's reasonable
to drain the DMA buffers before closing the device.
|
|
551cdc8d
|
2016-10-07T14:42:24
|
|
audio: better way to calculate buffer drain wait times.
|
|
76f48acf
|
2016-10-07T14:35:25
|
|
audio: threading and device hang improvements.
This tries to make SDL robust against device drivers that have hung up,
apps don't freeze in catastrophic (but not necessarily uncommon) conditions.
Now we detach the audio thread and let it clean up and don't care if it
never actually runs to completion.
|
|
3b0c7936
|
2016-10-07T11:18:55
|
|
Some systems include both "default:" and "hw:" for the same usb device
|
|
8e199461
|
2016-10-06T06:08:16
|
|
fix for finding ALSA hotplug devices on Steam Link
James Zipperer
The device names show up as "default:", not "hw:"
|
|
9257b72d
|
2016-10-05T00:12:16
|
|
Backed out a very unsafe change that was trying to prevent audio hang at quit.
Ryan and I have ideas on a better way to handle this.
|
|
46f44f66
|
2016-10-04T14:25:31
|
|
Fixed potential buffer overflow in SDL_vsnprintf() (thanks, Taylor!).
Fixes Bugzilla #3441.
"When using internal SDL_vsnprintf(), and source string length is greater
than destination, the final NULL char will be written beyond destination size.
Primary issue that is SDL_strlcpy returns length of source string
(SDL_PrintString()), not how much is written to destination. The destination
ptr is then incremented by this length before the sanity check is done.
Destination string is properly terminated, but an extra NULL char will be
written beyond destination buffer length.
Patch used internally is attached which fixes primary issue with SDL_strlcpy()
in SDL_PrintString() and adjusts sanity checks to increment destination ptr
safely."
|
|
bac61096
|
2016-10-04T06:48:07
|
|
ensure SDL_AUDIODEVICEREMOVED gets sent when hotplug removes a device
James Zipperer
The problem I was seeing was that the the ALSA hotplug thread would call SDL_RemoveAudioDevice, but my application code was not seeing an SDL_AUDIODEVICEREMOVED event to go along with it. To fix it, I added some code into SDL_RemoveAudioDevice to call SDL_OpenedAudioDeviceDisconnected on the corresponding open audio device. There didn't appear to be a way to cross reference the handle that SDL_RemoveAudioDevice gets and the SDL_AudioDevice pointer that SDL_OpenedAudioDeviceDisconnected needs, so I ended up adding a void *handle field to struct SDL_AudioDevice so that I could do the cross reference.
Is there some other way beside adding a void *handle field to the struct to get the proper information for SDL_OpenedAudioDeviceDisconnected?
|
|
69cf1703
|
2016-10-04T06:46:46
|
|
fix deadlock on close device
James Zipperer
snd_pcm_drain doesn't always drain when you unplug a usb device. Use snd_pcm_drop instead
|
|
2558c9c8
|
2016-10-04T06:45:28
|
|
fix audio deadlock
James Zipperer
Close the audio device before waiting for the audio thread to complete, which fixes a situation where the audio thread never completes
Add an additional check in the audio thread to see if the device is enabled and bail out if the device is no longer enabled
|
|
56c88c45
|
2016-10-04T04:08:02
|
|
Modified the custom cursor test to be able to load BMP files as cursors
|
|
a21a227a
|
2016-10-04T03:50:28
|
|
Fixed bug 3021 - HapticOpenFromJoystick() problems
Joe Thompson
With Direct Input device (MOMO Steering Wheel w/FF)
with SDL 2.0.3,
SDL_HapticOpenFromJoystick() would fail. (Can't set exclusive mode)
Now with 2.0.4 rc1,
SDL_HapticOpenFromJoystick() succeeds but the the returned SDL_Haptic* cannot be used. Calls to SDL_HapticNewEffect() fail with "Haptic error Unable to create effect"
If SDL_HapticOpen() is used instead of HapticOpenFromJoystick(), the device is usable. Calls to HapticNewEffect() succeed with the exact same parameters as the previous failing call.
I have attached a proposed patch for this issue.
When using SDL_HapticOpenFromJoystick(), the original code did not (re)enumerate the axes. This returned a new haptic device with 0 axes. Later, when a new effect is created, SDL_SYS_SetDirection() would set the flags to include DIEFF_SPHERICAL, regardless of what the caller actually set. (see Line 566 in SDL_dinputhaptic.c). This would cause the SDL_HapticNewEffect() to fail (or interpret the coordinates incorreclty.)
The patch moves the call to IDirectInputDevice8_EnumObjects() outside of the if() block so that the axes are (re)enumerated for the new haptic device.
Note: For steering wheels it is common for the joystick to have multiple axes (ie steering, throttle, brake), but the haptic portion of the joystick usually only applies to steering.
|
|
1051dceb
|
2016-10-04T03:42:42
|
|
Fixed compiler warning about missing field initializers
|
|
5d5127c4
|
2016-10-04T03:38:39
|
|
Fixed compiler warning - this should have been a const char pointer
|
|
351adf15
|
2016-10-04T02:11:52
|
|
Fixed bug 2157 - Caps Lock key produces key down & key up events while key is still pressed.
Tim McDaniel
Using checkkeys test app:
* Press and hold Caps Lock key.
* checkkeys reports a CapsLock key pressed event and a CapsLock key released event.
* Release Caps Lock key.
* checkkeys reports no further events.
This patch fixes OSX Caps Lock up/down event detection by installing a HID callback.
|
|
34eebfba
|
2016-10-03T03:42:10
|
|
Fixed setting the version info in the shared library when using CMake
Ray Molenkamp
When building sdl as shared lib, the version info is lacking in the final binary.
CMake gathers the right resource files into ${VERSION_SOURCES} but then doesn't do anything with them.
|
|
752931d8
|
2016-10-03T11:35:34
|
|
Improve X11 key handling when XKB isn't available + add xvnc scancodes.
Based on a patch by Bill Lash (see bug 3094).
|
|
05ca784e
|
2016-10-02T22:32:50
|
|
Android: Fixed compile error.
|
|
67bf5cac
|
2016-10-02T22:32:35
|
|
Fixed wrong pixel format if reading pixels from OpenGL renderer.
|
|
f8aa4291
|
2016-10-02T22:32:18
|
|
Added brackets to function names in header comments so that doxygen links them.
|
|
969c3167
|
2016-10-01T18:49:15
|
|
Fixed MinGW-w64 build warnings in SDL_render_d3d11.c
Some of these were legitimate bugs, including:
- a malformed SDL_snprintf call
- a probably-invalid enum comparison
|
|
702d9348
|
2016-10-01T15:23:43
|
|
Added SDL prefix to local IID constants
|
|
8500de8f
|
2016-10-01T19:16:46
|
|
Fix tabs -> spaces
|
|
4e6f2199
|
2016-10-01T15:14:48
|
|
Fixed bug 3065 - Screen is flickering during closing on-screen keyboard on Android
Deve
When I'm trying to close on-screen keyboard using SDL_StopTextInput() function by touching the screen (SDL_FINGERUP or SDL_FINGERDOWN event), the screen is flickering. It is white for a while.
Note that it usually works without problems when I use phone's "back" button. I noticed flickering occasionally too, but not that often.
Philipp Wiesemann
The attached patch maybe fixes the flicker but not the actual fault causing it.
|
|
f0539aa2
|
2016-10-01T19:12:58
|
|
Fix bug 3436 - SDL_RaiseWindow not working on windows
|
|
c9be93c6
|
2016-10-01T15:11:18
|
|
Fixed bug 3078 - cmake: fix sdl2.m4 install location on cross hosts
Timo Gurr
On cross hosts running autotools for SDL2_gfx-1.0.1 fails to find sdl2.m4:
eautoreconf: running in /var/tmp/paludis/build/media-libs-SDL2_gfx-1.0.1/work/SDL2_gfx-1.0.1 ...
aclocal
aclocal-1.13: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:128: warning: macro 'AM_PATH_SDL2' not found in library
libtoolize --copy --force --automake
aclocal
aclocal-1.13: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:128: warning: macro 'AM_PATH_SDL2' not found in library
autoconf
configure.in:128: error: possibly undefined macro: AM_PATH_SDL2
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
* Failed Running autoconf !
SDL2 installs it to /usr/x86_64-pc-linux-gnu/share/aclocal on cross hosts, attached patch makes use of CMAKE_INSTALL_FULL_DATAROOTDIR to support correctly installing to the arch independent location /usr/share/aclocal.
|
|
3c8a2698
|
2016-10-01T18:10:50
|
|
WinRT: build fix in joystick code
|
|
7851eb08
|
2016-10-01T18:10:15
|
|
Fixed bug 3437 - build error for WinRT/UWP .dlls, caused by fix for SDL bug 3336
This fix has been tested with both MinGW-w64, and Visual C++ 2012-2015.
|
|
ac7d1174
|
2016-10-01T15:04:13
|
|
Fixed build on older Raspberry Pi environments
|
|
a0d3e0d6
|
2016-10-01T14:56:53
|
|
Fixed warning and code style in SDL_evdev.c
|
|
d2c8c509
|
2016-10-01T14:54:05
|
|
Fixed build for X11
|
|
7b34f47e
|
2016-10-01T14:50:22
|
|
Fixed windows build
|
|
fa0f4176
|
2016-10-01T14:48:18
|
|
Fixed build warnings and errors
|
|
fae5d0ea
|
2016-10-01T14:34:52
|
|
Fixed bug 3107 OSX - Process events in SDLApplication to fix integration with CEF.
John Wordsworth
While attempting to integrate CEF (Browser) into an SDL application, we noticed that there were problems on OS X where approximately 50% of the input events were essentially being lost - even when we were using off-screen rendering in CEF and passing through input events manually.
It appears that this problem has been around for a while (see: http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=11141).
Please consider the following patch that fixes this issue. Instead of processing events directly after calling [NSApp nextEventMatchingMask:...] we now pass these events down to NSApp, for processing by an overloaded sendEvent: method. Chromium also forwards events to NSApp in the same way, which means we don't miss events, even if they were originally dequeued by CEF.
|
|
c8cfccc2
|
2016-10-01T14:31:00
|
|
Fixed bug 3116 - renderer->hidden in SDL_RenderCopy(Ex)
Daniel
Seems like check of the visibility of renderer (renderer->hidden) is missing in SDL_RenderCopyEx.
In SDL_RenderCopy it should be done much earlier (after checking support for RenderCopyEx, line 1750).
|
|
359f59ae
|
2016-10-01T14:22:10
|
|
Fixed bug 3130 - Spacebar not responding
Alex Baines
Make sure group is valid before passing it to XkbKeysymToKeycode.
|
|
555e6c96
|
2016-10-01T14:18:29
|
|
Fix SDL not resizing window when Android screen resolution changes
|
|
0250eb3c
|
2016-10-01T14:16:04
|
|
Fixed bug 3134 - CalculateXRandRRefreshRate() returns incorrect refresh rate due to floating point truncation.
Michael
In SDL_x11modes.c the CalculateXRandRRefreshRate() function performs integer math on values that may return fractional results. This causes a value that would be calculated as 59.99972... to be returned as 59. In Linux the xrandr command returns 60Hz for this particular display mode yet SDL returns 59Hz.
I suggest this function be updated to correctly round the result of the calculation instead of truncating the result.
|
|
64180d22
|
2016-10-01T14:05:35
|
|
Fixed bug 3138 - c_dfDIJoystick2 already defined in dinput8.lib
Machiel van Hooren
In SDL_dxjoystick.c line 349 there is a constant c_dfDIJoystick2.
However, this constant is aparently also defined in dinput8.lib.
I encountered a linking error when statically linking to SDL:
SDL2_static.lib(SDL_dxjoystick.obj) : error LNK2005: _c_dfDIJoystick2 already defined in dinput8.lib
My application is also linking to dinput8.lib because we rolled our own joystick input and are not using the joystick functionality from SDL.
|
|
da6197c5
|
2016-10-01T13:59:59
|
|
Fixed 3149 - Mouse Pointer Raspberry Pi corrupt when moving over screen edges
Patrick Gutlich
The mouse cursor gets corrupted when the mouse moves over the screen edges (right and bottom) a weird type of scaling seems to occur and you end up with a blank square.
|
|
1a31bbe2
|
2016-10-01T13:51:56
|
|
Fixed bug 3157 - Rudimentary touchscreen support in SDL_evdev (supports Raspberry Pi)
tvc
I've spent the last few days implementing touchscreen support in core/linux/SDL_evdev.c. It's fairly rudimentary at the moment, as can be seen from the multiple TODO's and FIXME's littered throughout, but I'm mainly submitting this patch for review. I've tested this patch on my Raspberry Pi 2 with the official touchscreen and it works fantastically, reporting all 10 multitouch points. I'm happy to work on this further, the evdev logic also needs a bit of a cleanup I think (I may have included a few changes). But if it's good enough in its current state to be committed then I'm sure there'd be plenty of people pleased, as currently the only other framework/library that supports touchscreens on the Raspberry Pi is Kivy.
|
|
473051f6
|
2016-10-01T13:40:01
|
|
Fixed bug 3159 - SDL_blit_slow with BLENDING does not work
Fritzor
Source Suface is ABGR and Destination Surface is ABGR. We use software blending. In the Switch-Case statement for SDL_COPY_BLEND (Line 126) the alpha-channel is not calculated like in every SDL_blit_auto - function. So if the destination Surface has alpha - channel of zero the resulting surface has zero as well.
Add: ?dstA = srcA + ((255 - srcA) * dstA) / 255;? to code and everything is okay.
|
|
13dd2ccd
|
2016-10-01T13:38:30
|
|
Fixed bug 3161 - SDL_WINDOWEVENT_EXPOSED event possible queue overflow
Marcel Bakker
Observed when resizing or moving a window in Windows 7.
Depending on how you resize/move your window
, you may receive none or a lot of SDL_WINDOWEVENT_EXPOSED events
, at the moment you release the mouse button.
Maybe add this event to an already existing list of overflow candidates ?
|
|
614cb35a
|
2016-10-01T13:35:36
|
|
Fixed bug 3165 - define numbers don't match types in Swift
C.W. Betts
Swift is very strict with types, so much that those of different signedness/size must be cast. Most of the defines are imported as 32-bit signed integers, while the corresponding field in a struct is a 32-bit unsigned integer. Appending a "u" would cause the defined types to be imported as 32-bit unsigned integers.
|
|
ecea3c4a
|
2016-10-01T13:33:32
|
|
Fixed bug 3169 - GLES2_CreateRenderer does not check SDL_GL_GetAttribute result, causing use of uninitialized data
Yann Dirson
When attempting to force use of opengles2 renderer with:
int wanted_renderer = -1;
for (int i = 0; i < numrenderers; i++) {
SDL_RendererInfo renderer_info;
if (SDL_GetRenderDriverInfo(i, &renderer_info) != 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't get renderer driver info: %s\n",
SDL_GetError());
quit(2);
}
std::cerr << "Renderer " << i << " '" << renderer_info.name << "': flags=0x"
<< std::hex << renderer_info.flags << std::dec
<< ", " << renderer_info.num_texture_formats << " texture formats, max="
<< renderer_info.max_texture_width << "x"
<< renderer_info.max_texture_height << "\n";
if (!strcmp(renderer_info.name, "opengles2")) {
std::cerr << " selecting!\n";
wanted_renderer = i;
}
}
renderer = SDL_CreateRenderer(window, wanted_renderer, 0);
... on banana pi or raspberry pi I get an error like the following (the actual
context profile value varies, being used uninitialized)
ERROR: Couldn't create renderer: Unknown OpenGL context profile 900
With this patch I get the following, which should help more pointing to a real problem:
ERROR: Couldn't create renderer: Failed getting OpenGL glGetString entry point
I pushed a patch (based on master branch of unofficial git mirror):
https://github.com/O-Computers/SDL/commit/550389c89f4e73a0a5294f95b9f6e6c18ba48509
I'll be opening a different bug for the underlying issue.
|
|
67901f53
|
2016-10-01T13:29:30
|
|
Fixed bug 3174 - SDL_SetRenderTarget clip rect
Marcel Bakker
In SDL_SetRenderTarget(),
i think the intended behavior was to clear the clip rect when a new target is set.
|
|
f4b26cd8
|
2016-10-01T13:16:31
|
|
Removed carriage returns from previous patch
|
|
7b0ccd32
|
2016-10-01T13:14:51
|
|
Fixed bug 3405 - Wrong default icon size on windows systems
Evgeny Vrublevsky
Original code in the video/windows/SDL_windowsevents.c registers obsolete WNDCLASS (not WNDCLASSEX). As the result only one icon size is used as the small and normal icons. Also original code doesn't specify required size of an icon. As the result when 256x256 icon is available, the program uses it as a default icon, and it looks ugly.
We have to use WNDCLASSEX and load icons with proper sizes which we can get using GetSystemMetrics.
Better idea. We could use the first icon from resources, like the Explorer does. Patch is included. It also correctly loads large and small icons, so it will look nice everywhere.
|
|
86b4319d
|
2016-10-01T13:07:36
|
|
Fixed bug 3422 - OpenGL ES 1.1 renderer: SDL_UpdateTexture breaks later function calls (missing glDisable)
ny00
Using the OpenGL ES 1.1 renderer, after updating a texture with SDL_UpdateTexture (or SDL_UnlockTexture), a following call to SDL_RenderFillRect draws a rectangle with the wrong color (which appears to be the same as the texture's top-left pixel).
Comparing SDL_render_gles.c:GLES_UpdateTexture to SDL_render_gl.c:GL_UpdateTexture, a missing call to glDisable appears to be the cause. After adding it back, the bug is resolved.
|
|
571f4ce8
|
2016-10-01T17:05:29
|
|
Fix CMake setting an incorrect video backend on iOS
|
|
c2e25651
|
2016-10-01T13:02:20
|
|
Fixed bug 3424 - SDL_GameController: Increase k_nMaxReverseEntries
ny00
On Android, the keycodes KEYCODE_BUTTON_1..16 (actual values 188-203) are translated to SDL_Joystick buttons no. 20-35. These are currently ignored in SDL_gamecontroller.c.
The attached patch fixes this, by increasing k_nMaxReverseEntries from 20 to another arbitrary bound of 48.
Side-note: Maybe some log should be emitted in case of going over any such bound?
|
|
8d8e490d
|
2016-10-01T12:56:28
|
|
Fixed bug 3262 - Premake scripts are not compatible with "Genie" (premake fork)
jfverdon
Genie (https://github.com/bkaradzic/genie) is a well known premake fork which uses internally Lua 5.3 (as opposed to version 5.1 used in premake4).
As there is some Lua's API breaks in Lua 5.2, SDL premake scripts do not works with premake.
The two incompatibilities I noticed were:
* unhandle modes "rt" and "wt" for io.open. Has io.open opens files in text mode by default, the "t" flag is not needed (this flag is not supported in Genie).
* os.execute signature change, the return value is a tuple from Lua 5.2, before it was just the called program exit code.
|
|
671f2a49
|
2016-10-01T12:54:48
|
|
Fixed bug 3268 - CMAKE: ios fixes
Martin Gerhardy
ios is not properly handled in the cmake file.
this patch is a start to do so - it properly builds for me with it.
|
|
6a9ee8fa
|
2016-10-01T12:52:55
|
|
Fixed bug 3276 - build-scripts/showrev.sh prints the tip, which isn't useful if you're on a different -# branch, or just not sync'd to the tip.
winterknight
The showrev.sh script shows the tip, instead of the current hg revision. This can be mismatched if one were to use hg update -r ??? to revert to a previous revision.
Patch uses parents instead of tip, which will show the revision that the source is compiled with, instead of the latest revision that the user who is compiling has downloaded.
|
|
bb24662c
|
2016-10-01T12:48:08
|
|
Fixed bug 3301 - IBus support on Linux with CMake
joe.gsoc16
I recently looked into Unicode support in SDL2 and realized that
SDL_TEXTEDITING doesn't get triggered at all (Japanese IME).
According to others on IRC it works fine on Windows/Mac but not
for me on (arch)Linux.
When compiling SDL with autotools, IBus support is enabled by
default but not so with CMake.
I never used CMake before but got it working and also included
that pkg-config determines flags for dbus (FIXME in CMakeLists).
|
|
765d8bea
|
2016-10-01T12:46:36
|
|
Fixed bug 3305 - Fixed TextInput status when the keyboard was dismissed with the dismiss key on the iPad
Diego
The keyboard on iPads has a dismiss button that hides the keyboard. When the keyboard was hidden using that button, instead of the return key, SDL was still reporting IsTextInputActive as true. This patch adds an extra SDL_StopTextInput when iOS reports the keyboard will hide.
|
|
f032f811
|
2016-10-01T12:43:14
|
|
Fixed bug 3318 - testime.c enhancement with GNU Unifont support
Simon Hug
I'm proposing some changes to the IME test program test/testime.c. The patch includes support for the GNU Unifont hex file, making the SDL_ttf dependency optional. There were also one or two bugs that prevented the text and underline from showing up poperly.
|
|
3ac201cf
|
2016-10-01T12:33:26
|
|
Fixed bug 3319 - Getting the POSIX out of testqsort.c
Simon Hug
There's a call to the POSIX function random in test/testqsort.c. Naturally, Windows doesn't do that. The attached patch changes the call to the SDLtest framework random functions and adds some seed control.
Looking at SDLTest_RandomInitTime, I just want to say that 'srand((unsigned int)time(NULL)); a=rand(); srand(clock()); b=rand();' is an absolutely terrible way to initialize a seed on Windows because of its terrible LCG.
|
|
d870f271
|
2016-10-01T12:31:31
|
|
Fixed bug 3320 - SDL_windows_main.c defines both console application entry points
Simon Hug
The SDLmain file src/main/windows/SDL_windows_main.c defines both entry points for console applications, main and wmain. This seems to confuse MSVC. It outputs a LNK4067 warning and then chooses main, which is a shame because only wmain has the unicode handling. Using SDLmain.lib provided on libsdl.org, the linker also goes for main.
I'm proposing to not define the main entry point at all. wmain should be supported well enough with MSVC.
|
|
2cbe9e2b
|
2016-10-01T12:29:55
|
|
Fixed bug 3322 - Missing error checking in testaudioinfo and testaudiohotplug
Simon Hug
The two tests test/testaudioinfo.c and test/testaudiohotplug.c are missing error checking when they call SDL_GetAudioDeviceName. This function can return NULL which the tests pass straight to SDL_Log.
|
|
6f11545a
|
2016-10-01T12:28:05
|
|
Fixed bug 3323 - SDL_LogOutput prints message twice on Windows when linked with libc
Simon Hug
If SDL2 is compiled with HAVE_LIBC on Windows, the SDL_LogOutput function has two ways of printing a message. WriteConsole and fprintf.
|
|
0b576962
|
2016-10-01T12:17:42
|
|
Reset dead keys when the SDL window loses focus, so dead keys pressed in SDL applications don't affect text input into other applications.
|
|
1e6e5954
|
2016-10-01T11:54:02
|
|
Fixed bug 3332 - Win32: reset deadkeys in StartTextInput/StopTextInput
Eric Wasylishen
The bug here is that a dead keys pressed before calling SDL_StartTextInput() carries over into future text input, so the next key pressed will have the deadkey applied to it.
This in undesirable, imho, and doesn't occur on OS X (haven't check Linux or elsewhere). It's causing a problem for Quakespasm on German keyboard layouts, where we use the ^ deadkey to toggle the console (which enables/disables text input), and ^ characters are showing up in the TEXTINPUT events.
|
|
708def87
|
2016-10-01T11:48:15
|
|
Fixed bug 3338 - console_wmain doesn't null terminate the argv array
Simon Hug
The function console_wmain in src/main/windows/SDL_windows_main.c does not null terminate the argument list it is creating. As specified by the C standard, "argv[argc] shall be a null pointer."
The SDLTest framework makes use of that null pointer and some test programs can cause an access violation because it's missing.
|
|
77305d47
|
2016-10-01T11:46:32
|
|
Fixed bug 3345 - SDL_RenderClear inconsistency with ClipRect
Simon Hug
The description of the SDL_RenderClear function in the SDL_render.h header says the following:
"This function clears the entire rendering target, ignoring the viewport."
The word "entire" implies that the clipping rectangle set with SDL_RenderSetClipRect also gets ignored. This is left somewhat ambiguous if only the viewport is mentioned. Minor thing, but let's see what the implementations actually do.
The software renderer ignores the clipping rectangle when clearing. It even has a comment on this: /* By definition the clear ignores the clip rect */
Most other render drivers (opengl, opengles, opengles2, direct3d, and psp [I assume. Can't test it.]) use the scissor test for the ClipRect and don't disable it when clearing. Clearing will only happen within the clipping rectangle for these drivers.
An exception is direct3d11 which uses a clear function that ignores the scissor test.
|
|
89c868f4
|
2016-10-01T11:40:57
|
|
Fixed bug 3347 - OpenGL ES renderer doesn't flip projection matrix for target textures
Simon Hug
When updating the viewport in GLES_UpdateViewport, the OpenGL ES renderer doesn't flip the projection matrix for target textures. The lines, rectangles and textures (if drawn with glDrawArrays) are upside down when drawing to target textures.
|
|
061cc5e7
|
2016-10-01T11:38:53
|
|
Fixed bug 3349 - GLES2_RenderReadPixels doesn't use target texture format
Simon Hug
The OpenGL ES 2 renderer does not check the target texture format when using SDL_RenderReadPixels and just always uses ABGR8888. This can result in swapped or wrong colors.
The attached patch adds a check and selects the target texture format, if a texture is set as the target.
|
|
51d6371e
|
2016-10-01T11:34:04
|
|
Fixed bug 3350 - GL renderers don't need to flip rows after reading back pixels from the target texture
Simon Hug
All OpenGL renderers always flip the rows of the pixels that come from glReadPixels. This is unnecessary for target textures since these are already top down.
Also, the rect->y value can be used directly for target textures for the same reason. I don't see any code that would handle the logical render size for target textures. Or am I missing something?
The attached patch makes the renderers only the flip rows if the data comes from the default framebuffer.
|
|
9fff05f8
|
2016-10-01T11:29:13
|
|
Fixed bug 3352 - Adding alpha mask support to SDL_SaveBMP_RW
Simon Hug
The current SDL_SaveBMP_RW function that saves surfaces to a BMP uses an old bitmap header which doesn't officially support alpha channels. Applications just ignore the byte where the alpha is stored. This can easily be extended by using a newer header version and setting the alpha mask.
The attached patch has these changes:
- Extending the description of the function in the SDL_surface.h header with the supported formats.
- Refining when surfaces get stored to a 32-bit BMP. (Must have bit depth of 8 or higher and must have an alpha mask or colorkey.)
- Fixing a small bug that saves 24-bit BGR surfaces with a colorkey in a 24-bit BMP.
- Adding code that switches to the bitmap header version 4 if the surface has an alpha mask or colorkey. (I chose version 4 because Microsoft didn't lose its documentation behind a file cabinet like they did with version 3.)
- Adding a hint that can disable the use of the version 4 header. This is for people that need the legacy header or like the old behavior better. (I'm not sure about the hint name, though. May need changing if there are any rules to that.)
|
|
53e22e4b
|
2016-10-01T11:22:39
|
|
Only use GCC pragmas when we're building with GCC
|
|
a42c396a
|
2016-10-01T11:04:45
|
|
Fixed bug 3361 - Texture color modulation doesn't work with active NONE blend mode (opengl and opengles)
Simon Hug
The GL_SetBlendMode and GLES_SetBlendMode functions of the opengl and opengles renderers call the glTexEnvf to set the texture env mode to either GL_MODULATE (the default) or GL_REPLACE for the NONE blend mode. Using GL_REPLACE disables color and alpha modulation for textures.
These glTexEnv calls were put in the SetBlendMode function back in 2006 [1], but there the NONE code still used the GL_DECAL mode. The GL_REPLACE mode came in 2008 [2]. I'm a bit confused why that wasn't always GL_MODULATE and a bit surprised nobody reported that yet (unless I missed it). I guess only a few use the gles renderer and the newish shaders mask the issue.
|
|
3f1b1629
|
2016-10-01T10:52:24
|
|
Fixed bug 3362 - OpenGL renderer doesn't check if framebuffers are supported when creating target textures
Simon Hug
The GL_CreateTexture function doesn't have any checks for the case where the driver doesn't support the framebuffer object extension. It will call into GL_GetFBO which will call the non-existent glGenFramebuffersEXT.
Also, for some reason GL_CreateContext always sets the SDL_RENDERER_TARGETTEXTURE info flag, even if it is not supported. Changeset cc226dce7536 [1] makes this change, but doesn't explain why. It seems to me like the code would already have taken care of this [2].
The attached patch adds some checks and stops SDL from reporting render target support if there is none. The application can then properly inform the user instead of just crashing.
|
|
fd1d692b
|
2016-10-01T10:46:10
|
|
Fixed bug 3368 - SDL_Blit_Slow doesn't ignore alpha values in colorkey comparison
Simon Hug
When the SDL_Blit_Slow function compares the pixel to the color key it does so without removing the alpha component from the pixel value and the key. This is different from the optimized 32-bit blitters which create a rgb mask and apply it to both to filter the alpha out. SDL_Blit_Slow will only skip the pixels with the exact alpha value of the key instead of all pixels with the same color.
The attached test case blits a surface with a color key and prints the pixel values to the console. The third row is expected to be skipped.
|
|
2ccb46ce
|
2016-10-01T10:43:01
|
|
Fixed bug 3373 - OpenGL implementation differences of glDrawTexfOES
Simon Hug
It seems not everyone implemented glDrawTexfOES the same. Intel and Mesa ignore the viewport entirely, whereas the Raspberry Pi implementation offsets the coordinates and does viewport clipping.
The glDrawTexfOES extension text [1] for the function says "Xs and Ys are given directly in window (viewport) coordinates." I guess this wasn't clear enough.
Alex Szpakowski
Honestly I'd probably remove that codepath from SDL_Render entirely. It's an OpenGL ES 1-specific extension that isn't likely to give huge performance gains and adds additional maintenance overhead to SDL_Render while also having bugs in some drivers (as seen here).
|
|
ca8ef2b7
|
2016-10-01T10:39:03
|
|
Fix running autogen.sh out-of-tree
As done in GNOME's jhbuild building tool.
https://bugzilla.libsdl.org/show_bug.cgi?id=3374
|
|
9dfe5400
|
2016-10-01T10:38:15
|
|
We should be using a string constant for the strftime format string
|
|
7edd2261
|
2016-10-01T10:36:24
|
|
Fix "format not a string literal" errors
With GCC 6.1.
https://bugzilla.libsdl.org/show_bug.cgi?id=3375
|
|
b7e45f8a
|
2016-10-01T10:28:00
|
|
Fixed bug 3336 - Failure to build with MinGW-w64
Kai Sterker
There are already patches available from mingw64 that fix the issue
https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-SDL2
With those applied, I could compile SDL2 without problems. But of course, it would be preferable if SDL built cleanly from source.
|