diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics.cpp | 5 | ||||
-rw-r--r-- | src/graphics.h | 4 | ||||
-rw-r--r-- | src/gui/browserbox.cpp | 3 | ||||
-rw-r--r-- | src/gui/gui.cpp | 1 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/main.h | 1 | ||||
-rw-r--r-- | src/resources/image.cpp | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index a0e5d921..e71052df 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -28,7 +28,6 @@ #endif #include "log.h" -#include "main.h" #include "graphic/imagerect.h" @@ -37,8 +36,8 @@ extern volatile int framesToDraw; -Graphics::Graphics(): - mScreen(0) +Graphics::Graphics(bool useOpenGL): + mScreen(0), useOpenGL(useOpenGL) { } diff --git a/src/graphics.h b/src/graphics.h index 4b6bdd67..cdbc4104 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -48,7 +48,7 @@ public gcn::SDLGraphics { /** * Constructor. */ - Graphics(); + Graphics(bool useOpenGL); /** * Destructor. @@ -145,7 +145,7 @@ public gcn::SDLGraphics { private: SDL_Surface *mScreen; - bool mFullscreen, mHWAccel; + bool mFullscreen, mHWAccel, useOpenGL; }; #endif diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index e00494cd..5cae9fb7 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -23,7 +23,6 @@ #include <guichan/imagefont.hpp> -#include "../main.h" #ifdef USE_OPENGL #include "../resources/resourcemanager.h" #endif @@ -31,6 +30,8 @@ #include "linkhandler.h" #include "gui.h" +extern bool useOpenGL; + int BrowserBox::instances = 0; gcn::ImageFont* BrowserBox::browserFont; diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index f77ad0be..2eaa9d76 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -52,6 +52,7 @@ #include "../resources/resourcemanager.h" extern Being* autoTarget; +extern bool useOpenGL; // Guichan stuff Gui *gui; diff --git a/src/main.cpp b/src/main.cpp index bbddce5f..24f9cb76 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -236,7 +236,7 @@ void init_engine() hwaccel = ((int)config.getValue("hwaccel", 0) == 1); // Create the graphics context - graphics = new Graphics(); + graphics = new Graphics(useOpenGL); // Try to set the desired video mode if (!graphics->setVideoMode(width, height, bpp, fullscreen, hwaccel)) { @@ -64,6 +64,5 @@ extern int account_ID, session_ID1, session_ID2; extern char sex, n_server, n_character; extern unsigned char state; extern Sound sound; -extern bool useOpenGL; #endif diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 854c65e8..4efe12e7 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -26,8 +26,8 @@ #include <SDL_image.h> #include "../log.h" -#include "../main.h" +extern bool useOpenGL; Image::Image(SDL_Surface *image): image(image) |