add check for cards not supporting studio drivers
This commit is contained in:
parent
25bd864e76
commit
2e4fa930ff
5 changed files with 45 additions and 3 deletions
|
@ -146,7 +146,31 @@ namespace EnvyUpdate
|
|||
textblockGPUName.Text = Debug.GPUname();
|
||||
}
|
||||
|
||||
gpuURL = Util.GetGpuUrl();
|
||||
try
|
||||
{
|
||||
gpuURL = Util.GetGpuUrl();
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
try
|
||||
{
|
||||
// disable SD and try with GRD
|
||||
if (File.Exists(GlobalVars.exepath + "sd.envy"))
|
||||
{
|
||||
File.Delete(GlobalVars.exepath + "sd.envy");
|
||||
}
|
||||
|
||||
gpuURL = Util.GetGpuUrl(); //try again with GRD
|
||||
MessageBox.Show(Properties.Resources.ui_studionotsupported);
|
||||
radioGRD.IsChecked = true;
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
// Now we have a problem.
|
||||
MessageBox.Show("ERROR: Invalid API response from Nvidia. Please file an issue on GitHub.");
|
||||
Environment.Exit(10);
|
||||
}
|
||||
}
|
||||
|
||||
using (var c = new WebClient())
|
||||
{
|
||||
|
|
9
EnvyUpdate/Properties/Resources.Designer.cs
generated
9
EnvyUpdate/Properties/Resources.Designer.cs
generated
|
@ -222,6 +222,15 @@ namespace EnvyUpdate.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Studio Driver is not supported by this graphics card..
|
||||
/// </summary>
|
||||
public static string ui_studionotsupported {
|
||||
get {
|
||||
return ResourceManager.GetString("ui_studionotsupported", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Are you sure you want to uninstall EnvyUpdate?.
|
||||
/// </summary>
|
||||
|
|
|
@ -171,6 +171,9 @@
|
|||
<data name="ui_skipversion" xml:space="preserve">
|
||||
<value>Diese Version überspringen</value>
|
||||
</data>
|
||||
<data name="ui_studionotsupported" xml:space="preserve">
|
||||
<value>Studio Treiber wird von dieser Grafikkarte nicht unterstützt.</value>
|
||||
</data>
|
||||
<data name="uninstall_confirm" xml:space="preserve">
|
||||
<value>Sind Sie sich sicher, dass Sie EnvyUpdate deinstallieren wollen?</value>
|
||||
</data>
|
||||
|
|
|
@ -171,6 +171,9 @@
|
|||
<data name="ui_skipversion" xml:space="preserve">
|
||||
<value>Skip this version</value>
|
||||
</data>
|
||||
<data name="ui_studionotsupported" xml:space="preserve">
|
||||
<value>Studio Driver is not supported by this graphics card.</value>
|
||||
</data>
|
||||
<data name="uninstall_confirm" xml:space="preserve">
|
||||
<value>Are you sure you want to uninstall EnvyUpdate?</value>
|
||||
</data>
|
||||
|
|
|
@ -394,8 +394,6 @@ namespace EnvyUpdate
|
|||
|
||||
public static string GetGpuUrl()
|
||||
{
|
||||
//TODO: Make a list of languages and match OS language to driver
|
||||
//int langid;
|
||||
int psid;
|
||||
int pfid;
|
||||
int osid;
|
||||
|
@ -437,6 +435,11 @@ namespace EnvyUpdate
|
|||
//relative url
|
||||
gpuURL = "https://www.nvidia.com/Download/" + gpuURL;
|
||||
}
|
||||
else if (gpuURL.Contains("No certified downloads were found"))
|
||||
{
|
||||
//configuration not supported
|
||||
throw new ArgumentException();
|
||||
}
|
||||
else
|
||||
{
|
||||
//panic.
|
||||
|
|
Reference in a new issue