diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-21 22:45:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:15 +0300 |
commit | e5521effc043cdf9d781816c0d72bd17830e34f8 (patch) | |
tree | 091d8fb497dfe236ccaac0cb6f0da88479a9e365 /src/graphicsmanager.cpp | |
parent | e1cacb5f675b782ba1cfee8906c78ec7793807c8 (diff) | |
download | manaverse-e5521effc043cdf9d781816c0d72bd17830e34f8.tar.gz manaverse-e5521effc043cdf9d781816c0d72bd17830e34f8.tar.bz2 manaverse-e5521effc043cdf9d781816c0d72bd17830e34f8.tar.xz manaverse-e5521effc043cdf9d781816c0d72bd17830e34f8.zip |
move SDL_SetVideoMode calls into graphicsmanager.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index c0ea92ba6..0d66dc3a7 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -139,7 +139,7 @@ int GraphicsManager::detectGraphics() logger->log1("enable opengl mode"); int textureSampler = 0; int compressTextures = 0; - SDL_SetVideoMode(100, 100, 0, SDL_ANYFORMAT | SDL_OPENGL); + createWindow(100, 100, 0, SDL_ANYFORMAT | SDL_OPENGL); initOpenGL(); logVersion(); @@ -379,6 +379,12 @@ bool GraphicsManager::getAllVideoModes(StringVect &modeList) } } +SDL_Window *GraphicsManager::createWindow(const int w, const int h, + const int bpp, const int flags) +{ + return SDL_SetVideoMode(w, h, bpp, flags); +} + #ifdef USE_OPENGL void GraphicsManager::updateExtensions() { |