mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 18:27:26 +00:00
SCI2.1: Added a sanity check for VMD video positioning, for the demo of Lighthouse
svn-id: r55137
This commit is contained in:
parent
a6994413ea
commit
49f965a547
@ -61,9 +61,17 @@ void playVideo(Graphics::VideoDecoder *videoDecoder, VideoState videoState) {
|
||||
|
||||
uint16 x, y;
|
||||
|
||||
// Sanity check...
|
||||
if (videoState.x > 0 && videoState.y > 0 && isVMD) {
|
||||
x = videoState.x;
|
||||
y = videoState.y;
|
||||
|
||||
if (x + width > screenWidth || y + height > screenHeight) {
|
||||
// Happens in the Lighthouse demo
|
||||
warning("VMD video won't fit on screen, centering it instead");
|
||||
x = (screenWidth - width) / 2;
|
||||
y = (screenHeight - height) / 2;
|
||||
}
|
||||
} else {
|
||||
x = (screenWidth - width) / 2;
|
||||
y = (screenHeight - height) / 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user