Logo (Chafa): fix blurry result when specifying both width and height

Who knows why it was coded like that

Fix #757
This commit is contained in:
李通洲
2024-03-14 10:03:54 +08:00
parent 8a9fe22855
commit a107395707
2 changed files with 3 additions and 4 deletions
+1
View File
@@ -2,6 +2,7 @@
Bugfixes:
* Don't detect `SessionLeader` as terminal, actually (Terminal, Linux)
* Fix blurry chafa result when specifying both width and height (#757, Logo)
Features:
* Support new MacBook Air (Host, macOS)
+2 -4
View File
@@ -768,10 +768,8 @@ static bool printImageIfExistsSlowPath(FFLogoType type, bool printError)
requestData.characterPixelWidth = 1;
requestData.characterPixelHeight = 1;
if(
(type != FF_LOGO_TYPE_IMAGE_CHAFA || instance.config.logo.width == 0 || instance.config.logo.height == 0) &&
!getCharacterPixelDimensions(&requestData)
) {
if(!getCharacterPixelDimensions(&requestData))
{
if(printError)
fputs("Logo: getCharacterPixelDimensions() failed", stderr);
return false;