From 2a0da329f251a0e054d350daa23120e2f21a17fa Mon Sep 17 00:00:00 2001 From: stephena Date: Thu, 6 Mar 2014 22:36:31 +0000 Subject: [PATCH] Added FrameBuffer::about(), so we can actually see if hardware acceleration is being used. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2863 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/common/FrameBufferSDL2.cxx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx index 7a55c9d89..cbb54404c 100644 --- a/src/common/FrameBufferSDL2.cxx +++ b/src/common/FrameBufferSDL2.cxx @@ -230,20 +230,21 @@ bool FrameBufferSDL2::setVideoMode(const string& title, VideoMode& mode, bool fu // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string FrameBufferSDL2::about() const { -#if 0 ostringstream out; - out << "Video rendering: OpenGL mode" << endl - << " Vendor: " << p_gl.GetString(GL_VENDOR) << endl - << " Renderer: " << p_gl.GetString(GL_RENDERER) << endl - << " Version: " << p_gl.GetString(GL_VERSION) << endl - << " Color: " << myDepth << " bit, " << myRGB[0] << "-" - << myRGB[1] << "-" << myRGB[2] << "-" << myRGB[3] << ", " - << "GL_BGRA" << endl - << " Extensions: VBO " << (myVBOAvailable ? "enabled" : "disabled") - << endl; + out << "Video system: " << SDL_GetCurrentVideoDriver() << endl; + SDL_RendererInfo info; + if(SDL_GetRendererInfo(myRenderer, &info) >= 0) + { + out << " Renderer: " << info.name << endl; + if(info.max_texture_width > 0 && info.max_texture_height > 0) + out << " Max texture: " << info.max_texture_width << "x" + << info.max_texture_height << endl; + out << " Flags: " + << ((info.flags & SDL_RENDERER_PRESENTVSYNC) ? "+" : "-") << "vsync, " + << ((info.flags & SDL_RENDERER_ACCELERATED) ? "+" : "-") << "accel" + << endl; + } return out.str(); -#endif -return EmptyString; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -