mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 19:51:49 +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 screenWidth = _system->getWidth();
|
||||||
int32 screenHeight = _system->getHeight();
|
int32 screenHeight = _system->getHeight();
|
||||||
|
|
||||||
// Aspect ratio correction
|
if (_system->getFeatureState(OSystem::kFeatureAspectRatioCorrection)) {
|
||||||
int32 viewportWidth = MIN<int32>(screenWidth, screenHeight * kOriginalWidth / kOriginalHeight);
|
// Aspect ratio correction
|
||||||
int32 viewportHeight = MIN<int32>(screenHeight, screenWidth * kOriginalHeight / kOriginalWidth);
|
int32 viewportWidth = MIN<int32>(screenWidth, screenHeight * kOriginalWidth / kOriginalHeight);
|
||||||
_screenViewport = Common::Rect(viewportWidth, viewportHeight);
|
int32 viewportHeight = MIN<int32>(screenHeight, screenWidth * kOriginalHeight / kOriginalWidth);
|
||||||
|
_screenViewport = Common::Rect(viewportWidth, viewportHeight);
|
||||||
|
|
||||||
// Pillarboxing
|
// Pillarboxing
|
||||||
_screenViewport.translate((screenWidth - viewportWidth) / 2,
|
_screenViewport.translate((screenWidth - viewportWidth) / 2,
|
||||||
(screenHeight - viewportHeight) / 2);
|
(screenHeight - viewportHeight) / 2);
|
||||||
|
} else {
|
||||||
|
// Aspect ratio correction disabled, just stretch
|
||||||
|
_screenViewport = Common::Rect(screenWidth, screenHeight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::Point BaseRenderer::frameCenter() const {
|
Common::Point BaseRenderer::frameCenter() const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user