Skip to content

Commit

Permalink
replace gpu detection regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob committed Apr 1, 2023
1 parent 01c6f81 commit 7173f2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion EnvyUpdate/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<TextBlock x:Name="textblockGPUName" Margin="10,14,35,0" TextWrapping="Wrap" Text="GPU..." Height="16" VerticalAlignment="Top" TextAlignment="Center" Grid.RowSpan="2" FontWeight="Bold"/>
<TextBlock HorizontalAlignment="Left" Margin="10,19,0,0" TextWrapping="Wrap" FontWeight="Bold" Width="140" Height="16" VerticalAlignment="Top" Grid.Row="1" Text="{x:Static p:Resources.ui_localdriver_type}"/>
<TextBlock x:Name="textblockLocalType" HorizontalAlignment="Right" Margin="0,19,10,0" TextWrapping="Wrap" Width="134" Height="16" VerticalAlignment="Top" TextAlignment="Right" Grid.Row="1"><Run Text="&lt;none&gt;"/><LineBreak/><Run/></TextBlock>
<RadioButton x:Name="radioGRD" Content="Game Ready Driver" HorizontalAlignment="Left" Margin="10,40,0,0" Grid.Row="1" VerticalAlignment="Top" Checked="radioGRD_Checked"/>
<RadioButton x:Name="radioGRD" Content="Game Ready / Standard Driver" HorizontalAlignment="Left" Margin="10,40,0,0" Grid.Row="1" VerticalAlignment="Top" Checked="radioGRD_Checked"/>
<RadioButton x:Name="radioSD" Content="Studio Driver" HorizontalAlignment="Left" Margin="10,60,0,0" Grid.Row="1" VerticalAlignment="Top" Checked="radioSD_Checked"/>
<CheckBox x:Name="chkAutostart" Content="{x:Static p:Resources.ui_autostart}" HorizontalAlignment="Left" Margin="10,131,0,0" Grid.Row="1" VerticalAlignment="Top" Click="chkAutostart_Click"/>
<Button x:Name="buttonSkip" Content="{x:Static p:Resources.ui_skipversion}" Margin="0,131,10,0" Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Right" Click="buttonSkip_Click" IsEnabled="False"/>
Expand Down
4 changes: 2 additions & 2 deletions EnvyUpdate/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.17")]
[assembly: AssemblyFileVersion("2.17")]
[assembly: AssemblyVersion("2.18")]
[assembly: AssemblyFileVersion("2.18")]
4 changes: 1 addition & 3 deletions EnvyUpdate/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,7 @@ public static string GetGPUName(bool lower)
{
GPUName = obj["VideoProcessor"].ToString().ToLower();
// Remove any 3GB, 6GB or similar from name. We don't need to know the VRAM to get results.
GPUName = Regex.Replace(GPUName, " \\d+gb", "");
GPUName = Regex.Replace(GPUName, " max-q", "");
GPUName = Regex.Replace(GPUName, "nvidia ", "");
GPUName = Regex.Match(GPUName, "(geforce )?.tx \\w*\\d*").Value;
}
else
GPUName = obj["VideoProcessor"].ToString();
Expand Down

0 comments on commit 7173f2e

Please sign in to comment.