fix some path config problems. DGB didn't work at all, and screenshots and saverams may have been busted on some systems
This commit is contained in:
parent
7cb608ead4
commit
ce3fc79e10
|
@ -969,6 +969,14 @@ namespace BizHawk.MultiClient
|
|||
new PathEntry() { System = "GB_GBC", SystemDisplayName="Gameboy", Type = "Cheats", Path = Path.Combine(".", "Cheats"), Ordinal = 5 },
|
||||
new PathEntry() { System = "GB_GBC", SystemDisplayName="Gameboy", Type = "Palettes", Path = Path.Combine(".", "Palettes"), Ordinal = 6 },
|
||||
|
||||
new PathEntry() { System = "DGB", SystemDisplayName="Dual Gameboy", Type = "Base", Path= Path.Combine(".", "Dual Gameboy"), Ordinal = 0 },
|
||||
new PathEntry() { System = "DGB", SystemDisplayName="Dual Gameboy", Type = "ROM", Path = ".", Ordinal = 1 },
|
||||
new PathEntry() { System = "DGB", SystemDisplayName="Dual Gameboy", Type = "Savestates", Path= Path.Combine(".", "State"), Ordinal = 2 },
|
||||
new PathEntry() { System = "DGB", SystemDisplayName="Dual Gameboy", Type = "Save RAM", Path = Path.Combine(".", "SaveRAM"), Ordinal = 3 },
|
||||
new PathEntry() { System = "DGB", SystemDisplayName="Dual Gameboy", Type = "Screenshots", Path = Path.Combine(".", "Screenshots"), Ordinal = 4 },
|
||||
new PathEntry() { System = "DGB", SystemDisplayName="Dual Gameboy", Type = "Cheats", Path = Path.Combine(".", "Cheats"), Ordinal = 5 },
|
||||
new PathEntry() { System = "DGB", SystemDisplayName="Dual Gameboy", Type = "Palettes", Path = Path.Combine(".", "Palettes"), Ordinal = 6 },
|
||||
|
||||
new PathEntry() { System = "TI83", SystemDisplayName="TI83", Type = "Base", Path= Path.Combine(".", "TI83"), Ordinal = 0 },
|
||||
new PathEntry() { System = "TI83", SystemDisplayName="TI83", Type = "ROM", Path = ".", Ordinal = 1 },
|
||||
new PathEntry() { System = "TI83", SystemDisplayName="TI83", Type = "Savestates", Path= Path.Combine(".", "State"), Ordinal = 2 },
|
||||
|
|
|
@ -458,11 +458,11 @@ namespace BizHawk.MultiClient
|
|||
target.SMS_ShowBG = Global.Config.SMSDispBG;
|
||||
target.SMS_ShowOBJ = Global.Config.SMSDispOBJ;
|
||||
|
||||
target.PSX_FirmwaresPath = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath); // PathManager.MakeAbsolutePath(Global.Config.PathPSXFirmwares, "PSX");
|
||||
target.PSX_FirmwaresPath = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath, null); // PathManager.MakeAbsolutePath(Global.Config.PathPSXFirmwares, "PSX");
|
||||
|
||||
target.C64_FirmwaresPath = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath); // PathManager.MakeAbsolutePath(Global.Config.PathC64Firmwares, "C64");
|
||||
target.C64_FirmwaresPath = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath, null); // PathManager.MakeAbsolutePath(Global.Config.PathC64Firmwares, "C64");
|
||||
|
||||
target.SNES_FirmwaresPath = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath); // PathManager.MakeAbsolutePath(Global.Config.PathSNESFirmwares, "SNES");
|
||||
target.SNES_FirmwaresPath = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath, null); // PathManager.MakeAbsolutePath(Global.Config.PathSNESFirmwares, "SNES");
|
||||
target.SNES_ShowBG1_0 = Global.Config.SNES_ShowBG1_0;
|
||||
target.SNES_ShowBG1_1 = Global.Config.SNES_ShowBG1_1;
|
||||
target.SNES_ShowBG2_0 = Global.Config.SNES_ShowBG2_0;
|
||||
|
@ -2330,6 +2330,10 @@ namespace BizHawk.MultiClient
|
|||
else
|
||||
col = Color.White.ToArgb();
|
||||
}
|
||||
|
||||
// make opaque
|
||||
//col |= unchecked((int)0xff000000);
|
||||
|
||||
ptr[y * stride + x] = col;
|
||||
}
|
||||
image.UnlockBits(bmpdata);
|
||||
|
@ -3623,12 +3627,12 @@ namespace BizHawk.MultiClient
|
|||
if (!(Global.Emulator is NullEmulator))
|
||||
{
|
||||
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.AVPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.AVPath, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
sfd.FileName = "NULL";
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.AVPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.AVPath, null);
|
||||
}
|
||||
sfd.Filter = String.Format("{0} (*.{0})|*.{0}|All Files|*.*", aw.DesiredExtension());
|
||||
|
||||
|
@ -3830,7 +3834,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
void ProcessMovieImport(string fn)
|
||||
{
|
||||
string d = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath);
|
||||
string d = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath, null);
|
||||
string errorMsg;
|
||||
string warningMsg;
|
||||
Movie m = MovieImport.ImportFile(fn, out errorMsg, out warningMsg);
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
listviewSorter = new ListViewSorter(this, -1);
|
||||
|
||||
currSelectorDir = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath);
|
||||
currSelectorDir = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath, null);
|
||||
}
|
||||
|
||||
//makes sure that the specified SystemId is selected in the list (and that all the firmwares for it are visible)
|
||||
|
@ -197,7 +197,7 @@ namespace BizHawk.MultiClient
|
|||
else
|
||||
{
|
||||
//lazy substring extraction. really should do a better job
|
||||
var basePath = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath) + Path.DirectorySeparatorChar;
|
||||
var basePath = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath, null) + Path.DirectorySeparatorChar;
|
||||
|
||||
var path = ri.FilePath.Replace(basePath, "");
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ namespace BizHawk.MultiClient
|
|||
FolderBrowserEx f = new FolderBrowserEx
|
||||
{
|
||||
Description = "Set the directory for the base global path",
|
||||
SelectedPath = PathManager.MakeAbsolutePath(BasePathBox.Text)
|
||||
SelectedPath = PathManager.MakeAbsolutePath(BasePathBox.Text, null)
|
||||
};
|
||||
DialogResult result = f.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace BizHawk.MultiClient
|
|||
/// <summary>
|
||||
/// Makes a path relative to the %exe% dir
|
||||
/// </summary>
|
||||
public static string MakeProgramRelativePath(string path) { return MakeAbsolutePath("%exe%/" + path); }
|
||||
public static string MakeProgramRelativePath(string path) { return MakeAbsolutePath("%exe%/" + path, null); }
|
||||
|
||||
/// <summary>
|
||||
/// The location of the default INI file
|
||||
|
@ -76,10 +76,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public static string StandardFirmwareName(string name)
|
||||
{
|
||||
return Path.Combine(MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath), name);
|
||||
return Path.Combine(MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPath, null), name);
|
||||
}
|
||||
|
||||
public static string MakeAbsolutePath(string path, string system = null)
|
||||
public static string MakeAbsolutePath(string path, string system)
|
||||
{
|
||||
//Hack
|
||||
if (system == "Global")
|
||||
|
@ -188,7 +188,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public static string GetLuaPath()
|
||||
{
|
||||
return MakeAbsolutePath(Global.Config.PathEntries.LuaPath);
|
||||
return MakeAbsolutePath(Global.Config.PathEntries.LuaPath, null);
|
||||
}
|
||||
|
||||
public static string GetRomsPath(string sysID)
|
||||
|
@ -240,7 +240,7 @@ namespace BizHawk.MultiClient
|
|||
pathEntry = Global.Config.PathEntries[game.System, "Base"];
|
||||
}
|
||||
|
||||
return Path.Combine(MakeAbsolutePath(pathEntry.Path), name);
|
||||
return Path.Combine(MakeAbsolutePath(pathEntry.Path, game.System), name);
|
||||
}
|
||||
|
||||
public static string GetSaveStatePath(GameInfo game)
|
||||
|
@ -285,7 +285,7 @@ namespace BizHawk.MultiClient
|
|||
pathEntry = Global.Config.PathEntries[game.System, "Base"];
|
||||
}
|
||||
|
||||
return Path.Combine(MakeAbsolutePath(pathEntry.Path), name);
|
||||
return Path.Combine(MakeAbsolutePath(pathEntry.Path, game.System), name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -304,7 +304,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
else
|
||||
{
|
||||
parent_path = MakeAbsolutePath(GetPlatformBase(system));
|
||||
parent_path = MakeAbsolutePath(GetPlatformBase(system), system);
|
||||
}
|
||||
|
||||
if (IsSubfolder(parent_path, absolute_path))
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void BrowseMovies_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog { InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath) };
|
||||
OpenFileDialog ofd = new OpenFileDialog { InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath, null) };
|
||||
string filter = "Movie Files (*." + Global.Config.MovieExtension + ")|*." + Global.Config.MovieExtension + "|Savestates|*.state|All Files|*.*";
|
||||
ofd.Filter = filter;
|
||||
|
||||
|
@ -286,7 +286,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
ClearList();
|
||||
|
||||
string d = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath);
|
||||
string d = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath, null);
|
||||
if (!Directory.Exists(d))
|
||||
{
|
||||
Directory.CreateDirectory(d);
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (path[0] != '\\')
|
||||
path = path.Insert(0, "\\");
|
||||
path = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath) + path;
|
||||
path = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath, null) + path;
|
||||
|
||||
if (path[path.Length - 4] != '.') //If no file extension, add movie extension
|
||||
path += "." + Global.Config.MovieExtension;
|
||||
|
@ -181,7 +181,7 @@ namespace BizHawk.MultiClient
|
|||
string filename = "";
|
||||
SaveFileDialog sfd = new SaveFileDialog
|
||||
{
|
||||
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath),
|
||||
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath, null),
|
||||
DefaultExt = "." + Global.Config.MovieExtension,
|
||||
FileName = RecordBox.Text,
|
||||
OverwritePrompt = false
|
||||
|
|
Binary file not shown.
|
@ -1896,7 +1896,7 @@ namespace BizHawk.MultiClient
|
|||
var ofd = new OpenFileDialog();
|
||||
if (currentFile.Length > 0)
|
||||
ofd.FileName = Path.GetFileNameWithoutExtension(currentFile);
|
||||
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.WatchPath);
|
||||
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.WatchPath, null);
|
||||
ofd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*";
|
||||
ofd.RestoreDirectory = true;
|
||||
if (currentFile.Length > 0)
|
||||
|
|
|
@ -562,7 +562,7 @@ namespace BizHawk.MultiClient
|
|||
var ofd = new OpenFileDialog();
|
||||
if (currentFile.Length > 0)
|
||||
ofd.FileName = Path.GetFileNameWithoutExtension(currentFile);
|
||||
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.WatchPath);
|
||||
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.WatchPath, null);
|
||||
ofd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*";
|
||||
ofd.RestoreDirectory = true;
|
||||
|
||||
|
|
|
@ -451,7 +451,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
SaveFileDialog sfd = new SaveFileDialog
|
||||
{
|
||||
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath),
|
||||
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPath, null),
|
||||
DefaultExt = "." + Global.Config.MovieExtension,
|
||||
FileName = Global.MovieSession.Movie.Filename
|
||||
};
|
||||
|
|
|
@ -232,7 +232,7 @@ namespace BizHawk.MultiClient
|
|||
FileBox.Visible = true;
|
||||
BrowseBox.Visible = true;
|
||||
string name = PathManager.FilesystemSafeName(Global.Game);
|
||||
string filename = Path.Combine(PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPath), name) + ".txt";
|
||||
string filename = Path.Combine(PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPath, null), name) + ".txt";
|
||||
LogFile = new FileInfo(filename);
|
||||
if (LogFile.Directory != null && !LogFile.Directory.Exists)
|
||||
{
|
||||
|
@ -303,7 +303,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
string name = PathManager.FilesystemSafeName(Global.Game);
|
||||
sfd.FileName = name + ".txt";
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPath, null);
|
||||
}
|
||||
else if (!String.IsNullOrWhiteSpace(LogFile.FullName))
|
||||
{
|
||||
|
@ -313,7 +313,7 @@ namespace BizHawk.MultiClient
|
|||
else
|
||||
{
|
||||
sfd.FileName = Path.GetFileNameWithoutExtension(LogFile.FullName);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPath, null);
|
||||
}
|
||||
|
||||
sfd.Filter = "Text Files (*.txt)|*.txt|Log Files (*.log)|*.log|All Files|*.*";
|
||||
|
|
|
@ -187,12 +187,12 @@ namespace BizHawk.MultiClient
|
|||
else if (!(Global.Emulator is NullEmulator))
|
||||
{
|
||||
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.WatchPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.WatchPath, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
sfd.FileName = "NULL";
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.WatchPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.WatchPath, null);
|
||||
}
|
||||
sfd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*";
|
||||
sfd.RestoreDirectory = true;
|
||||
|
|
Loading…
Reference in New Issue