[Scummvm-git-logs] scummvm master -> e93b52416f110e15bd67367d9cfed8fea3851a2c
sev-
sev at scummvm.org
Sat Sep 3 10:19:28 CEST 2016
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2fa97f20e8 DINGUX: Adapt to new OSD changes
58096d909f GPH: Fix formatting
e93b52416f LINUXMOTO: Adapt to OSD changes
Commit: 2fa97f20e89147a9585b08af1505cdceb9c5c19f
https://github.com/scummvm/scummvm/commit/2fa97f20e89147a9585b08af1505cdceb9c5c19f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-03T10:18:47+02:00
Commit Message:
DINGUX: Adapt to new OSD changes
Changed paths:
backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
index 7a248f1..af44acd 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
@@ -259,21 +259,33 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
#ifdef USE_OSD
// OSD visible (i.e. non-transparent)?
- if (_osdAlpha != SDL_ALPHA_TRANSPARENT) {
+ if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT) {
// Updated alpha value
- const int diff = SDL_GetTicks() - _osdFadeStartTime;
+ const int diff = SDL_GetTicks() - _osdMessageFadeStartTime;
if (diff > 0) {
if (diff >= kOSDFadeOutDuration) {
// Back to full transparency
- _osdAlpha = SDL_ALPHA_TRANSPARENT;
+ _osdMessageAlpha = SDL_ALPHA_TRANSPARENT;
} else {
// Do a linear fade out...
const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100;
- _osdAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
+ _osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
}
- SDL_SetAlpha(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdAlpha);
_forceFull = true;
}
+
+ if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) {
+ removeOSDMessage();
+ } else {
+ if (_osdMessageSurface && _osdSurface) {
+ SDL_Rect dstRect;
+ dstRect.x = (_osdSurface->w - _osdMessageSurface->w) / 2;
+ dstRect.y = (_osdSurface->h - _osdMessageSurface->h) / 2;
+ dstRect.w = _osdMessageSurface->w;
+ dstRect.h = _osdMessageSurface->h;
+ blitOSDMessage(dstRect);
+ }
+ }
}
#endif
@@ -405,9 +417,7 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
drawMouse();
#ifdef USE_OSD
- if (_osdAlpha != SDL_ALPHA_TRANSPARENT) {
- SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0);
- }
+ SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0);
#endif
// Finally, blit all our changes to the screen
SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
Commit: 58096d909f2cbe77ff70fad6ac416c92bec2a1f6
https://github.com/scummvm/scummvm/commit/58096d909f2cbe77ff70fad6ac416c92bec2a1f6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-03T10:18:47+02:00
Commit Message:
GPH: Fix formatting
Changed paths:
backends/graphics/gph/gph-graphics.cpp
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp
index e698db8..4aae11d 100644
--- a/backends/graphics/gph/gph-graphics.cpp
+++ b/backends/graphics/gph/gph-graphics.cpp
@@ -278,35 +278,35 @@ void GPHGraphicsManager::internUpdateScreen() {
}
#ifdef USE_OSD
-// OSD visible (i.e. non-transparent)?
-if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT) {
- // Updated alpha value
- const int diff = SDL_GetTicks() - _osdMessageFadeStartTime;
- if (diff > 0) {
- if (diff >= kOSDFadeOutDuration) {
- // Back to full transparency
- _osdMessageAlpha = SDL_ALPHA_TRANSPARENT;
- } else {
- // Do a linear fade out...
- const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100;
- _osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
+ // OSD visible (i.e. non-transparent)?
+ if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT) {
+ // Updated alpha value
+ const int diff = SDL_GetTicks() - _osdMessageFadeStartTime;
+ if (diff > 0) {
+ if (diff >= kOSDFadeOutDuration) {
+ // Back to full transparency
+ _osdMessageAlpha = SDL_ALPHA_TRANSPARENT;
+ } else {
+ // Do a linear fade out...
+ const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100;
+ _osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
+ }
+ _forceFull = true;
}
- _forceFull = true;
- }
- if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) {
- removeOSDMessage();
- } else {
- if (_osdMessageSurface && _osdSurface) {
- SDL_Rect dstRect;
- dstRect.x = (_osdSurface->w - _osdMessageSurface->w) / 2;
- dstRect.y = (_osdSurface->h - _osdMessageSurface->h) / 2;
- dstRect.w = _osdMessageSurface->w;
- dstRect.h = _osdMessageSurface->h;
- blitOSDMessage(dstRect);
+ if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) {
+ removeOSDMessage();
+ } else {
+ if (_osdMessageSurface && _osdSurface) {
+ SDL_Rect dstRect;
+ dstRect.x = (_osdSurface->w - _osdMessageSurface->w) / 2;
+ dstRect.y = (_osdSurface->h - _osdMessageSurface->h) / 2;
+ dstRect.w = _osdMessageSurface->w;
+ dstRect.h = _osdMessageSurface->h;
+ blitOSDMessage(dstRect);
+ }
}
}
-}
#endif
if (!_overlayVisible) {
Commit: e93b52416f110e15bd67367d9cfed8fea3851a2c
https://github.com/scummvm/scummvm/commit/e93b52416f110e15bd67367d9cfed8fea3851a2c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-03T10:18:47+02:00
Commit Message:
LINUXMOTO: Adapt to OSD changes
Changed paths:
backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index 52e5b42..64b4c96 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -292,21 +292,33 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
#ifdef USE_OSD
// OSD visible (i.e. non-transparent)?
- if (_osdAlpha != SDL_ALPHA_TRANSPARENT) {
+ if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT) {
// Updated alpha value
- const int diff = SDL_GetTicks() - _osdFadeStartTime;
+ const int diff = SDL_GetTicks() - _osdMessageFadeStartTime;
if (diff > 0) {
if (diff >= kOSDFadeOutDuration) {
// Back to full transparency
- _osdAlpha = SDL_ALPHA_TRANSPARENT;
+ _osdMessageAlpha = SDL_ALPHA_TRANSPARENT;
} else {
// Do a linear fade out...
const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100;
- _osdAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
+ _osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
}
- SDL_SetAlpha(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdAlpha);
_forceFull = true;
}
+
+ if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) {
+ removeOSDMessage();
+ } else {
+ if (_osdMessageSurface && _osdSurface) {
+ SDL_Rect dstRect;
+ dstRect.x = (_osdSurface->w - _osdMessageSurface->w) / 2;
+ dstRect.y = (_osdSurface->h - _osdMessageSurface->h) / 2;
+ dstRect.w = _osdMessageSurface->w;
+ dstRect.h = _osdMessageSurface->h;
+ blitOSDMessage(dstRect);
+ }
+ }
}
#endif
@@ -439,9 +451,7 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
drawMouse();
#ifdef USE_OSD
- if (_osdAlpha != SDL_ALPHA_TRANSPARENT) {
- SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0);
- }
+ SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0);
#endif
// Finally, blit all our changes to the screen
SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
More information about the Scummvm-git-logs
mailing list