Fixed display scaling after staring at it being wrong for months.
This commit is contained in:
parent
83e3ecff12
commit
3c4c66af96
|
@ -1284,11 +1284,12 @@ void draw () {
|
|||
if (config.display) {
|
||||
if (mainRatio >= windowRatio) {
|
||||
scaledDimension = round((float) height * mainRatio);
|
||||
image(canvas, 0, (height - scaledDimension) / 2, width, scaledDimension);
|
||||
image(canvas, (width - scaledDimension) / 2, 0, scaledDimension, height);
|
||||
} else {
|
||||
scaledDimension = round((float) width / mainRatio);
|
||||
image(canvas, (width - scaledDimension) / 2, 0, scaledDimension, height);
|
||||
image(canvas, 0, (height - scaledDimension) / 2, width, scaledDimension);
|
||||
}
|
||||
println(scaledDimension);
|
||||
}
|
||||
|
||||
if (Generation != lastGeneration) {
|
||||
|
|
Loading…
Reference in New Issue