From dbac793645654ac6715e6adecfd9d4a4a1fd8551 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Fri, 22 Oct 2010 12:52:35 +0200 Subject: Turned the OpenGL and disable transparency options as static members. - Now OpenGL and the transparency disabling are set at startup and not read again for displaying graphics, preventing graphic errors before startup. - We also agreed long time ago that SDL specific functions should have a SDL prefix. The header has been rearranged a bit to do so. - Also fixed a possible discrepancy in the hasAlphaChannel() function. Reviewed-by: CodyMartin. Resolves: Mana-Mantis: #260. --- src/gui/widgets/desktop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index 2a80cc11..23dd3eb5 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -85,7 +85,7 @@ void Desktop::draw(gcn::Graphics *graphics) if (mWallpaper) { - if (!mWallpaper->isAnOpenGLOne()) + if (!mWallpaper->useOpenGL()) g->drawImage(mWallpaper, (getWidth() - mWallpaper->getWidth()) / 2, (getHeight() - mWallpaper->getHeight()) / 2); @@ -114,7 +114,7 @@ void Desktop::setBestFittingWallpaper() if (mWallpaper) mWallpaper->decRef(); - if (!nWallPaper->isAnOpenGLOne() && (nWallPaper->getWidth() != getWidth() + if (!nWallPaper->useOpenGL() && (nWallPaper->getWidth() != getWidth() || nWallPaper->getHeight() != getHeight())) { // We rescale to obtain a fullscreen wallpaper... -- cgit v1.2.3-70-g09d2