Skip to content

Commit

Permalink
update frame buffers when width changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez committed Mar 28, 2024
1 parent e40c19e commit 66c3207
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/graphic/Fast3D/gfx_pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3312,7 +3312,8 @@ void gfx_start_frame(void) {
}
gfx_current_dimensions.aspect_ratio = (float)gfx_current_dimensions.width / (float)gfx_current_dimensions.height;

if (gfx_current_dimensions.height != gfx_prev_dimensions.height) {
if (gfx_current_dimensions.width != gfx_prev_dimensions.width ||
gfx_current_dimensions.height != gfx_prev_dimensions.height) {
for (auto& fb : framebuffers) {
uint32_t width = fb.second.orig_width, height = fb.second.orig_height;
gfx_adjust_width_height_for_scale(width, height);
Expand Down

0 comments on commit 66c3207

Please sign in to comment.