QT changes, fixed 4:3 integer stretch.
This commit is contained in:
@@ -73,14 +73,12 @@ RendererCommon::onResize(int width, int height)
|
||||
double gw = source.width();
|
||||
double gh = source.height();
|
||||
double hsr = hw / hh;
|
||||
double r43 = 4.0 / 3.0;
|
||||
|
||||
switch (video_fullscreen_scale) {
|
||||
case FULLSCR_SCALE_INT:
|
||||
case FULLSCR_SCALE_INT43:
|
||||
if (video_fullscreen_scale == FULLSCR_SCALE_INT43)
|
||||
gsr = 4.0 / 3.0;
|
||||
else
|
||||
gsr = gw / gh;
|
||||
gsr = gw / gh;
|
||||
|
||||
if (gsr <= hsr) {
|
||||
dw = hh * gsr;
|
||||
@@ -89,8 +87,20 @@ RendererCommon::onResize(int width, int height)
|
||||
dw = hw;
|
||||
dh = hw / gsr;
|
||||
}
|
||||
|
||||
integer_scale(&dw, &gw);
|
||||
integer_scale(&dh, &gh);
|
||||
|
||||
if (video_fullscreen_scale == FULLSCR_SCALE_INT43) {
|
||||
if (r43 <= gsr) {
|
||||
dw = dh * r43;
|
||||
dh = dh;
|
||||
} else {
|
||||
dh = dw / r43;
|
||||
dw = dw;
|
||||
}
|
||||
}
|
||||
|
||||
dx = (hw - dw) / 2.0;
|
||||
dy = (hh - dh) / 2.0;
|
||||
destination.setRect((int) dx, (int) dy, (int) dw, (int) dh);
|
||||
@@ -98,7 +108,7 @@ RendererCommon::onResize(int width, int height)
|
||||
case FULLSCR_SCALE_43:
|
||||
case FULLSCR_SCALE_KEEPRATIO:
|
||||
if (video_fullscreen_scale == FULLSCR_SCALE_43)
|
||||
gsr = 4.0 / 3.0;
|
||||
gsr = r43;
|
||||
else
|
||||
gsr = gw / gh;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user