diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-21 14:52:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:14 +0300 |
commit | 31f6125fc7253e278bba5db46e08f370d92717c7 (patch) | |
tree | 29c2ca0149333e8c55ee98094cb40012c431e49d /src/sdlgraphics.cpp | |
parent | ec1beaa2ee07368368e9bd45fe400eedc57419eb (diff) | |
download | plus-31f6125fc7253e278bba5db46e08f370d92717c7.tar.gz plus-31f6125fc7253e278bba5db46e08f370d92717c7.tar.bz2 plus-31f6125fc7253e278bba5db46e08f370d92717c7.tar.xz plus-31f6125fc7253e278bba5db46e08f370d92717c7.zip |
move sdl video mode initialisation from graphics into sdlgraphics.
Diffstat (limited to 'src/sdlgraphics.cpp')
-rw-r--r-- | src/sdlgraphics.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sdlgraphics.cpp b/src/sdlgraphics.cpp index 704f51f3a..b78efeda6 100644 --- a/src/sdlgraphics.cpp +++ b/src/sdlgraphics.cpp @@ -1129,3 +1129,18 @@ void SDLGraphics::drawLine(int x1, int y1, int x2, int y2) // other cases not implimented } + +bool SDLGraphics::setVideoMode(const int w, const int h, const int bpp, + const bool fs, const bool hwaccel, + const bool resize, const bool noFrame) +{ + setMainFlags(w, h, bpp, fs, hwaccel, resize, noFrame); + + if (!(mTarget = SDL_SetVideoMode(w, h, bpp, getSoftwareFlags()))) + return false; + + mRect.w = static_cast<uint16_t>(mTarget->w); + mRect.h = static_cast<uint16_t>(mTarget->h); + + return videoInfo(); +} |