Skip to content

Commit

Permalink
Fix viewport change detection (#8323)
Browse files Browse the repository at this point in the history
# Objective

Fix #8321

## Solution

The `old_viewport_size` that is used to detect whether the viewport has
changed was not being updated and thus always `None`.
  • Loading branch information
tim-blackbird authored Apr 10, 2023
1 parent dff071c commit 52ee83e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_render/src/camera/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@ pub fn camera_system<T: CameraProjection + Component>(
}
}
}

if camera.computed.old_viewport_size != viewport_size {
camera.computed.old_viewport_size = viewport_size;
}
}
}

Expand Down

0 comments on commit 52ee83e

Please sign in to comment.