public N64Injector() : base() { BasePath = Environment.CurrentDirectory + "\\base_n64"; Base = GetLoadedBase(); ConfigFilePath = null; ConfigFile = null; DarkFilter = true; Widescreen = false; ScaleX = 1.0F; ScaleY = 1.0F; TranslationX = 0.0F; TranslationY = 0.0F; }
private void InjectConfigFile() { if (RomIsValid) { if (Directory.Exists(BasePath + "\\content\\config")) { Directory.Delete(BasePath + "\\content\\config", true); } Directory.CreateDirectory(BasePath + "\\content\\config"); if (!ConfigFileIsValid) { File.Create(BasePath + "\\content\\config\\U" + Rom.ProductCodeVersion + ".z64.ini").Close(); } else { VCN64ConfigFile.Copy(ConfigFilePath, BasePath + "\\content\\config\\U" + Rom.ProductCodeVersion + ".z64.ini"); } } else if (ConfigFileIsValid) { string[] files = Directory.GetFiles(BasePath + "\\content\\rom"); if (files.Length > 1) { throw new Exception("The folder \"" + BasePath + "\\content\\rom\" contains more than one file."); } string filename = Path.GetFileName(files[0]); if (Directory.Exists(BasePath + "\\content\\config")) { Directory.Delete(BasePath + "\\content\\config", true); } Directory.CreateDirectory(BasePath + "\\content\\config"); VCN64ConfigFile.Copy(ConfigFilePath, BasePath + "\\content\\config\\" + filename + ".ini"); } }
public void SetConfigFile(string configFilePath) { ConfigFilePath = configFilePath; ConfigFile = new VCN64ConfigFile(configFilePath); }