真修复影流之主造成的BUG

This commit is contained in:
ZouJin
2023-09-01 01:43:10 +08:00
parent 155c00ad7e
commit ebed8c191e
3 changed files with 9 additions and 9 deletions

View File

@ -179,7 +179,7 @@ namespace VPet_Simulator.Core
//新方法:加载大图片
//生成大文件加载非常慢,先看看有没有缓存能用
Path = System.IO.Path.Combine(GraphCore.CachePath, $"{GraphCore.Resolution}_{Math.Abs(Sub.GetHashCode(path))}_{paths.Length}.png");
Width = 500 * (paths.Length + 1);
Width = 500 * (paths.Length + 1);
if (!File.Exists(Path) && !((List<string>)GraphCore.CommConfig["Cache"]).Contains(path))
{
((List<string>)GraphCore.CommConfig["Cache"]).Add(path);
@ -194,10 +194,10 @@ namespace VPet_Simulator.Core
w = GraphCore.Resolution;
h = (int)(h * (GraphCore.Resolution / (double)img.Width));
}
if(paths.Length * w >= 6000)
if(paths.Length * w >= 60000)
{//修复大长动画导致过长分辨率导致可能的报错
w = 6000 / paths.Length;
h = (int)(h * (w / (double)img.Width));
w = 60000 / paths.Length;
h = (int)(img.Height * (w / (double)img.Width));
}
using (Bitmap joinedBitmap = new Bitmap(w * paths.Length, h))

View File

@ -48,7 +48,7 @@ namespace VPet_Simulator.Windows
/// <summary>
/// 版本号
/// </summary>
public int version { get; } = 103;
public int version { get; } = 104;
/// <summary>
/// 版本号
/// </summary>

View File

@ -44,7 +44,7 @@ namespace VPet_Simulator.Windows
public MainWindow()
{
#if X64
PNGAnimation.MaxLoadNumber = 1000;
PNGAnimation.MaxLoadNumber = 50;
#else
PNGAnimation.MaxLoadNumber = 20;
#endif
@ -302,8 +302,9 @@ namespace VPet_Simulator.Windows
CoreMOD.NowLoading = null;
//判断是否需要清空缓存
if (Set.LastCacheDate < CoreMODs.Max(x => x.CacheDate))
if (Set.LastCacheDate < CoreMODs.Max(x => x.CacheDate) || Set["CGPT"][(gint)"v"] <= 1)
{//需要清理缓存
Set["CGPT"][(gint)"v"] = 2;
Set.LastCacheDate = DateTime.Now;
if (Directory.Exists(CachePath))
{
@ -343,10 +344,9 @@ namespace VPet_Simulator.Windows
Set["CGPT"].Remove(cgpteb);
}
}
else if (Set["CGPT"][(gstr)"type"] == "OFF" && Set["CGPT"][(gint)"v"] == 0)
else if (Set["CGPT"][(gstr)"type"] == "OFF")
{//为老玩家开启选项聊天功能
Set["CGPT"][(gstr)"type"] = "LB";
Set["CGPT"][(gint)"v"] = 1;
}
else//新玩家,默认设置为
Set["CGPT"][(gstr)"type"] = "LB";