fix debug & skip
This commit is contained in:
parent
99267bdf9d
commit
6b745618e6
3 changed files with 21 additions and 19 deletions
|
@ -44,7 +44,7 @@
|
||||||
Message="..."
|
Message="..."
|
||||||
Severity="Informational" />
|
Severity="Informational" />
|
||||||
|
|
||||||
<ui:Button x:Name="buttonSkipVersion" Margin="8,0,0,0" Grid.Column="1" Appearance="Secondary" Icon="ArrowForward24" Visibility="Collapsed" ToolTip="{x:Static p:Resources.ui_skipversion}" />
|
<ui:Button x:Name="buttonSkipVersion" Margin="8,0,0,0" Grid.Column="1" Appearance="Secondary" Icon="ArrowForward24" Visibility="Collapsed" ToolTip="{x:Static p:Resources.ui_skipversion}" Click="buttonSkipVersion_Click" />
|
||||||
|
|
||||||
<ui:Button x:Name="buttonDownload" Margin="8,0,0,0" MinWidth="100" Grid.Column="2" Appearance="Primary" Icon="ArrowDownload24" Visibility="Collapsed" />
|
<ui:Button x:Name="buttonDownload" Margin="8,0,0,0" MinWidth="100" Grid.Column="2" Appearance="Primary" Icon="ArrowDownload24" Visibility="Collapsed" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -36,7 +36,10 @@ namespace EnvyUpdate
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
localDriv = Util.GetLocDriv();
|
if (Debug.isFake)
|
||||||
|
localDriv = Debug.LocalDriv();
|
||||||
|
else
|
||||||
|
localDriv = Util.GetLocDriv();
|
||||||
|
|
||||||
Debug.LogToFile("INFO Local driver version: " + localDriv);
|
Debug.LogToFile("INFO Local driver version: " + localDriv);
|
||||||
|
|
||||||
|
@ -48,10 +51,10 @@ namespace EnvyUpdate
|
||||||
|
|
||||||
Debug.LogToFile("INFO Detecting driver type.");
|
Debug.LogToFile("INFO Detecting driver type.");
|
||||||
|
|
||||||
if (Util.IsDCH())
|
if (Debug.isFake)
|
||||||
textblockLocalType.Text = "DCH";
|
|
||||||
else if (Debug.isFake)
|
|
||||||
textblockLocalType.Text = "DCH (Debug)";
|
textblockLocalType.Text = "DCH (Debug)";
|
||||||
|
else if (Util.IsDCH())
|
||||||
|
textblockLocalType.Text = "DCH";
|
||||||
else
|
else
|
||||||
textblockLocalType.Text = "Standard";
|
textblockLocalType.Text = "Standard";
|
||||||
|
|
||||||
|
@ -91,6 +94,8 @@ namespace EnvyUpdate
|
||||||
driverFileChangedWatcher.EnableRaisingEvents = true;
|
driverFileChangedWatcher.EnableRaisingEvents = true;
|
||||||
Debug.LogToFile("INFO Started update file system watcher.");
|
Debug.LogToFile("INFO Started update file system watcher.");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
Debug.LogToFile("WARN Could not start update file system watcher. Path not found: " + watchDirPath);
|
||||||
|
|
||||||
Load();
|
Load();
|
||||||
}
|
}
|
||||||
|
@ -119,7 +124,7 @@ namespace EnvyUpdate
|
||||||
skippedVer = File.ReadLines(GlobalVars.exedirectory + "skip.envy").First();
|
skippedVer = File.ReadLines(GlobalVars.exedirectory + "skip.envy").First();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This little bool check is necessary for debug mode on systems without an Nvidia GPU.
|
// This little bool check is necessary for debug fake mode.
|
||||||
if (Debug.isFake)
|
if (Debug.isFake)
|
||||||
{
|
{
|
||||||
localDriv = Debug.LocalDriv();
|
localDriv = Debug.LocalDriv();
|
||||||
|
@ -296,7 +301,7 @@ namespace EnvyUpdate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonSkip_Click(object sender, RoutedEventArgs e)
|
private void buttonSkipVersion_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Debug.LogToFile("INFO Skipping version.");
|
Debug.LogToFile("INFO Skipping version.");
|
||||||
skippedVer = onlineDriv;
|
skippedVer = onlineDriv;
|
||||||
|
|
|
@ -61,19 +61,16 @@ namespace EnvyUpdate
|
||||||
Util.UninstallAll();
|
Util.UninstallAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Util.IsNvidia())
|
if (arguments.Contains("/fake"))
|
||||||
{
|
{
|
||||||
if (arguments.Contains("/fake"))
|
Debug.isFake = true;
|
||||||
{
|
Debug.LogToFile("WARN Faking GPU with debug info.");
|
||||||
Debug.isFake = true;
|
}
|
||||||
Debug.LogToFile("WARN Faking GPU with debug info.");
|
else if (!Util.IsNvidia())
|
||||||
}
|
{
|
||||||
else
|
Debug.LogToFile("FATAL No supported GPU found, terminating.");
|
||||||
{
|
MessageBox.Show(Properties.Resources.no_compatible_gpu);
|
||||||
Debug.LogToFile("FATAL No supported GPU found, terminating.");
|
Environment.Exit(255);
|
||||||
MessageBox.Show(Properties.Resources.no_compatible_gpu);
|
|
||||||
Environment.Exit(255);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check if launched as miminized with arg
|
//Check if launched as miminized with arg
|
||||||
|
|
Reference in a new issue