mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
use ceil
This commit is contained in:
parent
f6670a6374
commit
4d7d483c0e
1 changed files with 1 additions and 1 deletions
|
@ -667,7 +667,7 @@ QImage OpenGLDisplayPlugin::getScreenshot(float aspectRatio) const {
|
|||
auto bestSize = size;
|
||||
uvec2 corner(0);
|
||||
if (aspectRatio != 0.0f) { // Pick out the largest piece of the center that produces the requested width/height aspectRatio
|
||||
if (((size.y * aspectRatio) + 0.5f) < size.x) {
|
||||
if (ceil(size.y * aspectRatio) < size.x) {
|
||||
bestSize.x = round(size.y * aspectRatio);
|
||||
} else {
|
||||
bestSize.y = round(size.x / aspectRatio);
|
||||
|
|
Loading…
Reference in a new issue