Tue, 10 Mar 2020 16:29:28 -0700Fixed bug 5022 - SDL_iconv_string can get stuck in an infinite loop when encountering invalid characters
Sam Lantinga [Tue, 10 Mar 2020 16:29:28 -0700] rev 13601
Fixed bug 5022 - SDL_iconv_string can get stuck in an infinite loop when encountering invalid characters

ciremo6483

In `SDL_iconv_string` the `while (inbytesleft > 0)` loop can end up in a state where it never terminates because the library `iconv` function called from `SDL_iconv` doesn't consume any bytes.

This happened when a `WCHAR_T` input string was being converted to `UTF-8` but contained invalid characters. It would first It would first skip a few bytes due to `case SDL_ICONV_EILSEQ` but when there were 3 bytes remaining of `inbytesleft` `iconv` just didn't consume anything more (but didn't throw an error either).

It just so happens that the Microsoft Classic IntelliMouse `product_string` contains such invalid characters (`"MicrosoftÆ Classic IntelliMouseÆ"`), meaning the function would get stuck with said mouse plugged in.

A fix for this would be to check if `inbytesleft` was unchanged after an iteration and in that case either decrement the counter like when `SDL_ICONV_EILSEQ` is returned or simply break the loop.

Sun, 08 Mar 2020 21:24:06 -0700Fixed warnings building with mingw64
Sam Lantinga [Sun, 08 Mar 2020 21:24:06 -0700] rev 13600
Fixed warnings building with mingw64

Sun, 08 Mar 2020 21:02:40 -0700Clarified that the clip rectangle is defined relative to the viewport, and added a clip test to testviewport.c
Sam Lantinga [Sun, 08 Mar 2020 21:02:40 -0700] rev 13599
Clarified that the clip rectangle is defined relative to the viewport, and added a clip test to testviewport.c

Sun, 08 Mar 2020 19:23:21 -0700Fixed bug 4991 - Pixel shader problem when recreating a texture for direct3d renderer
Sam Lantinga [Sun, 08 Mar 2020 19:23:21 -0700] rev 13598
Fixed bug 4991 - Pixel shader problem when recreating a texture for direct3d renderer


cmediaplayer

Hi, i already mentioned in the SDL discourse a bug that recreating of a texture occours pixel shader problem on direct3d renderer. There is no problem for direct3d11. You can see the issue by using my app named C Media Player which is available for Windows for free using my web site www.cmediaplayer.com. Just follow the steps:

*Open a media file
*When playing the file change the scale quality under the video menu.
*You will see the problem.

Sun, 08 Mar 2020 18:56:07 -0700Don't release the backbuffer on error, we didn't acquire it.
Sam Lantinga [Sun, 08 Mar 2020 18:56:07 -0700] rev 13597
Don't release the backbuffer on error, we didn't acquire it.

Sat, 07 Mar 2020 19:21:21 -0800Clear the old player index slot when moving to a new one
Cameron Gutman [Sat, 07 Mar 2020 19:21:21 -0800] rev 13596
Clear the old player index slot when moving to a new one

Sat, 07 Mar 2020 17:20:04 -0800Fix incorrect player index when assigning a joystick the same index twice
Cameron Gutman [Sat, 07 Mar 2020 17:20:04 -0800] rev 13595
Fix incorrect player index when assigning a joystick the same index twice

Prior to this fix, we would hit the existing_instance >= 0 case and move the joystick
again to a different index than the one requested by the caller. It also breaks the assumption
that a SDL_JoystickID is only present in SDL_joystick_players at one location.

Sat, 07 Mar 2020 13:59:42 -0800direct3d: Don't attempt to create zero sized vertex buffer
Cameron Gutman [Sat, 07 Mar 2020 13:59:42 -0800] rev 13594
direct3d: Don't attempt to create zero sized vertex buffer

Sat, 07 Mar 2020 13:17:28 -0800Added support for indicating player index on DS4 controllers
Cameron Gutman [Sat, 07 Mar 2020 13:17:28 -0800] rev 13593
Added support for indicating player index on DS4 controllers

Sat, 07 Mar 2020 08:48:04 -0800Fixed regression in bug 4966 - KMSDRM: Add dynamic modeset support
Sam Lantinga [Sat, 07 Mar 2020 08:48:04 -0800] rev 13592
Fixed regression in bug 4966 - KMSDRM: Add dynamic modeset support

Anthony Pesch

I was just communicating with one of the Retropie developers regarding this.

This change removed the forced window focus change on creation (https://github.com/inolen/SDL-mirror/commit/3534cb3793f4744509f020f1267f510ec7099366) as part of the change no longer assumes there's only a single window being created. This was perhaps an over-aggressive removal.

Due to that change, joystick events are only received if SDL_SetKeyboardFocus is called explicitly, or if the app has specified SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS.

I think that part of my change should be reverted to continue setting mouse / keyboard focus to the window being created. If SDL_WINDOW_INPUT_FOCUS is to be used as an input flag the code could be conditional, but that would still leave existing software broken.