Skip to content

Commit

Permalink
steamcompmgr: initialize glm::vec2 currentScaleRatio to [1.0f 1.0f].
Browse files Browse the repository at this point in the history
fixes float divide by zero bug I accidentily introduced
  • Loading branch information
sharkautarch committed Sep 6, 2024
1 parent 81f4303 commit 2e799b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/steamcompmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,7 @@ paint_window_commit( const gamescope::Rc<commit_t> &lastCommit, steamcompmgr_win

bool offset = ( ( w->GetGeometry().nX || w->GetGeometry().nY ) && w != scaleW );

glm::vec2 currentScaleRatio{};
glm::vec2 currentScaleRatio{1.0f, 1.0f};
if (sourceWidth != currentOutputResolution.x || sourceHeight != currentOutputResolution.y || offset || globalScaleRatio != 1.0f)
{
currentScaleRatio = calc_scale_factor(sourceWidth, sourceHeight);
Expand Down

0 comments on commit 2e799b2

Please sign in to comment.