Sun, 13 Aug 2017 22:26:44 -0700Added wchar.h to fix build on some platforms with new wcs* functions
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 22:26:44 -0700] rev 11280
Added wchar.h to fix build on some platforms with new wcs* functions

Sun, 13 Aug 2017 21:55:42 -0700Fixed bug 2755 - SDL2 fails to build on Solaris 10 u3
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 21:55:42 -0700] rev 11279
Fixed bug 2755 - SDL2 fails to build on Solaris 10 u3

UX-admin

I am compiling with the Sun Studio 12 u2 compiler. There are multiple issues with the build, but this particular issue appears to be that it is illegal to declare a union of a struct of floats and a float. While GCC 4.8.1 does not flag this as an error, Sun Studio is much more standards compliant and strict, halting further compilation with an error.

Sun, 13 Aug 2017 21:48:40 -0700Fixed bug 2764 - Timer is not rescheduled with the returned interval
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 21:48:40 -0700] rev 11278
Fixed bug 2764 - Timer is not rescheduled with the returned interval

afwlehmann

Sorry for re-opening, but it turns out that the current interval is indeed not updated. I've just checked the source code of the 2.0.3 release again:

163 if (current->canceled) {
164 interval = 0;
165 } else {
166 interval = current->callback(current->interval, current->param);
167 }
168
169 if (interval > 0) {
170 /* Reschedule this timer */
171 current->interval = interval; // <-- this line is missing
172 current->scheduled = tick + interval;
173 SDL_AddTimerInternal(data, current);
174 } else {

According to the documentation: "The callback function is passed the current timer interval and the user supplied parameter from the SDL_AddTimer() call and returns the next timer interval. If the returned value from the callback is 0, the timer is canceled."

If I understand the text correctly, then the current interval should in fact be updated according to the returned value. Otherwise there would be a discrepancy between the next time for which the timer is actually re-scheduled and the value that's passed to the callback once the timer fires again.

This could be fixed by adding line #171.

Sun, 13 Aug 2017 21:18:59 -0700Fixed bug 3743 - make testautomation_sdltest.c to compile
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 21:18:59 -0700] rev 11277
Fixed bug 3743 - make testautomation_sdltest.c to compile

Ozkan Sezer

The attached patch makes testautomation_sdltest.c more compatible wrt
LLONG_{MIN|MAX} macros and makes it to compile on older systems (e.g.
glibc-2.8) too, by replacing LLONG_{MIN|MAX} with INT64_{MIN|MAX}.

c.f.: bug #3494, where the same issue was described for SDL_test_fuzzer.c

Sun, 13 Aug 2017 21:16:58 -0700Fixed bug 3742 - minor warning fixes
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 21:16:58 -0700] rev 11276
Fixed bug 3742 - minor warning fixes

Sun, 13 Aug 2017 21:15:44 -0700Fixed bug 3741 - more compatible initializers for arrays
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 21:15:44 -0700] rev 11275
Fixed bug 3741 - more compatible initializers for arrays

Ozkan Sezer

An array defined like int xPositions[] = {-1, 0, 1, w-1, w, w+1 };
errors with Open Watcom: it strictly wants constants. Small patch
like below makes things more compatible.

Sun, 13 Aug 2017 21:12:14 -0700Fixed bug 3605 - Software renderer no longer renders after Android screen orientation change
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 21:12:14 -0700] rev 11274
Fixed bug 3605 - Software renderer no longer renders after Android screen orientation change

Sylvain

This still happens with the current trunk version. (software renderer of testdrawchessboard.c)

When there is a rotation, the window size changed and the internal surface is marked as "surface_valid == SDL_FALSE".
And all further call fails.

SDL_video.c :

2478 void
2479 SDL_OnWindowResized(SDL_Window * window)
2480 {
2481 window->surface_valid = SDL_FALSE;
2482 SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SIZE_CHANGED, window->w, window->h);
2483 }

some error set to :
2233 return SDL_SetError("Window surface is invalid, please call SDL_GetWindowSurface() to get a new surface");


So, this seems to be the behavior of the API ...


In the loop() function of testdrawchessboard.c, we can recreate the surface/renderer :

65 if (e.type == SDL_WINDOWEVENT)
66 {
67 if (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED)
68 {
69 surface = SDL_GetWindowSurface(window);
70 renderer = SDL_CreateSoftwareRenderer(surface);
71 }
72 /* Clear the rendering surface with the specified color */
73 SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);
74 SDL_RenderClear(renderer);
75 }

And it displays correctly.

Sun, 13 Aug 2017 21:09:00 -0700Fixed bug 3746 - remove SDLCALL attribute from SDL_BlitFunc() funcptr
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 21:09:00 -0700] rev 11273
Fixed bug 3746 - remove SDLCALL attribute from SDL_BlitFunc() funcptr

Ozkan Sezer

The attached patch removes SDLCALL attribute from SDL_BlitFunc() funcptr.

As far as I can see, *SDL_BlitFunc() is completely internal to SDL with
no specific calling convention requirements. The actual functions assigned
to SDL_BlitFunc seem to not have any calling conventions specified. So,
easy solution is simply removing the strict calling convention from the
type.

Sun, 13 Aug 2017 21:06:52 -0700Fixed bug 3744 - missing SDLCALL in several functions
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 21:06:52 -0700] rev 11272
Fixed bug 3744 - missing SDLCALL in several functions

Ozkan Sezer

The attached patch adds missing SDLCALL to several functions, so that
they properly match the headers as intended.

Sun, 13 Aug 2017 21:05:15 -0700Provide the correct state of the on-screen keyboard to the API (patch from Sylvain)
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 21:05:15 -0700] rev 11271
Provide the correct state of the on-screen keyboard to the API (patch from Sylvain)