mirror of
https://github.com/love2d/megasource.git
synced 2026-08-19 04:05:09 +02:00
Updated SDL2 to the latest Mercurial revision.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2015 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -1046,7 +1046,14 @@ GL_UpdateClipRect(SDL_Renderer * renderer)
|
||||
if (renderer->clipping_enabled) {
|
||||
const SDL_Rect *rect = &renderer->clip_rect;
|
||||
data->glEnable(GL_SCISSOR_TEST);
|
||||
data->glScissor(rect->x, renderer->viewport.h - rect->y - rect->h, rect->w, rect->h);
|
||||
if (renderer->target) {
|
||||
data->glScissor(renderer->viewport.x + rect->x, renderer->viewport.y + rect->y, rect->w, rect->h);
|
||||
} else {
|
||||
int w, h;
|
||||
|
||||
SDL_GetRendererOutputSize(renderer, &w, &h);
|
||||
data->glScissor(renderer->viewport.x + rect->x, (h - renderer->viewport.y - renderer->viewport.h) + rect->y, rect->w, rect->h);
|
||||
}
|
||||
} else {
|
||||
data->glDisable(GL_SCISSOR_TEST);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user