aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-13 03:57:44 +0000
committerJohannes Schickel2010-10-13 03:57:44 +0000
commit75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch)
treef29541d55309487a94bd1d38e8b53bb3dde9aec6 /backends/graphics
parent48ee83b88957dab86bc763e9ef21a70179fa8679 (diff)
parente9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff)
downloadscummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz
scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2
scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend changes into the branch. I suppose the gp2x backend and probably all new backends, i.e. gph, dingux etc., might not compile anymore. Since I have no way of testing those it would be nice if porters could look into getting those up to speed in this branch. svn-id: r53399
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 9540f6dcfc..d4aad34c1e 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -61,6 +61,8 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
{0, 0, 0}
};
+DECLARE_TRANSLATION_ADDITIONAL_CONTEXT("Normal (no scaling)", "lowres")
+
// Table of relative scalers magnitudes
// [definedScale - 1][scaleFactor - 1]
static ScalerProc *scalersMagn[3][3] = {
@@ -397,7 +399,7 @@ void SdlGraphicsManager::detectSupportedFormats() {
// available format, it will get one that is "cheap" to
// use.
const Graphics::PixelFormat RGBList[] = {
-#ifdef ENABLE_32BIT
+#ifdef USE_RGB_COLOR
// RGBA8888, ARGB8888, RGB888
Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0),
Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24),
@@ -411,7 +413,7 @@ void SdlGraphicsManager::detectSupportedFormats() {
Graphics::PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12)
};
const Graphics::PixelFormat BGRList[] = {
-#ifdef ENABLE_32BIT
+#ifdef USE_RGB_COLOR
// ABGR8888, BGRA8888, BGR888
Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24),
Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0),
@@ -685,7 +687,7 @@ static void fixupResolutionForAspectRatio(AspectRatio desiredAspectRatio, int &w
}
if (!bestMode) {
- warning("Unable to enforce the desired aspect ratio!");
+ warning("Unable to enforce the desired aspect ratio");
return;
}
width = bestMode->w;
@@ -940,7 +942,7 @@ void SdlGraphicsManager::internUpdateScreen() {
#endif
// If the shake position changed, fill the dirty area with blackness
- if (_currentShakePos != _newShakePos ||
+ if (_currentShakePos != _newShakePos ||
(_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
SDL_Rect blackrect = {0, 0, _videoMode.screenWidth * _videoMode.scaleFactor, _newShakePos * _videoMode.scaleFactor};
@@ -1561,9 +1563,11 @@ void SdlGraphicsManager::setMousePos(int x, int y) {
void SdlGraphicsManager::warpMouse(int x, int y) {
int y1 = y;
- // Don't change mouse position, when mouse is outside of our window (in case of windowed mode)
- if (!(SDL_GetAppState( ) & SDL_APPMOUSEFOCUS))
+ // Don't change actual mouse position, when mouse is outside of our window (in case of windowed mode)
+ if (!(SDL_GetAppState( ) & SDL_APPMOUSEFOCUS)) {
+ setMousePos(x, y); // but change game cursor position
return;
+ }
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
y1 = real2Aspect(y);