Scale load screen progress bar size on desktop

This commit is contained in:
Maksim 2020-10-09 00:38:27 +02:00
parent ee37d5b0f7
commit 17c2581f30

View File

@ -637,9 +637,10 @@ void draw_load_screen(const std::wstring &text, IrrlichtDevice* device,
if (progress_img && progress_img_bg) {
const core::dimension2d<u32> &img_size = progress_img_bg->getSize();
#if !defined(__ANDROID__) && !defined(__IOS__)
u32 imgW = rangelim(img_size.Width, 256, 1024);
u32 imgH = rangelim(img_size.Height, 32, 128);
float imgR = 1.0f;
const float scale = porting::getDisplayDensity();
u32 imgW = rangelim(img_size.Width, 256, 1024) * scale;
u32 imgH = rangelim(img_size.Height, 32, 128) * scale;
float imgR = scale;
#else
float imgRatio = (float) img_size.Height / img_size.Width;
u32 imgW = npot2(screensize.X / 2);