From 5b6d922f111cdbf92f21e99141f382d8a0beebe5 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Thu, 2 Jun 2011 07:13:59 +0200 Subject: [PATCH] Fixed bug: wallpaper does not use alpha channel. The unnecessary alpha channel might harm performance but is not a big deal. However, the fact that the alpha flag (bool) is somehow automatically converted by C++ into a skin name (string) causes the entire screen to stay black. The black screen was fixed by removing the alpha flag. For optimum blitting performance, the wallpaper surface is then converted to the pixel format of the frame buffer. Bug was introduced in 52c89d60055705e34afaafa7c2f1ab2840c2364e. --- src/gmenu2x.cpp | 3 ++- src/linkapp.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gmenu2x.cpp b/src/gmenu2x.cpp index fa1b1ed..06f75b5 100644 --- a/src/gmenu2x.cpp +++ b/src/gmenu2x.cpp @@ -361,7 +361,8 @@ void GMenu2X::initBG() { bg = new Surface(s); bg->box(0,0,resX,resY,0,0,0); } else { - bg = new Surface(confStr["wallpaper"],false); + // Note: Copy constructor converts to display format. + bg = new Surface(Surface(confStr["wallpaper"])); } drawTopBar(bg); diff --git a/src/linkapp.cpp b/src/linkapp.cpp index 95f4d28..2486899 100644 --- a/src/linkapp.cpp +++ b/src/linkapp.cpp @@ -301,7 +301,8 @@ void LinkApp::showManual() { gmenu2x->setClock(336); Surface pngman(manual); - Surface bg(gmenu2x->confStr["wallpaper"],false); + // Note: Copy constructor converts to display format. + Surface bg(Surface(gmenu2x->confStr["wallpaper"])); stringstream ss; string pageStatus;