Fix Briefing Icons at 4K in SCPUI #6327
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm honestly not sure if this code was meant to cull icons outside the screen from being rendered or what, exactly. However at 4k resolution in SCPUI it's possible to validly have icons well outside the
gr_screen.max_w_unscaled
boundaries so we shouldn't return here in that case or those icons won't be rendered.In fact, I don't think we should ever try and cull icons in this step because
gr_aa_bitmap()
already does that when it checks for clipping.This may not be the right fix.. we could compare to the actual screen width and height but a lot of this code is uncommented and I'm not sure what it's all doing other than trying to scale the icon coordinates. That said, I tested this in both SCPUI and retail with icons in the middle of the map, all 4 corners and outside the map bounds in all directions and everything seemed to render as expected.