changed driver func, and moved free bitmap data after driver conversion
This commit is contained in:
parent
51b5e54e34
commit
34b9c11b0d
6 changed files with 7 additions and 7 deletions
|
@ -92,15 +92,15 @@ void TextObject::createBitmap() {
|
|||
}
|
||||
}
|
||||
|
||||
_textObjectHandle = g_driver->prepareToTextBitmap(_textBitmap, _bitmapWidth, _bitmapHeight, _fgColor);
|
||||
_textObjectHandle = g_driver->createTextBitmap(_textBitmap, _bitmapWidth, _bitmapHeight, _fgColor);
|
||||
|
||||
delete[] _textBitmap;
|
||||
_created = true;
|
||||
g_engine->registerTextObject(this);
|
||||
}
|
||||
|
||||
void TextObject::destroyBitmap() {
|
||||
if (_textObjectHandle) {
|
||||
delete[] _textBitmap;
|
||||
g_driver->destroyTextBitmap(_textObjectHandle);
|
||||
delete _textObjectHandle;
|
||||
_textObjectHandle = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue