1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

Surface: Make pixel format conversion explicit.

Instead of having the copy constructor convert to display format, the new
copy constructor preserves the pixel format and a separate method was
introduced to convert surfaces to display format.

The code was made more robust as well: it should no longer crash if the
wallpaper cannot be loaded.
This commit is contained in:
Maarten ter Huurne
2011-06-03 11:46:36 +02:00
parent 7861e07eb0
commit 8a81837c04
9 changed files with 58 additions and 20 deletions

View File

@@ -45,8 +45,8 @@ SettingsDialog::~SettingsDialog() {
}
bool SettingsDialog::exec() {
//Surface bg (gmenu2x->confStr["wallpaper"],false);
Surface bg(gmenu2x->bg);
bg.convertToDisplayFormat();
bool close = false, ts_pressed = false;
uint i, sel = 0, iY, firstElement = 0, action;