[Scummvm-cvs-logs] scummvm master -> 37e5b209a71af725456a42be2605dea28ffceb84

lordhoto lordhoto at gmail.com
Wed Feb 15 02:25:15 CET 2012


This automated email contains information about 11 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
56971f11d1 OPENGL: Remove redundant check in adjustMousePosition.
93435b2e3f OPENGL: Unvirtualize all GLTexture methods.
864eec8cd2 OPENGL: Make all GLTexture members private.
beab93e746 OPENGL: Slight formatting fixes.
e5d48797d9 OPENGL: Let getGlErrStr return a Common::String.
1f01fb330c OPENGL: Use C-style casts.
97760ff101 OPENGLSDL: Don't cast EventType into int for switch.
05af37c08e OPENGL: Use tabs instead of spaces for indentation.
5b3ebdf43d OPENGL: Prevent access to a few more members in the SDL OpenGL code.
b6f7d69709 OPENGLSDL: Remove HACK in fullscreen toggle mode.
37e5b209a7 OPENGL: More formatting fixes.


Commit: 56971f11d1b086fe057e5b658afd318bebb429cc
    https://github.com/scummvm/scummvm/commit/56971f11d1b086fe057e5b658afd318bebb429cc
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:22:30-08:00

Commit Message:
OPENGL: Remove redundant check in adjustMousePosition.

Changed paths:
    backends/graphics/opengl/opengl-graphics.cpp



diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index edc7a5f..f4ffd47 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -1276,15 +1276,13 @@ void OpenGLGraphicsManager::adjustMousePosition(int16 &x, int16 &y) {
 	if (_overlayVisible)
 		return;
 
-	if (!_overlayVisible) {
-		x -= _displayX;
-		y -= _displayY;
-
-		if (_displayWidth != _videoMode.screenWidth)
-			x = x * _videoMode.screenWidth / _displayWidth;
-		if (_displayHeight != _videoMode.screenHeight)
-			y = y * _videoMode.screenHeight / _displayHeight;
-	}
+	x -= _displayX;
+	y -= _displayY;
+
+	if (_displayWidth != _videoMode.screenWidth)
+		x = x * _videoMode.screenWidth / _displayWidth;
+	if (_displayHeight != _videoMode.screenHeight)
+		y = y * _videoMode.screenHeight / _displayHeight;
 }
 
 bool OpenGLGraphicsManager::saveScreenshot(const char *filename) {


Commit: 93435b2e3f2ba79a6f794b0486cb9c0b19e06775
    https://github.com/scummvm/scummvm/commit/93435b2e3f2ba79a6f794b0486cb9c0b19e06775
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:22:37-08:00

Commit Message:
OPENGL: Unvirtualize all GLTexture methods.

Changed paths:
    backends/graphics/opengl/gltexture.h



diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index d8c42ee..4fa2938 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -68,29 +68,29 @@ public:
 	static void initGLExtensions();
 
 	GLTexture(byte bpp, GLenum internalFormat, GLenum format, GLenum type);
-	virtual ~GLTexture();
+	~GLTexture();
 
 	/**
 	 * Refresh the texture after a context change. The
 	 * process will be completed on next allocBuffer call.
 	 */
-	virtual void refresh();
+	void refresh();
 
 	/**
 	 * Allocates memory needed for the given size.
 	 */
-	virtual void allocBuffer(GLuint width, GLuint height);
+	void allocBuffer(GLuint width, GLuint height);
 
 	/**
 	 * Updates the texture pixels.
 	 */
-	virtual void updateBuffer(const void *buf, int pitch, GLuint x, GLuint y,
+	void updateBuffer(const void *buf, int pitch, GLuint x, GLuint y,
 		GLuint w, GLuint h);
 
 	/**
 	 * Draws the texture to the screen buffer.
 	 */
-	virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h);
+	void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h);
 
 	/**
 	 * Get the texture width.


Commit: 864eec8cd264a94a61dc2d700e2bed62b0b457d4
    https://github.com/scummvm/scummvm/commit/864eec8cd264a94a61dc2d700e2bed62b0b457d4
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:22:45-08:00

Commit Message:
OPENGL: Make all GLTexture members private.

Changed paths:
    backends/graphics/opengl/gltexture.h



diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index 4fa2938..8ff9838 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -113,7 +113,7 @@ public:
 	 */
 	void setFilter(GLint filter) { _filter = filter; }
 
-protected:
+private:
 	const byte _bytesPerPixel;
 	const GLenum _internalFormat;
 	const GLenum _glFormat;


Commit: beab93e746cb0600c922a68d3ba6409f530a7b38
    https://github.com/scummvm/scummvm/commit/beab93e746cb0600c922a68d3ba6409f530a7b38
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:22:54-08:00

Commit Message:
OPENGL: Slight formatting fixes.

Changed paths:
    backends/graphics/opengl/gltexture.cpp



diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp
index b7f5c90..c4d2925 100644
--- a/backends/graphics/opengl/gltexture.cpp
+++ b/backends/graphics/opengl/gltexture.cpp
@@ -11,7 +11,7 @@
 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
 
  * You should have received a copy of the GNU General Public License
@@ -60,8 +60,8 @@ void GLTexture::initGLExtensions() {
 		return;
 
 	// Get a string with all extensions
-	const char* ext_string =
-		reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
+	const char *ext_string =
+	    reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
 	CHECK_GL_ERROR();
 	Common::StringTokenizer tokenizer(ext_string, " ");
 	// Iterate all string tokens
@@ -132,7 +132,7 @@ void GLTexture::allocBuffer(GLuint w, GLuint h) {
 
 	// Allocate room for the texture
 	glTexImage2D(GL_TEXTURE_2D, 0, _internalFormat,
-		_textureWidth, _textureHeight, 0, _glFormat, _glType, NULL); CHECK_GL_ERROR();
+	             _textureWidth, _textureHeight, 0, _glFormat, _glType, NULL); CHECK_GL_ERROR();
 
 	_refresh = false;
 }
@@ -148,13 +148,13 @@ void GLTexture::updateBuffer(const void *buf, int pitch, GLuint x, GLuint y, GLu
 	// Check if the buffer has its data contiguously
 	if (static_cast<int>(w) * _bytesPerPixel == pitch) {
 		glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h,
-						_glFormat, _glType, buf); CHECK_GL_ERROR();
+		                _glFormat, _glType, buf); CHECK_GL_ERROR();
 	} else {
 		// Update the texture row by row
 		const byte *src = static_cast<const byte *>(buf);
 		do {
 			glTexSubImage2D(GL_TEXTURE_2D, 0, x, y,
-							w, 1, _glFormat, _glType, src); CHECK_GL_ERROR();
+			                w, 1, _glFormat, _glType, src); CHECK_GL_ERROR();
 			++y;
 			src += pitch;
 		} while (--h);


Commit: e5d48797d9866c155e3a4af8a6dd614a8978d428
    https://github.com/scummvm/scummvm/commit/e5d48797d9866c155e3a4af8a6dd614a8978d428
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:23:01-08:00

Commit Message:
OPENGL: Let getGlErrStr return a Common::String.

This also makes getGlErrStr use Common::String::format instead of snprintf.

Changed paths:
    backends/graphics/opengl/glerrorcheck.cpp



diff --git a/backends/graphics/opengl/glerrorcheck.cpp b/backends/graphics/opengl/glerrorcheck.cpp
index 682207c..4395935 100644
--- a/backends/graphics/opengl/glerrorcheck.cpp
+++ b/backends/graphics/opengl/glerrorcheck.cpp
@@ -26,6 +26,7 @@
 
 #include "backends/graphics/opengl/glerrorcheck.h"
 #include "common/textconsole.h"
+#include "common/str.h"
 
 #ifdef WIN32
 #if defined(ARRAYSIZE) && !defined(_WINDOWS_)
@@ -44,7 +45,7 @@
 #include <GL/gl.h>
 #endif
 
-static const char *getGlErrStr(GLenum error) {
+static Common::String getGlErrStr(GLenum error) {
 	switch (error) {
 	case GL_NO_ERROR:           return "GL_NO_ERROR";
 	case GL_INVALID_ENUM:       return "GL_INVALID_ENUM";
@@ -54,16 +55,13 @@ static const char *getGlErrStr(GLenum error) {
 	case GL_OUT_OF_MEMORY:      return "GL_OUT_OF_MEMORY";
 	}
 
-	// FIXME: Convert to use Common::String::format()
-	static char buf[40];
-	snprintf(buf, sizeof(buf), "(Unknown GL error code 0x%x)", error);
-	return buf;
+	return Common::String::format("(Unknown GL error code 0x%x)", error);
 }
 
 void checkGlError(const char *file, int line) {
 	GLenum error = glGetError();
 	if (error != GL_NO_ERROR)
-		warning("%s:%d: GL error: %s", file, line, getGlErrStr(error));
+		warning("%s:%d: GL error: %s", file, line, getGlErrStr(error).c_str());
 }
 
 #endif


Commit: 1f01fb330ca5a621c0a55293762806049ca98c35
    https://github.com/scummvm/scummvm/commit/1f01fb330ca5a621c0a55293762806049ca98c35
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:23:08-08:00

Commit Message:
OPENGL: Use C-style casts.

Changed paths:
    backends/graphics/opengl/gltexture.cpp



diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp
index c4d2925..ce69dc4 100644
--- a/backends/graphics/opengl/gltexture.cpp
+++ b/backends/graphics/opengl/gltexture.cpp
@@ -60,8 +60,7 @@ void GLTexture::initGLExtensions() {
 		return;
 
 	// Get a string with all extensions
-	const char *ext_string =
-	    reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
+	const char *ext_string = (const char *)glGetString(GL_EXTENSIONS);
 	CHECK_GL_ERROR();
 	Common::StringTokenizer tokenizer(ext_string, " ");
 	// Iterate all string tokens
@@ -146,12 +145,12 @@ void GLTexture::updateBuffer(const void *buf, int pitch, GLuint x, GLuint y, GLu
 	glBindTexture(GL_TEXTURE_2D, _textureName); CHECK_GL_ERROR();
 
 	// Check if the buffer has its data contiguously
-	if (static_cast<int>(w) * _bytesPerPixel == pitch) {
+	if ((int)w * _bytesPerPixel == pitch) {
 		glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h,
 		                _glFormat, _glType, buf); CHECK_GL_ERROR();
 	} else {
 		// Update the texture row by row
-		const byte *src = static_cast<const byte *>(buf);
+		const byte *src = (const byte *)buf;
 		do {
 			glTexSubImage2D(GL_TEXTURE_2D, 0, x, y,
 			                w, 1, _glFormat, _glType, src); CHECK_GL_ERROR();


Commit: 97760ff10135274c4487ade5fcc999e46a237c16
    https://github.com/scummvm/scummvm/commit/97760ff10135274c4487ade5fcc999e46a237c16
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:23:14-08:00

Commit Message:
OPENGLSDL: Don't cast EventType into int for switch.

Changed paths:
    backends/graphics/openglsdl/openglsdl-graphics.cpp



diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index f2b3168..4154b67 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -486,7 +486,7 @@ void OpenGLSdlGraphicsManager::toggleFullScreen(int loop) {
 }
 
 bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
-	switch ((int)event.type) {
+	switch (event.type) {
 	case Common::EVENT_KEYDOWN:
 		if (event.kbd.hasFlags(Common::KBD_ALT)) {
 			// Alt-Return and Alt-Enter toggle full screen mode


Commit: 05af37c08e9d359d509a29f7c5a85b70c0c10fdd
    https://github.com/scummvm/scummvm/commit/05af37c08e9d359d509a29f7c5a85b70c0c10fdd
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:23:22-08:00

Commit Message:
OPENGL: Use tabs instead of spaces for indentation.

Changed paths:
    backends/graphics/opengl/opengl-graphics.h



diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index 6ded680..17810dd 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -316,10 +316,10 @@ protected:
 	 */
 	Common::Array<Common::String> _osdLines;
 
-  /**
-   * Returns the font used for on screen display
-   */
-  virtual const Graphics::Font *getFontOSD();
+	/**
+	 * Returns the font used for on screen display
+	 */
+	virtual const Graphics::Font *getFontOSD();
 
 	/**
 	 * Update the OSD texture / surface.


Commit: 5b3ebdf43de0bd9f04138a6e841f816f34377021
    https://github.com/scummvm/scummvm/commit/5b3ebdf43de0bd9f04138a6e841f816f34377021
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:23:37-08:00

Commit Message:
OPENGL: Prevent access to a few more members in the SDL OpenGL code.

Changed paths:
    backends/graphics/opengl/opengl-graphics.cpp
    backends/graphics/opengl/opengl-graphics.h
    backends/graphics/openglsdl/openglsdl-graphics.cpp



diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index f4ffd47..b69764f 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -594,10 +594,8 @@ void OpenGLGraphicsManager::warpMouse(int x, int y) {
 		scaledY += _displayY;
 	}
 
+	setMousePosition(scaledX, scaledY);
 	setInternalMousePosition(scaledX, scaledY);
-
-	_cursorState.x = scaledX;
-	_cursorState.y = scaledY;
 }
 
 void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) {
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index 17810dd..ad8765b 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -217,6 +217,7 @@ protected:
 
 	uint getAspectRatio() const;
 
+	void setFormatIsBGR(bool isBGR) { _formatBGR = isBGR; }
 	bool _formatBGR;
 
 	//
@@ -285,6 +286,14 @@ protected:
 	int _cursorTargetScale;
 	bool _cursorNeedsRedraw;
 
+	/**
+	 * Set up the mouse position for graphics output.
+	 *
+	 * @param x X coordinate in native coordinates.
+	 * @param y Y coordinate in native coordinates.
+	 */
+	void setMousePosition(int x, int y) { _cursorState.x = x; _cursorState.y = y; }
+
 	virtual void refreshCursor();
 	virtual void refreshCursorScale();
 
@@ -312,11 +321,6 @@ protected:
 
 #ifdef USE_OSD
 	/**
-	 * The OSD contents.
-	 */
-	Common::Array<Common::String> _osdLines;
-
-	/**
 	 * Returns the font used for on screen display
 	 */
 	virtual const Graphics::Font *getFontOSD();
@@ -326,6 +330,11 @@ protected:
 	 */
 	void updateOSD();
 
+	/**
+	 * The OSD contents.
+	 */
+	Common::Array<Common::String> _osdLines;
+
 	GLTexture *_osdTexture;
 	Graphics::Surface _osdSurface;
 	uint8 _osdAlpha;
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 4154b67..53688e2 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -376,7 +376,7 @@ bool OpenGLSdlGraphicsManager::loadGFXMode() {
 	}
 
 	// Check if the screen is BGR format
-	_formatBGR = _hwscreen->format->Rshift != 0;
+	setFormatIsBGR(_hwscreen->format->Rshift != 0);
 
 	if (isFullscreen) {
 		_lastFullscreenModeWidth = _videoMode.hardwareWidth;
@@ -671,8 +671,7 @@ void OpenGLSdlGraphicsManager::transformMouseCoordinates(Common::Point &point) {
 }
  
 void OpenGLSdlGraphicsManager::notifyMousePos(Common::Point mouse) {
-	_cursorState.x = mouse.x;
-	_cursorState.y = mouse.y;
+	setMousePosition(mouse.x, mouse.y);
 }
 
 #endif


Commit: b6f7d697090ca6f90d20f0f2d5661cc4c8b71bf2
    https://github.com/scummvm/scummvm/commit/b6f7d697090ca6f90d20f0f2d5661cc4c8b71bf2
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:23:47-08:00

Commit Message:
OPENGLSDL: Remove HACK in fullscreen toggle mode.

Altering the fullscreen state will automatically force a refresh now.

Changed paths:
    backends/graphics/openglsdl/openglsdl-graphics.cpp



diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 53688e2..b37d631 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -460,10 +460,6 @@ void OpenGLSdlGraphicsManager::toggleFullScreen(int loop) {
 			_activeFullscreenMode = -2;
 			setFullscreenMode(!isFullscreen);
 		}
-
-		// HACK: We need to force a refresh here, since we change the
-		// fullscreen mode.
-		_transactionDetails.needRefresh = true;
 	endGFXTransaction();
 
 	// Ignore resize events for the next 10 frames


Commit: 37e5b209a71af725456a42be2605dea28ffceb84
    https://github.com/scummvm/scummvm/commit/37e5b209a71af725456a42be2605dea28ffceb84
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-14T17:23:54-08:00

Commit Message:
OPENGL: More formatting fixes.

Changed paths:
    backends/graphics/opengl/opengl-graphics.cpp



diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index b69764f..cca8058 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -81,8 +81,8 @@ OpenGLGraphicsManager::~OpenGLGraphicsManager() {
 
 bool OpenGLGraphicsManager::hasFeature(OSystem::Feature f) {
 	return
-		(f == OSystem::kFeatureAspectRatioCorrection) ||
-		(f == OSystem::kFeatureCursorPalette);
+	    (f == OSystem::kFeatureAspectRatioCorrection) ||
+	    (f == OSystem::kFeatureCursorPalette);
 }
 
 void OpenGLGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
@@ -269,9 +269,9 @@ OSystem::TransactionError OpenGLGraphicsManager::endGFXTransaction() {
 		}
 
 		if (_videoMode.fullscreen == _oldVideoMode.fullscreen &&
-			_videoMode.mode == _oldVideoMode.mode &&
-			_videoMode.screenWidth == _oldVideoMode.screenWidth &&
-			_videoMode.screenHeight == _oldVideoMode.screenHeight) {
+		        _videoMode.mode == _oldVideoMode.mode &&
+		        _videoMode.screenWidth == _oldVideoMode.screenWidth &&
+		        _videoMode.screenHeight == _oldVideoMode.screenHeight) {
 
 			_oldVideoMode.setup = false;
 		}
@@ -420,7 +420,7 @@ void OpenGLGraphicsManager::setShakePos(int shakeOffset) {
 	_shakePos = shakeOffset;
 }
 
-void OpenGLGraphicsManager::setFocusRectangle(const Common::Rect& rect) {
+void OpenGLGraphicsManager::setFocusRectangle(const Common::Rect &rect) {
 }
 
 void OpenGLGraphicsManager::clearFocusRectangle() {
@@ -487,7 +487,8 @@ void OpenGLGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch
 	}
 
 	if (y < 0) {
-		h += y; buf -= y * pitch;
+		h += y;
+		buf -= y * pitch;
 		y = 0;
 	}
 
@@ -611,7 +612,7 @@ void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int
 
 	// Allocate space for cursor data
 	if (_cursorData.w != w || _cursorData.h != h ||
-			_cursorData.format.bytesPerPixel != _cursorFormat.bytesPerPixel)
+	        _cursorData.format.bytesPerPixel != _cursorFormat.bytesPerPixel)
 		_cursorData.create(w, h, _cursorFormat);
 
 	// Save cursor data
@@ -715,7 +716,7 @@ void OpenGLGraphicsManager::refreshGameScreen() {
 	} else {
 		// Update the texture
 		_gameTexture->updateBuffer((byte *)_screenData.pixels + y * _screenData.pitch +
-			x * _screenData.format.bytesPerPixel, _screenData.pitch, x, y, w, h);
+		                           x * _screenData.format.bytesPerPixel, _screenData.pitch, x, y, w, h);
 	}
 
 	_screenNeedsRedraw = false;
@@ -757,7 +758,7 @@ void OpenGLGraphicsManager::refreshOverlay() {
 	} else {
 		// Update the texture
 		_overlayTexture->updateBuffer((byte *)_overlayData.pixels + y * _overlayData.pitch +
-			x * _overlayData.format.bytesPerPixel, _overlayData.pitch, x, y, w, h);
+		                              x * _overlayData.format.bytesPerPixel, _overlayData.pitch, x, y, w, h);
 	}
 
 	_overlayNeedsRedraw = false;
@@ -1041,10 +1042,10 @@ void OpenGLGraphicsManager::internUpdateScreen() {
 		// Draw the cursor
 		if (_overlayVisible)
 			_cursorTexture->drawTexture(_cursorState.x - _cursorState.rHotX,
-				_cursorState.y - _cursorState.rHotY, _cursorState.rW, _cursorState.rH);
+			                            _cursorState.y - _cursorState.rHotY, _cursorState.rW, _cursorState.rH);
 		else
 			_cursorTexture->drawTexture(_cursorState.x - _cursorState.vHotX,
-				_cursorState.y - _cursorState.vHotY, _cursorState.vW, _cursorState.vH);
+			                            _cursorState.y - _cursorState.vHotY, _cursorState.vW, _cursorState.vH);
 
 		glPopMatrix();
 	}
@@ -1168,23 +1169,23 @@ void OpenGLGraphicsManager::loadTextures() {
 
 	if (
 #ifdef USE_RGB_COLOR
-			_transactionDetails.formatChanged ||
+	    _transactionDetails.formatChanged ||
 #endif
-			_oldVideoMode.screenWidth != _videoMode.screenWidth ||
-			_oldVideoMode.screenHeight != _videoMode.screenHeight)
+	    _oldVideoMode.screenWidth != _videoMode.screenWidth ||
+	    _oldVideoMode.screenHeight != _videoMode.screenHeight)
 		_screenData.create(_videoMode.screenWidth, _videoMode.screenHeight,
 #ifdef USE_RGB_COLOR
-			_screenFormat
+		                   _screenFormat
 #else
-			Graphics::PixelFormat::createFormatCLUT8()
+		                   Graphics::PixelFormat::createFormatCLUT8()
 #endif
-			);
+		                  );
 
 
 	if (_oldVideoMode.overlayWidth != _videoMode.overlayWidth ||
-		_oldVideoMode.overlayHeight != _videoMode.overlayHeight)
+	        _oldVideoMode.overlayHeight != _videoMode.overlayHeight)
 		_overlayData.create(_videoMode.overlayWidth, _videoMode.overlayHeight,
-			_overlayFormat);
+		                    _overlayFormat);
 
 	_screenNeedsRedraw = true;
 	_overlayNeedsRedraw = true;
@@ -1261,8 +1262,8 @@ uint OpenGLGraphicsManager::getAspectRatio() const {
 	// ratio correction is enabled, but it's better than the previous 4/3 mode
 	// mess at least...
 	if (_videoMode.aspectRatioCorrection
-	    && ((_videoMode.screenWidth == 320 && _videoMode.screenHeight == 200)
-	    || (_videoMode.screenWidth == 640 && _videoMode.screenHeight == 400)))
+	        && ((_videoMode.screenWidth == 320 && _videoMode.screenHeight == 200)
+	            || (_videoMode.screenWidth == 640 && _videoMode.screenHeight == 400)))
 		return 13333;
 	else if (_videoMode.mode == OpenGL::GFX_NORMAL)
 		return _videoMode.hardwareWidth * 10000 / _videoMode.hardwareHeight;
@@ -1355,7 +1356,7 @@ const char *OpenGLGraphicsManager::getCurrentModeName() {
 
 #ifdef USE_OSD
 const Graphics::Font *OpenGLGraphicsManager::getFontOSD() {
-  return FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
+	return FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
 }
 
 void OpenGLGraphicsManager::updateOSD() {






More information about the Scummvm-git-logs mailing list