mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 21:55:57 +00:00
Fill a window one pixel wider than the picture, and let the probes use the shader census of either game version.
gfx_fit_rect rounded the picture up to an even size, so at 1167x656 a 16:9 picture was 1166 wide and the last column stayed black, which failed --probe-vkexec; it now takes the window's parity, which keeps the bars equal at any size. The present check of --probe-vkexec expects the picture's rectangle and black bars, as --probe-window does, so it passes on a 16:10 screen too. --probe-shader, the draw part of --probe-vkexec and the pipeline self-test looked only for build/v121/shaders; probe_census_dir takes the running version's census first, then the other one's. The Linux notes say what the probes need over SSH.
This commit is contained in:
1 parent
08df794360
commit
7766716e16
6 files changed
+54
-57
No files matched your search
@@ -518,9 +518,8 @@ void gfx_fit_rect(int cw, int ch, int dw, int dh, int out[4]) {
|
||||
if (cw <= 0 || ch <= 0 || !strcmp(cfg_value("TOTK_PICTURE_FIT"), "stretch")) return;
|
||||
if ((int64_t)dw * ch > (int64_t)dh * cw) out[2] = (int)(((int64_t)dh * cw + ch / 2) / ch); // window wider: pillarbox
|
||||
else out[3] = (int)(((int64_t)dw * ch + cw / 2) / cw); // taller: letterbox
|
||||
out[2] += out[2] & 1, out[3] += out[3] & 1; // even sizes keep the bars equal
|
||||
if (out[2] > dw) out[2] = dw;
|
||||
if (out[3] > dh) out[3] = dh;
|
||||
// A side of the window's parity keeps the two bars equal; a picture one pixel short of the window fills it
|
||||
out[2] += (dw - out[2]) & 1, out[3] += (dh - out[3]) & 1;
|
||||
out[0] = (dw - out[2]) / 2, out[1] = (dh - out[3]) / 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user