Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed May 5, 2024
1 parent fa01e2e commit 403c126
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions opengl/LVGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint8_t*>(std::realloc(textureData, data_size));
std::memset(textureData, 0, data_size);
Expand Down

0 comments on commit 403c126

Please sign in to comment.