Shows error now if nes/snes rom is too big for base to inject

This commit is contained in:
NicoAICP 2020-04-08 23:48:11 +02:00
parent cd13bf2959
commit 8ec060ecea
3 changed files with 15 additions and 2 deletions

View file

@ -65,11 +65,16 @@ namespace UWUVCI_AIO_WPF
{
MessageBox.Show("Injection Failed due to Image Issues. Please check if your Images are made using following Information:\n\niconTex: \nDimensions: 128x128\nBitDepth: 32\n\nbootDrcTex: \nDimensions: 854x480\nBitDepth: 24\n\nbootTvTex: \nDimensions: 1280x720\nBitDepth: 24\n\nbootLogoTex: \nDimensions: 170x42\nBitDepth: 32", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
}
else if (e.Message.Contains("retro"))
{
MessageBox.Show("The ROM you want to Inject is to big for selected Base!\nPlease try again with different Base", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
}
else
{
MessageBox.Show("Injection Failed due to unknown circumstances, please contact us on the UWUVCI discord", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
}
Clean();
return false;
}
@ -390,11 +395,19 @@ namespace UWUVCI_AIO_WPF
{
retroinject.StartInfo.UseShellExecute = false;
retroinject.StartInfo.CreateNoWindow = true;
retroinject.StartInfo.RedirectStandardOutput = true;
retroinject.StartInfo.RedirectStandardError = true;
retroinject.StartInfo.FileName = Path.Combine(toolsPath, "retroinject.exe");
retroinject.StartInfo.Arguments = $"\"{rpxFile}\" \"{injectRomPath}\" \"{rpxFile}\"";
retroinject.Start();
retroinject.WaitForExit();
var s = retroinject.StandardOutput.ReadToEnd();
var e = retroinject.StandardError.ReadToEnd();
if (e.Contains("is too large") || s.Contains("is too large"))
{
throw new Exception("retro");
}
}
RPXcomp(rpxFile); //Compresses the RPX

View file

@ -20,7 +20,7 @@
<Button Content="Open TK Menu" HorizontalAlignment="Left" Margin="605,215,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Click="Button_Click"/>
<Button Content="Update Base Files" HorizontalAlignment="Left" Margin="605,308,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_3"/>
<Button Content="Start N64 Virtual Console INI Creator" HorizontalAlignment="Left" Margin="325,351,0,0" VerticalAlignment="Top" Width="425" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_4"/>
<Button Content="Credits" HorizontalAlignment="Left" Margin="1045,438,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_5"/>
<Button Content="Credits" HorizontalAlignment="Left" Margin="1040,438,0,0" VerticalAlignment="Top" Width="80" Click="Button_Click_5"/>
<Button Content="Update Tools" HorizontalAlignment="Left" Margin="483,308,0,0" VerticalAlignment="Top" Width="117" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_7"/>
<Button Content="Check For Updates" HorizontalAlignment="Left" Margin="325,308,0,0" VerticalAlignment="Top" Width="153" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_6"/>
<TextBlock HorizontalAlignment="Left" Margin="1040,10,0,0" TextWrapping="Wrap" Text="v2.0 Beta" VerticalAlignment="Top" FontSize="20"/>

View file

@ -64,7 +64,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click_5(object sender, RoutedEventArgs e)
{
MessageBox.Show("UWUVCI AIO - NicoAICP, Morilli, Lreiia Bot\n\n7za - Igor Pavlov\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Creator - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns", "Credits");
MessageBox.Show("UWUVCI AIO - NicoAICP, Morilli, Lreiia Bot\nBeta Testers/Contributors - wowjinxy, Danis\n\n7za - Igor Pavlov\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Creator - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns", "Credits");
}
private void Button_Click_6(object sender, RoutedEventArgs e)