-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
39 lines (32 loc) · 950 Bytes
/
Program.cs
File metadata and controls
39 lines (32 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
namespace Yuusha
{
static class Program
{
[System.Runtime.InteropServices.DllImport("nvapi64.dll", EntryPoint = "fake")]
private static extern int LoadNvApi64();
[System.Runtime.InteropServices.DllImport("nvapi.dll", EntryPoint = "fake")]
private static extern int LoadNvApi32();
public static Client Client;
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
TryForceHighPerformanceGpu();
Client = new Client();
Client.Run();
}
static void TryForceHighPerformanceGpu()
{
try
{
if (Environment.Is64BitProcess)
LoadNvApi64();
else
LoadNvApi32();
}
catch { } // this is always triggered
}
}
}