From 403c126c8717a89b6ba9a5d8148ee09a0ab457b0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 6 May 2024 00:02:12 +0200 Subject: [PATCH] Cleanup Signed-off-by: falkTX --- opengl/LVGL.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opengl/LVGL.cpp b/opengl/LVGL.cpp index d1962ee..5ce5924 100644 --- a/opengl/LVGL.cpp +++ b/opengl/LVGL.cpp @@ -184,8 +184,7 @@ struct LVGLWidget::PrivateData { void recreateTextureData(const uint width, const uint height) { const lv_color_format_t lvformat = lv_display_get_color_format(display); - const uint32_t stride = lv_draw_buf_width_to_stride(width, lvformat); - const uint32_t data_size = height * stride; + const uint32_t data_size = lv_draw_buf_width_to_stride(width, lvformat) * height; textureData = static_cast(std::realloc(textureData, data_size)); std::memset(textureData, 0, data_size);