mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-29 10:09:49 +08:00
52 lines
1.7 KiB
C#
52 lines
1.7 KiB
C#
using BetterGenshinImpact.GameTask.Model;
|
||
using BetterGenshinImpact.GameTask.Model.Area;
|
||
using OpenCvSharp;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Diagnostics;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
using Vanara.PInvoke;
|
||
|
||
namespace BetterGenshinImpact.UnitTest.GameTaskTests
|
||
{
|
||
internal class FakeSystemInfo : ISystemInfo
|
||
{
|
||
public FakeSystemInfo(RECT gameScreenSize, double assetScale)
|
||
{
|
||
DesktopRectArea = new(gameScreenSize.Width, gameScreenSize.Height);
|
||
|
||
GameScreenSize = gameScreenSize;
|
||
// 0.28 改动,素材缩放比例不可以超过 1,也就是图像识别时分辨率大于 1920x1080 的情况下直接进行缩放
|
||
if (GameScreenSize.Width < 1920)
|
||
{
|
||
ZoomOutMax1080PRatio = GameScreenSize.Width / 1920d;
|
||
AssetScale = ZoomOutMax1080PRatio;
|
||
}
|
||
ScaleTo1080PRatio = GameScreenSize.Width / 1920d; // 1080P 为标准
|
||
}
|
||
|
||
public System.Drawing.Size DisplaySize => throw new NotImplementedException();
|
||
|
||
public RECT GameScreenSize { get; }
|
||
|
||
public double AssetScale { get; } = 1;
|
||
|
||
public double ZoomOutMax1080PRatio { get; }
|
||
|
||
public double ScaleTo1080PRatio { get; }
|
||
|
||
public RECT CaptureAreaRect { get ; set ; }
|
||
public Rect ScaleMax1080PCaptureRect { get; set; } = new Rect(0, 0, 1920, 1080);
|
||
|
||
public Process GameProcess => throw new NotImplementedException();
|
||
|
||
public string GameProcessName => throw new NotImplementedException();
|
||
|
||
public int GameProcessId => throw new NotImplementedException();
|
||
|
||
public DesktopRegion DesktopRectArea { get; set; }
|
||
}
|
||
}
|