From d48b683fe80fc436a47fcd6038ad53e31ebef00d Mon Sep 17 00:00:00 2001 From: fyr77 Date: Sat, 8 May 2021 12:46:03 +0200 Subject: [PATCH] change debug to hardcoded --- EnvyUpdate/Debug.cs | 35 ++++++++++++----------------------- EnvyUpdate/MainWindow.xaml.cs | 1 + 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/EnvyUpdate/Debug.cs b/EnvyUpdate/Debug.cs index ff64185..0ce50c9 100644 --- a/EnvyUpdate/Debug.cs +++ b/EnvyUpdate/Debug.cs @@ -10,41 +10,30 @@ namespace EnvyUpdate public static int LoadFakeIDs(string idType) { /* - * Usage: - * Create debug.txt file. - * Fill in variables: - * Line 1: psid - * Line 2: pfid - * Line 3: osid - * Line 4: dtcid - * Line 5: Local driver version - * - * Supply /debug flag to exe. + * Usage: Supply /debug flag to exe. Imitates a GTX 1080ti on Win10 x64 non-dch. */ - string line = null; switch (idType) { case "psid": - line = File.ReadLines(debugFilePath).Take(1).First(); - break; + return 101; case "pfid": - line = File.ReadLines(debugFilePath).Skip(1).Take(1).First(); - break; + return 845; case "osid": - line = File.ReadLines(debugFilePath).Skip(2).Take(1).First(); - break; + return 57; case "dtcid": - line = File.ReadLines(debugFilePath).Skip(3).Take(1).First(); - break; + return 0; default: - break; + return -1; } - - return int.Parse(line); } public static string LocalDriv() { - return File.ReadLines(debugFilePath).Skip(4).Take(1).First(); + return "466.11"; + } + + public static string GPUname() + { + return "Nvidia GeForce GTX 1080ti (debug)"; } } } diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs index 5731ac4..0f73c58 100644 --- a/EnvyUpdate/MainWindow.xaml.cs +++ b/EnvyUpdate/MainWindow.xaml.cs @@ -113,6 +113,7 @@ namespace EnvyUpdate dtcid = Debug.LoadFakeIDs("dtcid"); localDriv = Debug.LocalDriv(); textblockGPU.Text = localDriv; + textblockGPUName.Text = Debug.GPUname(); } gpuURL = "http://www.nvidia.com/Download/processDriver.aspx?psid=" + psid.ToString() + "&pfid=" + pfid.ToString() + "&osid=" + osid.ToString() + "&dtcid=" + dtcid.ToString(); // + "&lid=" + langid.ToString();