SDL_RenderSetClipRect() is flipped vertically

I’ve got an Android/iOS app that works with SDL 2.0.3 but with latest source the clipping region set by SDL_RenderSetClipRect() is wrong. Specifically, it’s flipped vertically.

I was able to fix this for my app by changing GLES2_UpdateClipRect() in SDL_render_gles2.c from:

Code:
data->glScissor(renderer->viewport.x + rect->x, (h - renderer->viewport.y - renderer->viewport.h) + rect->y, rect->w, rect->h);

to

Code:
data->glScissor(renderer->viewport.x + rect->x, h - (renderer->viewport.y + rect->y + rect->h), rect->w, rect->h);

I’m not certain this is correct (renderer->viewport.h is not used) but it fixed it for me.