mirror of https://github.com/PCSX2/pcsx2.git
[skip ci] gsdumpgui: Update code to share only one gsdx config for all dlls.
This commit is contained in:
parent
dabc99f466
commit
8c6e4cd28b
|
@ -98,7 +98,7 @@ namespace GSDumpGUI
|
|||
Int32 Renderer = Convert.ToInt32(args[3]);
|
||||
|
||||
wrap.Load(DLLPath);
|
||||
Directory.SetCurrentDirectory(Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\" + Path.GetFileName(DLLPath) + "\\"));
|
||||
Directory.SetCurrentDirectory(Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\"));
|
||||
if (Operation == "GSReplay")
|
||||
{
|
||||
dump = GSDump.LoadDump(DumpPath);
|
||||
|
|
|
@ -194,7 +194,7 @@ namespace GSDumpGUI
|
|||
txtLog.Text = "";
|
||||
String GSDXName = lstGSDX.SelectedItem.ToString().Split(new char[] { '|' })[0].TrimEnd();
|
||||
|
||||
CreateDirs(GSDXName);
|
||||
CreateDirs();
|
||||
|
||||
// Set the Arguments to pass to the child
|
||||
String DLLPath = Properties.Settings.Default.GSDXDir + "\\" + GSDXName;
|
||||
|
@ -226,7 +226,7 @@ namespace GSDumpGUI
|
|||
}
|
||||
if (SelectedRenderer != "-1")
|
||||
{
|
||||
String GSdxIniPath = AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\" + GSDXName + "\\inis\\gsdx.ini";
|
||||
String GSdxIniPath = AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\inis\\gsdx.ini";
|
||||
NativeMethods.WritePrivateProfileString("Settings", "Renderer", SelectedRenderer, GSdxIniPath);
|
||||
}
|
||||
if (lstDumps.SelectedItem != null)
|
||||
|
@ -248,7 +248,7 @@ namespace GSDumpGUI
|
|||
Processes.Add(p);
|
||||
}
|
||||
|
||||
private static void CreateDirs(String GSDXName)
|
||||
private static void CreateDirs()
|
||||
{
|
||||
// Create and set the config directory.
|
||||
String Dir = AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\";
|
||||
|
@ -256,18 +256,13 @@ namespace GSDumpGUI
|
|||
{
|
||||
Directory.CreateDirectory(Dir);
|
||||
}
|
||||
Dir += GSDXName;
|
||||
if (!Directory.Exists(Dir))
|
||||
{
|
||||
Directory.CreateDirectory(Dir);
|
||||
}
|
||||
Dir += "\\Inis\\";
|
||||
if (!Directory.Exists(Dir))
|
||||
{
|
||||
Directory.CreateDirectory(Dir);
|
||||
File.Create(Dir + "\\gsdx.ini").Close();
|
||||
}
|
||||
Dir = AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\" + GSDXName;
|
||||
Dir = AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs";
|
||||
Directory.SetCurrentDirectory(Dir);
|
||||
}
|
||||
|
||||
|
@ -302,9 +297,8 @@ namespace GSDumpGUI
|
|||
// Execute the GSconfigure function
|
||||
if (lstGSDX.SelectedIndex != -1)
|
||||
{
|
||||
String GSDXName = lstGSDX.SelectedItem.ToString().Split(new char[] { '|' })[0];
|
||||
CreateDirs(GSDXName);
|
||||
Process.Start(AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\" + GSDXName + "\\inis\\gsdx.ini");
|
||||
CreateDirs();
|
||||
Process.Start(AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\inis\\gsdx.ini");
|
||||
}
|
||||
else
|
||||
MessageBox.Show("Select your GSdx first", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
|
|
Loading…
Reference in New Issue