-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AtlasEngine: Improve robustness against weird font sizes (#17258)
This clamps the font sizes between 1 and 100. Additionally, it fixes a warning that I randomly noticed when reproducing the issue: D2D complained that `EndDraw` must be called before releasing resources. Finally, this fixes a crash when the terminal size is exactly (1,1) cells, which happened because the initial (invalid) size was (1,1) too. This doesn't fully fix all font-size related issues, but that's currently difficult to achieve, as for instance the swap chain size isn't actually based on the window size, nay, it's based on the cell size multiplied by the cell count. So if the cell size is egregiously large then we get a swap chain size that's larger than the display and potentially larger than what the GPU supports which results in errors. Closes #17227 (cherry picked from commit f62d2d5) Service-Card-Id: 92546859 Service-Version: 1.20
- Loading branch information
Showing
5 changed files
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters