|
267207ff
|
2016-10-18T23:12:45
|
|
Worked around a crash on Mac OS X 10.10 and earlier, thanks to Eric Wasylishen.
|
|
ae8ca7c5
|
2016-10-17T22:09:22
|
|
Fixed bug 3444 - Android-TV: no more handling of back button on remote
ny00
Unfortunately, simply checking the return codes of "onNativePadDown/Up" as previously done has its own issue:
If an SDL joystick is connected *and* opened, then a proper KeyEvent, say with keycode KEYCODE_BUTTON_1, should lead to an SDL joystick button event as expected.
If, however, the joystick was *not* opened, then "onNativePadDown/Up" will return a negative value, so before the commit from bug 3426, you could unexpectedly get a keyboard event. (In practice, you'll just get a log message, since KEYCODE_BUTTON_1 has no mapping to a proper SDL_ScanCode value, but it's still an problem).
What should still be done, though, is checking the key code itself. We do have the KeyEvent.isGamepadButton method, but according my test, it returns "true" exactly (and only) for the KEYCODE_BUTTON* values, and not for KEYCODE_DPAD* or any other key code.
Here is a possible solution:
- Do check the return codes of "onNativePadDown/Up" as previously done.
- In addition, in "Android_OnPadDown/Up" from src/joystick/android/SDL_sysjoystick.c, 0 should *always* be returned in case the key code can be translated to an SDL_joystick button; Even if no matching joystick can be found.
|
|
8109b137
|
2016-10-17T21:47:33
|
|
Partial fix for bug 3092 - Statically link sdl2 with /MT for msvc
Mike Linford
I'm also having trouble statically linking SDL2 on Visual Studio 2015 with /MT. My symptom is that memcpy is being defined twice.
|
|
0eb5c976
|
2016-10-17T21:44:32
|
|
Fixed bug 3456 - SDL_GameControllerOpen fails if the joystick subsystem isn't initialized
Philipp Wiesemann
Maybe the fault is in the SDL_VIDEO_DRIVER_WINDOWS section in SDL_InitSubSystem() of "src/SDL.c". Because there only SDL_INIT_JOYSTICK is checked. The flags are adapted for SDL_INIT_GAMECONTROLLER afterwards.
|
|
5af67f49
|
2016-10-17T21:37:26
|
|
Fixed bug 3458 - x11: reset deadkeys in StartTextInput/StopTextInput
Eric Wasylishen
The patch makes StartTextInput/StopTextInput call Xutf8ResetIC ( https://www.x.org/releases/X11R7.5/doc/man/man3/XmbResetIC.3.html ) on the XIC of all SDL windows.
This fixes my use case in Quakespasm (Ubuntu 16.04, system keyboard layout set to German. Type the '^' dead key, which opens Quakespasm's developer console and calls SDL_StartTextInput, then press 'e'. I expect the dead key to be ignored.)
Also, here is a patch for sdl2's "checkkeys" for testing this: https://bugzilla-attachments.libsdl.org/attachment.cgi?id=2451
|
|
ba051ae7
|
2016-10-16T22:47:49
|
|
Linux: Added missing scancodes.
|
|
f31ce3fb
|
2016-10-16T22:47:37
|
|
Windows: Fixed not removing the always added hint callback on quit.
This was no real problem because SDL_Quit() also calls SDL_ClearHints().
|
|
c0578f92
|
2016-10-16T22:46:56
|
|
Linux: Removed not needed platform info from entry in controller database.
|
|
099e8a68
|
2016-10-15T20:02:17
|
|
Linux: Fixed compile warnings about unused variables.
|
|
01f62736
|
2016-10-14T17:06:28
|
|
emscripten: check if device pixel ratio has changed
|
|
d5ddb3cb
|
2016-10-14T08:40:21
|
|
Fixed bug 3453 - First mouse button input after a drag and drop event is ignored
Olav Sorensen
After a drag and drop event, any following mouse button input (down/up) doesn't generate an event. Clicking any mouse button a *second* time generates an event like it should.
Further investigation shows that the new SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH logic also causes this issue in other cases, like the first time you open the program and click the mouse.
|
|
8aab39cb
|
2016-10-14T08:27:44
|
|
Fixed bug 3452 - Getting unicode arguments for the main entry point on Windows
Simon Hug
There are currently three entry points in the SDL2_main code for windows: main, wmain and WinMain. Only the latter two properly convert the arguments to UTF-8.
Console applications linked with MSVC will always link with the main entry point (wmain has to be selected by manually setting the entry point). This makes it likely that such programs will not have proper unicode arguments.
|
|
3f38bd91
|
2016-10-14T08:22:48
|
|
Fixed warning about redefining DECLSPEC
|
|
3663dbe8
|
2016-10-14T08:20:40
|
|
Fixed warning about missing field initializers in SDL_DBusContext
Static variables are automatically initialized to zero.
|
|
824ecc8f
|
2016-10-14T08:15:39
|
|
Fixed processing mouse and keyboard events in hatari, which uses the old SDLMain.m without creating an SDLApplication instance
|
|
83cb2b63
|
2016-10-14T06:57:55
|
|
Fixed bug 2758 - Android issues with NDK r10c and API-21
Sylvain
After a long time, I found out more clearly what was going wrong.
The native libraries should be built with a "APP_PLATFORM" as low as possible.
Ideally, APP_PLATFORM should be equals to the minSdkVersion of the AndroidManifest.xml
So that the application never runs on a lower APP_PLATFORM than it has been built for.
An additional good patch would be to write explicitly in "jni/Application.mk": APP_PLATFORM=android-10
(If no APP_PLATFORM is set, the "targetSdkVersion" of the AndroidManifest.xml is applied as an APP_PLATFORM to the native libraries. And currently, this is bad, because targetSdkVersion is 12, whereas minSdkLevel is 10.
And in fact, there is a warning from ndk: "Android NDK: WARNING: APP_PLATFORM android-12 is larger than android:minSdkVersion 10 in ./AndroidManifest.xml".)
to precise what happened in the initial reported test-case:
Let say the "c" code contains a call to "srand()".
with APP_PLATFORM=android-21, libSDL2.so contains a undef reference to "srand()".
with APP_PLATFORM=android-10, libSDL2.so contains a undef reference to "srand48()".
but srand() is missing on devices with APP_PLATFORM=android-10 (it was in fact replaced by srand48()).
So, if you build for android-21 (where srand() is available), you will really have a call to "srand()" and it will fail on android-10.
That was the issue. The path tried to fix this by in fact always calling srand48().
SDL patches that were applied are beneficial anyway, there are implicitly allowing they backward compatibility of using android-21 on a android-10 platform.
It can be helpful in case you want to target a higher APP_PLATFORM than minSdkVersion to have potentially access to more functions.
Eg you want to have access to GLES3 functions (or other) of "android-21". But, if dlopen() fails (on android-10), you do a fall-back to GLES2.
|
|
f3502c3c
|
2016-10-14T01:04:21
|
|
Fixed building with cmake when fcitx isn't installed
|
|
8e2634eb
|
2016-10-14T00:51:57
|
|
Fixed divide by zero if setting integer scale without setting logical width and height
|
|
662f966c
|
2016-10-13T08:46:34
|
|
Fixed bug 3355 - false "Invalid renderer" after creating an "opengles2" renderer.
Call SDL_GL_GetDrawableSize() directly because we may be in the initialization path and SDL_GetRendererOutputSize() will fail because the renderer magic isn't set up yet.
|
|
e4af8ce9
|
2016-10-13T04:57:31
|
|
Fixed typo getting the drawable size
|
|
063f752e
|
2016-10-13T04:54:43
|
|
Fixed bug 3328 - Race condition in Wayland_VideoInit
Robert Folland
When running this little test program with SDL2 on Wayland it often crashes in SDL_Init.
From a backtrace it is apparent that there is a race condition in creating a xkb_context_ref. Sometimes it is 0x0.
By moving the relevant lines higher up in Wayland_VideoInit (in SDL2-2.0.4/src/video/wayland/SDL_waylandvideo.c:302) this seems to get fixed.
I moved the call to WAYLAND_xkb_context_new() up to before the call to WAYLAND_wl_display_connect().
Here is the test program (just a loop of init and quit), and a backtrace from gdb:
#include <cstdio>
#include <stdlib.h>
#include <SDL2/SDL.h>
#include <unistd.h>
#include <iostream>
int main(int argc, char **argv)
{
int count = atoi(argv[1]);
for (int i = 0; i < count; i++) {
std::cout << "Init " << i << std::endl;
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
"Couldn't initialize SDL: %s\n",
SDL_GetError());
return 1;
}
std::cout << "Quit" << std::endl;
SDL_Quit();
}
return 0;
}
Init 12
Quit
Init 13
Program received signal SIGSEGV, Segmentation fault.
xkb_context_ref (ctx=ctx@entry=0x0) at src/context.c:156
156 ctx->refcnt++;
(gdb) bt
#0 xkb_context_ref (ctx=ctx@entry=0x0) at src/context.c:156
#1 0x00007ffff5e1cd4c in xkb_keymap_new (ctx=0x0, format=XKB_KEYMAP_FORMAT_TEXT_V1, flags=flags@entry=XKB_KEYMAP_COMPILE_NO_FLAGS) at src/keymap-priv.c:65
#2 0x00007ffff5e1c6cc in xkb_keymap_new_from_buffer (ctx=<optimized out>,
buffer=0x7ffff7fd5000 "xkb_keymap {\nxkb_keycodes \"(unnamed)\" {\n\tminimum = 8;\n\tmaximum = 255;\n\t<ESC>", ' ' <repeats 16 times>, "= 9;\n\t<AE01>", ' ' <re
peats 15 times>, "= 10;\n\t<AE02>", ' ' <repeats 15 times>, "= 11;\n\t<AE03>", ' ' <repeats 15 times>, "= 12;\n\t<AE04>", ' ' <repeats 12 times>..., length=48090,
format=<optimized out>, flags=<optimized out>) at src/keymap.c:191
#3 0x00007ffff7b8ea4e in keyboard_handle_keymap (data=0x6169b0, keyboard=<optimized out>, format=<optimized out>, fd=5, size=48091)
at /home/vlab/abs/sdl2/src/SDL2-2.0.4/src/video/wayland/SDL_waylandevents.c:269
#4 0x00007ffff64501f0 in ffi_call_unix64 () from /usr/lib/libffi.so.6
#5 0x00007ffff644fc58 in ffi_call () from /usr/lib/libffi.so.6
#6 0x00007ffff665be3e in wl_closure_invoke (closure=closure@entry=0x61f000, flags=flags@entry=1, target=<optimized out>, target@entry=0x616d20,
opcode=opcode@entry=0, data=<optimized out>) at src/connection.c:949
#7 0x00007ffff6658be0 in dispatch_event (display=<optimized out>, queue=<optimized out>) at src/wayland-client.c:1274
#8 0x00007ffff6659db4 in dispatch_queue (queue=0x617398, display=0x6172d0) at src/wayland-client.c:1420
#9 wl_display_dispatch_queue_pending (display=0x6172d0, queue=0x617398) at src/wayland-client.c:1662
#10 0x00007ffff665a0cf in wl_display_roundtrip_queue (display=0x6172d0, queue=0x617398) at src/wayland-client.c:1085
#11 0x00007ffff7b8faa0 in Wayland_VideoInit (_this=<optimized out>) at /home/vlab/abs/sdl2/src/SDL2-2.0.4/src/video/wayland/SDL_waylandvideo.c:302
#12 0x00007ffff7b7aed6 in SDL_VideoInit_REAL (driver_name=<optimized out>, driver_name@entry=0x0) at /home/vlab/abs/sdl2/src/SDL2-2.0.4/src/video/SDL_video.c:513
#13 0x00007ffff7ae0ee7 in SDL_InitSubSystem_REAL (flags=16416) at /home/vlab/abs/sdl2/src/SDL2-2.0.4/src/SDL.c:173
#14 0x0000000000400b24 in main (argc=2, argv=0x7fffffffebb8) at vplay-init.cpp:13
(gdb)
|
|
f94bd057
|
2016-10-13T04:53:01
|
|
Fixed bug 3451 - Raspberry Pi Raspbian SDL_assert triggered sometimes at RPI_WarpMouseGlobal
Eric wing
Sometimes an SDL_assert triggers at RPI_WarpMouseGlobal
src/video/raspberry/SDL_rpimouse.c:232 'update'.
It doesn't always reproduce, but it seems to happen when you really bog down the system and the event loop can't update for awhile.
The first time I hit this, I wasn't even using the mouse. I don't call any warp mouse functions either.
I can usually reproduce with a simple program that runs an expensive blocking CPU series of functions which blocks the main loop until complete (can be up to 10 seconds).
Sometimes this assertion gets triggered after that. I'm not sure if
they are related or coincidental.
Disabling the SDL_asserts when compiling SDL will avoid this problem. I actually haven't seen any problems with the mouse when I do this.
On a Raspberry Pi 2 running Raspbian Jessie.
|
|
3f167a5a
|
2016-10-13T02:19:23
|
|
Added support for the PS4 Slim controller, model CUH-ZCT2U
|
|
741aaf4c
|
2016-10-12T22:34:54
|
|
Added a note on how to allow non-root applications to increase their thread priority on Linux
|
|
62310c6b
|
2016-10-12T22:25:19
|
|
Work-around for a hang when USB devices are unplugged, contributed by James Zipperer
|
|
14e7da75
|
2016-10-12T19:50:16
|
|
Backed out change 7d3df1df4e91 which was: Fixed bug 3320 - SDL_windows_main.c defines both console application entry points
With that change only the wmain() entry point was defined, and applications that linked with main() would no longer build.
|
|
3a77b42d
|
2016-10-12T18:45:56
|
|
Fixed build warning
|
|
f6bcfa01
|
2016-10-12T23:38:31
|
|
X11: Fixed compile warning about unused variable.
|
|
9d0e0749
|
2016-10-12T23:36:29
|
|
Linux: Removed redundant function call.
|
|
cfb24c76
|
2016-10-12T00:01:17
|
|
Fixed pointer signedness warning
|
|
36e40d30
|
2016-10-11T23:19:05
|
|
Fixed bug 2923 - Add SDL_PIXELFORMAT_RGBA32 for byte-wise 32bit RGBA data
Daniel Gibson
Ok, I followed the simple approach of just making SDL_PIXELFORMAT_RGBA32 an alias of SDL_PIXELFORMAT_RGBA8888/SDL_PIXELFORMAT_ABGR8888, depending on endianess. And I did the same for SDL_PIXELFORMAT_ARGB32, .._BGRA, .._ABGR.
SDL_GetPixelFormatName() will of course return SDL_PIXELFORMAT_RGBA8888 (or SDL_PIXELFORMAT_ABGR8888) instead of SDL_PIXELFORMAT_RGBA32, but as long as that's mentioned in the docs it shouldn't be a problem.
|
|
564c790f
|
2016-10-11T17:31:29
|
|
Fixed a memory leak in function GL_RenderReadPixels
|
|
fed9b604
|
2016-10-10T23:26:26
|
|
Use SDL C runtime strlen()
|
|
ca42373f
|
2016-10-10T15:29:18
|
|
alsa: more tapdancing to enumerate physical hardware devices.
Apparently some systems see "hw:", some see "default:" and some see
"sysdefault:" (and maybe others!). My workstation sees both "hw:" and
"sysdefault:" ...
Try to find a prefix we like and prioritize the prefixes we (think) we want
most. If everything else fails, if there's a "default" (not a prefix) device
name, list that by itself so the user gets _something_ here.
If we can't find a prefix we like _and_ there's no "default" device, report
no hardware found at all.
|
|
aae28e3e
|
2016-10-10T18:28:05
|
|
Fixed bug 3096 - SDL_BlitSurface with overlapping source and destination
|
|
9db5e9aa
|
2016-10-10T02:58:29
|
|
Made #if defined(X) consistent
|
|
6dedbc43
|
2016-10-10T02:58:12
|
|
Make sure we have iconv.h before building with it
|
|
f9b15a94
|
2016-10-09T20:31:04
|
|
Linux: Fixed mixed up scancodes.
|
|
42f85aa2
|
2016-10-08T11:30:07
|
|
Fixed building and using fcitx IME support on Linux
|
|
27d4f099
|
2016-10-07T23:40:44
|
|
Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
|
|
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.
|
|
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
|
|
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).
|
|
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
|
|
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.
|
|
d9e3972a
|
2016-10-03T15:31:11
|
|
Fix invalid read from poor setlocale usage.
|
|
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).
|
|
67bf5cac
|
2016-10-02T22:32:35
|
|
Fixed wrong pixel format if reading pixels from OpenGL renderer.
|
|
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
|
|
f0539aa2
|
2016-10-01T19:12:58
|
|
Fix bug 3436 - SDL_RaiseWindow not working on windows
|
|
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 ?
|
|
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.
|