ITADN

[Bug] in example WoodenEye008 splitscreen viewport layout is incorrect with 4 players

#16126ClosedDevoteeOfEnergyDrinks 创建于 14 天前
https://github.com/libsdl-org/SDL/blob/56ef0efc20f0142b99e2b6147b18a26b285208e0/examples/demo/02-woodeneye-008/woodeneye-008.c#L209 When player_count is set to 4, the splitscreen layout is not divided into four equal quadrants. <img width="1674" height="1056" alt="Image" src="https://github.com/user-attachments/assets/42888edd-81fa-4242-a499-fc9515ccf3fa" /> In draw(), the row index is computed using floating-point division: ```C float mod_y = (float)i / part_hor; ``` It should instead use integer division before converting to float: ```C float mod_y = (float)(i / part_hor); ```
关闭于 13 天前 0 条评论