Skip to content

Commit

Permalink
wayland_backend: round surface size towards infinity
Browse files Browse the repository at this point in the history
Otherwise, if the scale is larger than the texture size, the surface
size would be 0.

Signed-off-by: Julian Orth <[email protected]>
  • Loading branch information
mahkoh authored and misyltoad committed Jul 24, 2024
1 parent bfebd15 commit 7fe73df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Backends/WaylandBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,8 @@ namespace gamescope
.flSrcY = 0.0,
.flSrcWidth = double( pLayer->tex->width() ),
.flSrcHeight = double( pLayer->tex->height() ),
.nDstWidth = int32_t( pLayer->tex->width() / double( pLayer->scale.x ) ),
.nDstHeight = int32_t( pLayer->tex->height() / double( pLayer->scale.y ) ),
.nDstWidth = int32_t( ceil( pLayer->tex->width() / double( pLayer->scale.x ) ) ),
.nDstHeight = int32_t( ceil( pLayer->tex->height() / double( pLayer->scale.y ) ) ),
.eColorspace = pLayer->colorspace,
.bOpaque = pLayer->zpos == g_zposBase,
.uFractionalScale = GetScale(),
Expand Down

0 comments on commit 7fe73df

Please sign in to comment.