Mon, 14 Aug 2017 10:15:38 -0700Fixed bug 3752 - minor os2 defines
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 10:15:38 -0700] rev 11287
Fixed bug 3752 - minor os2 defines

Ozkan Sezer

Attached three patches, so these minor os/2 bits get registered mainstream:

1. SDL_syswm.h: add SDL_SYSWM_OS2 to SDL_SYSWM_TYPE enum
2. SDL_platform.h: recognize __EMX__ too as __OS2__
3. begin_code.h: set SDLCALL as _System for OS/2.

Mon, 14 Aug 2017 10:14:07 -0700Fixed compiler warning with enum
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 10:14:07 -0700] rev 11286
Fixed compiler warning with enum

Mon, 14 Aug 2017 10:04:59 -0700Fixed setting the texture blend mode in the OpenGL ES2 renderer
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 10:04:59 -0700] rev 11285
Fixed setting the texture blend mode in the OpenGL ES2 renderer

Mon, 14 Aug 2017 06:28:21 -0700Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 06:28:21 -0700] rev 11284
Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks

Patches contributed by Ozkan Sezer

Mon, 14 Aug 2017 06:18:08 -0700Fixed bug 3191 - haptic system on android?
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 06:18:08 -0700] rev 11283
Fixed bug 3191 - haptic system on android?

Sylvain

- add vibrator service in the list of haptic devices. I use an hard-coded device_id for it ...

Mon, 14 Aug 2017 05:51:44 -0700Implemented more flexible blending modes for accelerated renderers
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 05:51:44 -0700] rev 11282
Implemented more flexible blending modes for accelerated renderers

This fixes bug 2594 - Propose new blend mode, SDL_BLENDMODE_BLEND_DSTA

blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA,
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
SDL_BLENDOPERATION_ADD,
SDL_BLENDFACTOR_ZERO,
SDL_BLENDFACTOR_ONE,
SDL_BLENDOPERATION_ADD);

This fixes bug 2828 - Subtractive Blending

blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA,
SDL_BLENDFACTOR_ONE,
SDL_BLENDOPERATION_SUBTRACT,
SDL_BLENDFACTOR_ZERO,
SDL_BLENDFACTOR_ONE,
SDL_BLENDOPERATION_SUBTRACT);


This goes partway to fixing bug 3684 - Add support for a pre-multiplied alpha blending mode

blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_ONE,
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
SDL_BLENDOPERATION_ADD,
SDL_BLENDFACTOR_ONE,
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
SDL_BLENDOPERATION_ADD);

Sun, 13 Aug 2017 22:50:23 -0700Fixed bug 2646 - Problems with software renderer when SDL_SetRenderLogicalSize set
Sam Lantinga <slouken@libsdl.org> [Sun, 13 Aug 2017 22:50:23 -0700] rev 11281
Fixed bug 2646 - Problems with software renderer when SDL_SetRenderLogicalSize set

Fixed setting the software renderer clip rectangle when a viewport is set

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.