From 4b4a75475a857a8b78e89818649370d88c3a8091 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 3 Aug 2021 22:27:46 +1000 Subject: [PATCH] [client] egl: fix out by one error with letterbox rendering This replaces the scaled `destRect` with a version that uses doubles correcting the rounding error that is causing a failure to properly clear the black bar areas. --- client/renderers/EGL/egl.c | 2 +- common/include/common/types.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c index ff7c52d2..5e08ec50 100644 --- a/client/renderers/EGL/egl.c +++ b/client/renderers/EGL/egl.c @@ -87,7 +87,7 @@ struct Inst int width, height; float uiScale; - LG_RendererRect destRect; + struct DoubleRect destRect; LG_RendererRotate rotate; //client side rotation float translateX , translateY; diff --git a/common/include/common/types.h b/common/include/common/types.h index b308dd4e..d067883c 100644 --- a/common/include/common/types.h +++ b/common/include/common/types.h @@ -38,6 +38,11 @@ struct Rect int x, y, w, h; }; +struct DoubleRect +{ + double x, y, w, h; +}; + struct Border { int left, top, right, bottom;