summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-27 22:17:21 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-27 22:17:21 +0300
commitcd0b35a6c1a86e4432d9dc9ec75b4da0ae9a7bdc (patch)
tree6e09b953731887801b35f61056c2c87991e05590 /src/graphics.cpp
parentc905067448700c63f7645b08d80bffbde57a45fa (diff)
downloadmv-cd0b35a6c1a86e4432d9dc9ec75b4da0ae9a7bdc.tar.gz
mv-cd0b35a6c1a86e4432d9dc9ec75b4da0ae9a7bdc.tar.bz2
mv-cd0b35a6c1a86e4432d9dc9ec75b4da0ae9a7bdc.tar.xz
mv-cd0b35a6c1a86e4432d9dc9ec75b4da0ae9a7bdc.zip
Add command to dump to chat main graphics settings.
Command: /dumpg
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index efa1058a6..d914b0b00 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -53,6 +53,7 @@ Graphics::Graphics():
mRect.y = 0;
mRect.w = 0;
mRect.h = 0;
+ mOpenGL = 0;
}
Graphics::~Graphics()
@@ -100,7 +101,10 @@ bool Graphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel)
logger->log("Double buffer mode: %s", mDoubleBuffer ? "yes" : "no");
if (mTarget->format)
+ {
logger->log("Bits per pixel: %d", mTarget->format->BytesPerPixel);
+ bpp = mTarget->format->BytesPerPixel;
+ }
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
if (!vi)