Skip to content

Commit

Permalink
Merge pull request #48 from Prevter/main
Browse files Browse the repository at this point in the history
Fix spritesheets not supporting single image
  • Loading branch information
dankmeme01 authored Apr 9, 2024
2 parents c10d04a + 2f40792 commit b9d2bb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/spritesheet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fn initialize_spritesheet_bundle(

let mut max_width = (width_sum * mean_height).sqrt() as u32;

if max_width < largest_width {
if max_width < largest_width || sprites.len() == 1 {
max_width = largest_width + 2;
}

Expand Down

0 comments on commit b9d2bb6

Please sign in to comment.