This commit is contained in:
ww-rm
2025-03-21 14:45:45 +08:00
parent 41b5ac2c61
commit 8f5728afe4
2 changed files with 3 additions and 2 deletions

View File

@@ -508,7 +508,6 @@ namespace SpineViewer.Controls
}
else if (Directory.Exists(path))
{
// 遍历该目录下所有深度文件判断是否符合要求并ADD
foreach (var file in Directory.EnumerateFiles(path, "*.*", SearchOption.AllDirectories))
{
if (Spine.Spine.CommonSkelSuffix.Contains(Path.GetExtension(file).ToLower()))

View File

@@ -370,7 +370,9 @@ namespace SpineViewer.Spine
viewX *= scale;
viewY *= scale;
using var tex = new SFML.Graphics.RenderTexture(width, height);
// XXX: 貌似无法使用 using 或者 Dispose 主动释放 tex 资源
// 在批量添加的中途, 如果触发 GC? 会卡死, 目前未知原因
var tex = new SFML.Graphics.RenderTexture(width, height);
var view = tex.GetView();
view.Center = new(bounds.X + viewX / 2, bounds.Y + viewY / 2);
view.Size = new(viewX, -viewY);