mirror of
https://github.com/babalae/better-genshin-impact
synced 2025-01-07 03:17:16 +08:00
21 lines
617 B
C#
21 lines
617 B
C#
namespace Fischless.GameCapture;
|
|
|
|
public class GameCaptureFactory
|
|
{
|
|
public static string[] ModeNames()
|
|
{
|
|
return Enum.GetNames(typeof(CaptureModes));
|
|
}
|
|
|
|
public static IGameCapture Create(CaptureModes mode)
|
|
{
|
|
return mode switch
|
|
{
|
|
CaptureModes.BitBlt => new BitBlt.BitBltCapture(),
|
|
CaptureModes.WindowsGraphicsCapture => new Graphics.GraphicsCapture(),
|
|
CaptureModes.DwmGetDxSharedSurface => new DwmSharedSurface.SharedSurfaceCapture(),
|
|
_ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
|
|
};
|
|
}
|
|
}
|