diff options
Diffstat (limited to 'dxr3osd.c')
-rw-r--r-- | dxr3osd.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -235,6 +235,7 @@ void cDxr3Osd::Flush() int top = Top(); int left = Left(); + bool scaling = false; // check if we need to scale the osd if (horizontal < 720 || vertical < 576) { @@ -258,6 +259,7 @@ void cDxr3Osd::Flush() cBitmap *scaled = cScaler::scaleBitmap(bmap, width, height); scaled->Replace(*Palette); + scaling = true; bmap = scaled; } @@ -268,6 +270,12 @@ void cDxr3Osd::Flush() bmap->Clean(); } + // check if we need to free the bitmap allocated by the method + // cScaler::scaleBitmap + if (scaling) { + delete bmap; + } + #if 0 if (last->Elapsed() < cDxr3ConfigData::instance()->GetOsdFlushRate()) return; |