mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 19:21:46 +00:00
MYST3: Allow disabling aspect ratio correction
This commit is contained in:
parent
ee50a268d4
commit
aabc7bc34f
@ -81,14 +81,19 @@ void BaseRenderer::computeScreenViewport() {
|
||||
int32 screenWidth = _system->getWidth();
|
||||
int32 screenHeight = _system->getHeight();
|
||||
|
||||
// Aspect ratio correction
|
||||
int32 viewportWidth = MIN<int32>(screenWidth, screenHeight * kOriginalWidth / kOriginalHeight);
|
||||
int32 viewportHeight = MIN<int32>(screenHeight, screenWidth * kOriginalHeight / kOriginalWidth);
|
||||
_screenViewport = Common::Rect(viewportWidth, viewportHeight);
|
||||
if (_system->getFeatureState(OSystem::kFeatureAspectRatioCorrection)) {
|
||||
// Aspect ratio correction
|
||||
int32 viewportWidth = MIN<int32>(screenWidth, screenHeight * kOriginalWidth / kOriginalHeight);
|
||||
int32 viewportHeight = MIN<int32>(screenHeight, screenWidth * kOriginalHeight / kOriginalWidth);
|
||||
_screenViewport = Common::Rect(viewportWidth, viewportHeight);
|
||||
|
||||
// Pillarboxing
|
||||
_screenViewport.translate((screenWidth - viewportWidth) / 2,
|
||||
(screenHeight - viewportHeight) / 2);
|
||||
// Pillarboxing
|
||||
_screenViewport.translate((screenWidth - viewportWidth) / 2,
|
||||
(screenHeight - viewportHeight) / 2);
|
||||
} else {
|
||||
// Aspect ratio correction disabled, just stretch
|
||||
_screenViewport = Common::Rect(screenWidth, screenHeight);
|
||||
}
|
||||
}
|
||||
|
||||
Common::Point BaseRenderer::frameCenter() const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user