Mon, 14 Aug 2017 23:45:06 -0700Fixed bug 2137 - SDL Message Boxes don't cope with fixed width fonts (in windows at least)
Sam Lantinga [Mon, 14 Aug 2017 23:45:06 -0700] rev 11303
Fixed bug 2137 - SDL Message Boxes don't cope with fixed width fonts (in windows at least)

Pegasus Epsilon

With the system dialog font set to Arial or Tahoma or another variable-width font, everything works just as expected. When using a fixed-width font, like Courier or DejaVu Sans Mono, the text gets cut off. Example screenshots attached.

Mon, 14 Aug 2017 21:40:40 -0700Fixed bug 2263 - Event timestamp members are undocumented
Sam Lantinga [Mon, 14 Aug 2017 21:40:40 -0700] rev 11302
Fixed bug 2263 - Event timestamp members are undocumented

Charles Huber

The event timestamp members should be documented to indicate their meaning and units.

Currently the timestamps are populated using SDL_GetTicks() in SDL_PushEvent() in SDL_events.c.

Mon, 14 Aug 2017 21:35:16 -0700Hopefully fixed Wayland build
Sam Lantinga [Mon, 14 Aug 2017 21:35:16 -0700] rev 11301
Hopefully fixed Wayland build

Mon, 14 Aug 2017 21:28:04 -0700Fixed bug 2293 - Precise scrolling events
Sam Lantinga [Mon, 14 Aug 2017 21:28:04 -0700] rev 11300
Fixed bug 2293 - Precise scrolling events

Martijn Courteaux

I implemented precise scrolling events. I have been through all the folders in /src/video/[platform] to implement where possible. This works on OS X, but I can't speak for others. Build farm will figure that out, I guess. I think this patch should introduce precise scrolling on OS X, Wayland, Mir, Windows, Android, Nacl, Windows RT.

The way I provide precise scrolling events is by adding two float fields to the SDL_MouseWheelScrollEvent datastructure, called "preciseX" and "preciseY". The old integer fields "x" and "y" are still present. The idea is that every platform specific code normalises the scroll amounts and forwards them to the SDL_SendMouseWheel function. It is this function that will now accumulate these (using a static variable, as I have seen how it was implemented in the Windows specific code) and once we hit a unit size, set the traditional integer "x" and "y" fields.

I believe this is pretty solid way of doing it, although I'm not the expert here.

There is also a fix in the patch for a typo recently introduced, that might need to be taken away by the time anybody merges this in. There is also a file in Nacl which I have stripped a horrible amount of trailing whitespaces. (Leave that part out if you want).

Mon, 14 Aug 2017 20:45:14 -0700Fixed Android build warning
Sam Lantinga [Mon, 14 Aug 2017 20:45:14 -0700] rev 11299
Fixed Android build warning

Mon, 14 Aug 2017 20:37:07 -0700Fixed build warning
Sam Lantinga [Mon, 14 Aug 2017 20:37:07 -0700] rev 11298
Fixed build warning

Mon, 14 Aug 2017 20:25:53 -0700Added missing files from the previous commit
Sam Lantinga [Mon, 14 Aug 2017 20:25:53 -0700] rev 11297
Added missing files from the previous commit

Mon, 14 Aug 2017 20:22:19 -0700Fixed bug 2330 - Debian bug report: SDL2 X11 driver buffer overflow with large X11 file descriptor
Sam Lantinga [Mon, 14 Aug 2017 20:22:19 -0700] rev 11296
Fixed bug 2330 - Debian bug report: SDL2 X11 driver buffer overflow with large X11 file descriptor

manuel.montezelo

Original bug report (note that it was against 2.0.0, it might have been fixed in between): http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733015

--------------------------------------------------------
Package: libsdl2-2.0-0
Version: 2.0.0+dfsg1-3
Severity: normal
Tags: patch

I have occasional crashes here caused by the X11 backend of SDL2. It seems to
be caused by the X11_Pending function trying to add a high number (> 1024)
file descriptor to a fd_set before doing a select on it to avoid busy waiting
on X11 events. This causes a buffer overflow because the file descriptor is
larger (or equal) than the limit FD_SETSIZE.

Attached is a possible workaround patch.

Please also keep in mind that fd_set are also used in following files which
may have similar problems.

src/audio/bsd/SDL_bsdaudio.c
src/audio/paudio/SDL_paudio.c
src/audio/qsa/SDL_qsa_audio.c
src/audio/sun/SDL_sunaudio.c
src/joystick/linux/SDL_sysjoystick.c


--------------------------------------------------------

On Tuesday 24 December 2013 00:43:13 Sven Eckelmann wrote:
> I have occasional crashes here caused by the X11 backend of SDL2. It seems
> to be caused by the X11_Pending function trying to add a high number (>
> 1024) file descriptor to a fd_set before doing a select on it to avoid busy
> waiting on X11 events. This causes a buffer overflow because the file
> descriptor is larger (or equal) than the limit FD_SETSIZE.


I personally experienced this problem while hacking on the python bindings
package for SDL2 [1] (while doing make runtest). But it easier to reproduce in
a smaller, synthetic testcase.

Mon, 14 Aug 2017 20:07:30 -0700Fixed compiler warnings
Sam Lantinga [Mon, 14 Aug 2017 20:07:30 -0700] rev 11295
Fixed compiler warnings

Mon, 14 Aug 2017 16:34:54 -0700Fixed bug 2344 - CHECK_WINDOW_MAGIC should include __FILE__ and __LINE__
Sam Lantinga [Mon, 14 Aug 2017 16:34:54 -0700] rev 11294
Fixed bug 2344 - CHECK_WINDOW_MAGIC should include __FILE__ and __LINE__

Martin Gerhardy

just for easier debugging issues in the own code...

SDL_CreateRenderer should maybe also use this macro

Ryan C. Gordon

I'll go one better: it should have an SDL_assert().