Skip to content

Commit cd5e73b

Browse files
authored
Fix gifted many message icon using the incorrect cache directory (#1298)
1 parent 82f82ea commit cd5e73b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

TwitchDownloaderCore/ChatRenderer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public ChatRenderer(ChatRenderOptions chatRenderOptions, ITaskProgress progress)
6666
outlinePaint = new SKPaint { Style = SKPaintStyle.Stroke, StrokeWidth = (float)(renderOptions.OutlineSize * renderOptions.ReferenceScale), StrokeJoin = SKStrokeJoin.Round, Color = SKColors.Black, IsAntialias = true, IsAutohinted = true, LcdRenderText = true, SubpixelText = true, HintingLevel = SKPaintHinting.Full, FilterQuality = SKFilterQuality.High };
6767
nameFont = new SKPaint { LcdRenderText = true, SubpixelText = true, TextSize = (float)renderOptions.FontSize, IsAntialias = true, IsAutohinted = true, HintingLevel = SKPaintHinting.Full, FilterQuality = SKFilterQuality.High };
6868
messageFont = new SKPaint { LcdRenderText = true, SubpixelText = true, TextSize = (float)renderOptions.FontSize, IsAntialias = true, IsAutohinted = true, HintingLevel = SKPaintHinting.Full, FilterQuality = SKFilterQuality.High, Color = renderOptions.MessageColor };
69-
highlightIcons = new HighlightIcons(renderOptions, Purple, outlinePaint);
69+
highlightIcons = new HighlightIcons(renderOptions, _cacheDir, Purple, outlinePaint);
7070
}
7171

7272
public async Task RenderVideoAsync(CancellationToken cancellationToken)

TwitchDownloaderCore/Tools/HighlightIcons.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ public sealed class HighlightIcons : IDisposable
6969
private readonly SKPaint _outlinePaint;
7070
private readonly Dictionary<SKColor, SKPaint> _iconPaints = new();
7171

72-
public HighlightIcons(ChatRenderOptions renderOptions, SKColor iconPurple, SKPaint outlinePaint)
72+
public HighlightIcons(ChatRenderOptions renderOptions, string cacheDir, SKColor iconPurple, SKPaint outlinePaint)
7373
{
74-
_cacheDir = new DirectoryInfo(Path.Combine(renderOptions.TempFolder, "icons"));
74+
_cacheDir = new DirectoryInfo(Path.Combine(cacheDir, "icons"));
7575
_purple = iconPurple;
7676
_offline = renderOptions.Offline;
7777
_fontSize = renderOptions.FontSize;

0 commit comments

Comments
 (0)