[client] egl: keep x/y coordinates of cursor rectangle non-negative

This shifts the rectangles upwards instead of cutting off the rectangles,
but it keeps the code simple.
This commit is contained in:
Quantum authored and Geoffrey McRae committed 2021-07-26 07:56:46 +10:00
1 parent 181b165a4b
commit 120fe63c0f
1 file changed
+4
+4
View File
@@ -26,6 +26,7 @@
#include "texture.h"
#include "shader.h"
#include "model.h"
#include "util.h"
#include <stdatomic.h>
#include <stdlib.h>
@@ -332,6 +333,9 @@ struct CursorState egl_cursor_render(EGL_Cursor * cursor, LG_RendererRotate rota
assert(!"unreachable");
}
state.rect.x = max(0, state.rect.x);
state.rect.y = max(0, state.rect.y);
glEnable(GL_BLEND);
switch(cursor->type)
{