Added low detail mode (160x200) to the preset scale modes.

UI looks horizontally stretched tough.
This commit is contained in:
drfrag 2019-09-25 11:46:55 +02:00
parent 2e87aef815
commit 7f3616e8d8
4 changed files with 7 additions and 3 deletions

View file

@ -292,7 +292,8 @@ void FGLRenderer::SetOutputViewport(GL_IRECT *bounds)
scaleX = MIN(clientWidth / (float)screenWidth, clientHeight / (float)screenHeight);
scaleY = scaleX;
}
mOutputLetterbox.width = (int)round(screenWidth * scaleX);
int factor = screenWidth == 160 && screenHeight == 200? 2 : 1;
mOutputLetterbox.width = (int)round(screenWidth * scaleX * factor);
mOutputLetterbox.height = (int)round(screenHeight * scaleY);
mOutputLetterbox.left = (clientWidth - mOutputLetterbox.width) / 2;
mOutputLetterbox.top = (clientHeight - mOutputLetterbox.height) / 2;

View file

@ -721,7 +721,8 @@ void OpenGLSWFrameBuffer::GetLetterboxFrame(int &letterboxX, int &letterboxY, in
scaleY = scaleX;
}
letterboxWidth = (int)round(Width * scaleX);
int factor = Width == 160 && Height == 200? 2 : 1;
letterboxWidth = (int)round(Width * scaleX * factor);
letterboxHeight = (int)round(Height * scaleY);
letterboxX = (clientWidth - letterboxWidth) / 2;
letterboxY = (clientHeight - letterboxHeight) / 2;

View file

@ -27,7 +27,7 @@
#include "v_video.h"
#include "templates.h"
#define NUMSCALEMODES 6
#define NUMSCALEMODES 7
extern bool setsizeneeded;
extern int currentrenderer;
@ -77,6 +77,7 @@ namespace
{ true, false, [](uint32_t Width)->uint32_t { return 640; }, [](uint32_t Height)->uint32_t { return 400; }, true, false }, // 3 - 640x400
{ true, true, [](uint32_t Width)->uint32_t { return 1280; }, [](uint32_t Height)->uint32_t { return 800; }, true, false }, // 4 - 1280x800
{ true, true, [](uint32_t Width)->uint32_t { return vid_scale_customwidth; }, [](uint32_t Height)->uint32_t { return vid_scale_customheight; }, true, true }, // 5 - Custom
{ true, false, [](uint32_t Width)->uint32_t { return 160; }, [](uint32_t Height)->uint32_t { return 200; }, true, false }, // 6 - 160x200
};
bool isOutOfBounds(int x)
{

View file

@ -2209,6 +2209,7 @@ OptionValue ScaleModes
3, "640x400"
4, "1280x800"
5, "$OPTVAL_CUSTOM"
6, "160x200"
}
OptionValue CropAspect
{