Skip to content

Commit

Permalink
Merge pull request #307 from Willy-JL/fix-fb-scale
Browse files Browse the repository at this point in the history
Fix framebuffer scale crash
  • Loading branch information
KinoxKlark committed Nov 15, 2022
2 parents 3091704 + f0c69f5 commit 9c030f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui/integrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def compute_fb_scale(window_size, frame_buffer_size):
fb_width, fb_height = frame_buffer_size

# future: remove floats after dropping py27 support
if win_width != 0 and win_width != 0:
if win_width != 0 and win_height != 0:
return float(fb_width) / win_width, float(fb_height) / win_height

return 1., 1.

0 comments on commit 9c030f4

Please sign in to comment.