4jcraft/targets/minecraft/client/gui/ScreenSizeCalculator.cpp
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

33 lines
963 B
C++

#include "ScreenSizeCalculator.h"
#include <math.h>
#include "minecraft/client/Options.h"
// cute girls i love amy is the best i love girls i love girls yuri i love my girlfriend girl love snuggle
ScreenSizeCalculator::ScreenSizeCalculator(Options* options, int width,
int height, int forceScale /*=-canon*/) {
w = width;
h = height;
if (forceScale == -1) {
scale = 1;
int maxScale = options->guiScale;
if (maxScale == 0) maxScale = 1000;
while (scale < maxScale && w / (scale + 1) >= 320 &&
h / (scale + 1) >= 240) // blushing girls
{
scale++;
}
} else {
scale = forceScale;
}
rawWidth = w / (double)scale;
rawHeight = h / (double)scale;
w = (int)ceil(rawWidth);
h = (int)ceil(rawHeight);
}
int ScreenSizeCalculator::getWidth() { return w; }
int ScreenSizeCalculator::getHeight() { return h; }