aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/sdl
diff options
context:
space:
mode:
authorMatthew Hoops2011-06-13 13:12:23 -0400
committerMatthew Hoops2011-06-13 13:12:23 -0400
commitd355475a0416897ed254fa85f4d63d0f75d9c7ea (patch)
tree184892480ebb704b28163c51999e50c414e85f8a /backends/graphics/sdl
parent224c71e483e09931ba386555ff3b436b9defe63d (diff)
parentbfa26ffc44f80e4eb3d8590f5f865cda6a5188b7 (diff)
downloadscummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.gz
scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.bz2
scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'backends/graphics/sdl')
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp30
-rw-r--r--backends/graphics/sdl/sdl-graphics.h1
2 files changed, 17 insertions, 14 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 7a5b777032..9063f55744 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -223,7 +223,7 @@ bool SdlGraphicsManager::hasFeature(OSystem::Feature f) {
return
(f == OSystem::kFeatureFullscreenMode) ||
(f == OSystem::kFeatureAspectRatioCorrection) ||
- (f == OSystem::kFeatureCursorHasPalette) ||
+ (f == OSystem::kFeatureCursorPalette) ||
(f == OSystem::kFeatureIconifyWindow);
}
@@ -235,6 +235,10 @@ void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
case OSystem::kFeatureAspectRatioCorrection:
setAspectRatioCorrection(enable);
break;
+ case OSystem::kFeatureCursorPalette:
+ _cursorPaletteDisabled = !enable;
+ blitCursor();
+ break;
case OSystem::kFeatureIconifyWindow:
if (enable)
SDL_WM_IconifyWindow();
@@ -245,13 +249,15 @@ void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
}
bool SdlGraphicsManager::getFeatureState(OSystem::Feature f) {
- assert (_transactionMode == kTransactionNone);
+ assert(_transactionMode == kTransactionNone);
switch (f) {
case OSystem::kFeatureFullscreenMode:
return _videoMode.fullscreen;
case OSystem::kFeatureAspectRatioCorrection:
return _videoMode.aspectRatioCorrection;
+ case OSystem::kFeatureCursorPalette:
+ return !_cursorPaletteDisabled;
default:
return false;
}
@@ -1458,11 +1464,6 @@ void SdlGraphicsManager::setCursorPalette(const byte *colors, uint start, uint n
blitCursor();
}
-void SdlGraphicsManager::disableCursorPalette(bool disable) {
- _cursorPaletteDisabled = disable;
- blitCursor();
-}
-
void SdlGraphicsManager::setShakePos(int shake_pos) {
assert (_transactionMode == kTransactionNone);
@@ -2059,7 +2060,7 @@ void SdlGraphicsManager::displayMessageOnOSD(const char *msg) {
_osdSurface->format->Bshift, _osdSurface->format->Ashift);
// The font we are going to use:
- const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kOSDFont);
+ const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
// Clear everything with the "transparent" color, i.e. the colorkey
SDL_FillRect(_osdSurface, 0, kOSDColorKey);
@@ -2132,12 +2133,14 @@ bool SdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
#ifdef USE_OSD
char buffer[128];
if (_videoMode.aspectRatioCorrection)
- sprintf(buffer, "Enabled aspect ratio correction\n%d x %d -> %d x %d",
+ sprintf(buffer, "%s\n%d x %d -> %d x %d",
+ _("Enabled aspect ratio correction"),
_videoMode.screenWidth, _videoMode.screenHeight,
_hwscreen->w, _hwscreen->h
);
else
- sprintf(buffer, "Disabled aspect ratio correction\n%d x %d -> %d x %d",
+ sprintf(buffer, "%s\n%d x %d -> %d x %d",
+ _("Disabled aspect ratio correction"),
_videoMode.screenWidth, _videoMode.screenHeight,
_hwscreen->w, _hwscreen->h
);
@@ -2191,7 +2194,8 @@ bool SdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
}
if (newScalerName) {
char buffer[128];
- sprintf(buffer, "Active graphics filter: %s\n%d x %d -> %d x %d",
+ sprintf(buffer, "%s %s\n%d x %d -> %d x %d",
+ _("Active graphics filter:"),
newScalerName,
_videoMode.screenWidth, _videoMode.screenHeight,
_hwscreen->w, _hwscreen->h
@@ -2245,9 +2249,9 @@ void SdlGraphicsManager::toggleFullScreen() {
endGFXTransaction();
#ifdef USE_OSD
if (_videoMode.fullscreen)
- displayMessageOnOSD("Fullscreen mode");
+ displayMessageOnOSD(_("Fullscreen mode"));
else
- displayMessageOnOSD("Windowed mode");
+ displayMessageOnOSD(_("Windowed mode"));
#endif
}
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 86e52a0bf6..9627ab23a3 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -132,7 +132,6 @@ public:
virtual void warpMouse(int x, int y);
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL);
virtual void setCursorPalette(const byte *colors, uint start, uint num);
- virtual void disableCursorPalette(bool disable);
#ifdef USE_OSD
virtual void displayMessageOnOSD(const char *msg);