Unverified Commit 82b749a9 authored by rdts's avatar rdts Committed by GitHub

Update Sprite.cpp

Hi,
I found a bug.

_width and _height need to be initialized properly.

That is because they are used in drawString(). Lines 4118 and 4120 in TFT_eSPI.cpp.
parent 11638178
...@@ -49,8 +49,8 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames) ...@@ -49,8 +49,8 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames)
if ( w < 1 || h < 1 ) return NULL; if ( w < 1 || h < 1 ) return NULL;
_iwidth = _dwidth = w; _width = _iwidth = _dwidth = w;
_iheight = _dheight = h; _height = _iheight = _dheight = h;
this->cursor_x = 0; this->cursor_x = 0;
this->cursor_y = 0; this->cursor_y = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment