this bullshit isnt working

This commit is contained in:
NicoAICP 2020-06-27 19:15:57 +02:00
parent 3d68a20813
commit 999483a5ec
4 changed files with 47 additions and 8 deletions

View file

@ -113,7 +113,7 @@ namespace UWUVCI_AIO_WPF
// you could use a range of methods to process the passed file path
if (e.Args.Length >= 1 && e.Args[0] == "--debug")
{
wnd.setDebug();
wnd.setDebug(bypass);
}
wnd.Show();
}

View file

@ -148,15 +148,21 @@ namespace UWUVCI_AIO_WPF
[STAThread]
public static bool Inject(GameConfig Configuration, string RomPath, MainViewModel mvm, bool force)
{
mvm.failed = false;
DispatcherTimer timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromSeconds(1);
timer.Tick += tick;
Clean();
long freeSpaceInBytes = 0;
if (!mvm.saveworkaround)
{
timer.Start();
long gamesize = new FileInfo(RomPath).Length;
Thread.Sleep(20000);
var drive = new DriveInfo(tempPath);
done = true;
timer.Stop();
freeSpaceInBytes = drive.AvailableFreeSpace;
}
long neededspace = 0;
@ -239,6 +245,11 @@ namespace UWUVCI_AIO_WPF
mvm.Progress = 100;
code = null;
if(e.Message == "Failed this shit")
{
Clean();
return false;
}
if (e.Message.Contains("Images")){
MessageBox.Show("Injection Failed due to wrong BitDepth, please check if your Files are in a different bitdepth than 32bit or 24bit", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
@ -286,6 +297,16 @@ namespace UWUVCI_AIO_WPF
}
}
private static bool done = false;
private static void tick(object sender, EventArgs e)
{
if (!done)
{
mvvm.failed = true;
}
throw new Exception("Failed this shit");
}
public static void SendKey(IntPtr hWnd, System.Windows.Forms.Keys key)
{
PostMessage(hWnd, WM_KEYUP, key, 0);

View file

@ -1074,7 +1074,7 @@ namespace UWUVCI_AIO_WPF
}
public bool failed = false;
public void Inject(bool force)
{
@ -1114,6 +1114,19 @@ namespace UWUVCI_AIO_WPF
catch (Exception) { }
cm.ShowDialog();
}
else
{
if (failed)
{
MessageBox.Show("In here");
mw.allowBypass();
if (debug)
{
mw.setDebug(true);
}
Inject(force);
}
}
}

View file

@ -405,26 +405,31 @@ namespace UWUVCI_AIO_WPF
{
min.Background = new SolidColorBrush(Color.FromArgb(0, 250, 250, 250));
}
public void setDebug()
public void setDebug(bool bypass)
{
MainViewModel mvm = FindResource("mvm") as MainViewModel;
mvm.debug = true;
spc.Visibility = Visibility.Visible;
spc.ToolTip = "\"Unhides\" used Tools (Displays whats going on in the Background while a ProgressBar appears";
if (mvm.saveworkaround)
if (bypass)
{
spc.Text = "Debug & Space Bypass Mode";
spc.ToolTip += "\nDisables all Space checks. May cause issues.";
spc.ToolTip = "Disables all Space checks. May cause issues.\n\"Unhides\" used Tools (Displays whats going on in the Background while a ProgressBar appears";
}
else
{
spc.Text = "Debug Mode";
spc.ToolTip = "\"Unhides\" used Tools (Displays whats going on in the Background while a ProgressBar appears";
}
}
public void allowBypass()
{
(FindResource("mvm") as MainViewModel).saveworkaround = true;
spc.Visibility = Visibility.Visible;
spc.Text = "Space Bypass Mode";
spc.ToolTip = "Disables all Space checks. May cause issues.";
}
}
}