summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 033ed3df..bd6a9ba4 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -181,16 +181,8 @@ void Gui::logic()
void Gui::draw()
{
- if (useOpenGL) {
-#ifdef USE_OPENGL
- dynamic_cast<gcn::OpenGLGraphics*>(guiGraphics)->pushClipArea(guiTop->getDimension());
- guiTop->draw((gcn::OpenGLGraphics*)guiGraphics);
-#endif
- }
- else {
- dynamic_cast<gcn::SDLGraphics*>(guiGraphics)->pushClipArea(guiTop->getDimension());
- guiTop->draw((gcn::SDLGraphics*)guiGraphics);
- }
+ guiGraphics->pushClipArea(guiTop->getDimension());
+ guiTop->draw(mGraphics);
int mouseX, mouseY;
Uint8 button = SDL_GetMouseState(&mouseX, &mouseY);
@@ -201,14 +193,7 @@ void Gui::draw()
guiGraphics->drawImage(mMouseCursor, mouseX - 5, mouseY - 2);
}
- if (useOpenGL) {
-#ifdef USE_OPENGL
- dynamic_cast<gcn::OpenGLGraphics*>(guiGraphics)->popClipArea();
-#endif
- }
- else {
- dynamic_cast<gcn::SDLGraphics*>(guiGraphics)->popClipArea();
- }
+ guiGraphics->popClipArea();
}
void Gui::mousePress(int mx, int my, int button)