From 3ea26a0c6f3909a6c7f5871891c268c72fcdf1f9 Mon Sep 17 00:00:00 2001 From: Wizmo2 Date: Fri, 22 Sep 2023 19:48:33 -0400 Subject: [PATCH] allow offset on ST7789 --- components/display/ST77xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/display/ST77xx.c b/components/display/ST77xx.c index f38bbd1b..25df43f4 100644 --- a/components/display/ST77xx.c +++ b/components/display/ST77xx.c @@ -289,10 +289,8 @@ struct GDS_Device* ST77xx_Detect(char *Driver, struct GDS_Device* Device) { struct PrivateSpace* Private = (struct PrivateSpace*) Device->Private; Private->Model = Model; - if (Model == ST7735) { - sscanf(Driver, "%*[^:]%*[^x]%*[^=]=%hu", &Private->Offset.Height); - sscanf(Driver, "%*[^:]%*[^y]%*[^=]=%hu", &Private->Offset.Width); - } + sscanf(Driver, "%*[^:]%*[^x]%*[^=]=%hu", &Private->Offset.Height); + sscanf(Driver, "%*[^:]%*[^y]%*[^=]=%hu", &Private->Offset.Width); if (Depth == 18) { Device->Mode = GDS_RGB666;