This commit is contained in:
ttewrrr
2026-03-08 17:30:00 +01:00
parent f8ef076e70
commit 27532eb206
3025 changed files with 0 additions and 670604 deletions
-38
View File
@@ -1,38 +0,0 @@
#include "stdafx.h"
#include "ScreenSizeCalculator.h"
#include "Options.h"
ScreenSizeCalculator::ScreenSizeCalculator(Options *options, int width, int height, int forceScale/*=-1*/)
{
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)
{
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;
}