public bool LoadXMLConfiguration()
{
var xbmcDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\XBMC\userdata\peripheral_data";
- return LoadXMLConfiguration(xbmcDir + @"\usb_2548_1001.xml") || LoadXMLConfiguration(xbmcDir + @"\usb_2548_1002.xml");
+ return LoadXMLConfiguration(xbmcDir + string.Format(@"\usb_{0:X}_{1:X}.xml", Program.Instance.Controller.AdapterVendorId, Program.Instance.Controller.AdapterProductId)) ||
+ LoadXMLConfiguration(xbmcDir + @"\usb_2548_1001.xml") ||
+ LoadXMLConfiguration(xbmcDir + @"\usb_2548_1002.xml");
}
public bool LoadXMLConfiguration(string filename)
{
Title = Resources.store_settings_where,
InitialDirectory = xbmcDir,
- FileName = string.Format("usb_{0}.xml", Program.Instance.Controller.USBDescriptor.Replace(':', '_')),
+ FileName = string.Format("usb_{0:X}_{1:X}.xml", Program.Instance.Controller.AdapterVendorId, Program.Instance.Controller.AdapterProductId),
Filter = Resources.xml_file_filter,
FilterIndex = 1
};
// only supported by 1.5.1+ clients
output.AppendLine("<!-- the following lines are only supported by v1.5.1+ clients -->");
- //TODO
- //output.AppendLine("<setting id=\"send_inactive_source\" value=\"" + (config.SendInactiveSource ? 1 : 0) + "\" />");
+ output.AppendLine("<setting id=\"send_inactive_source\" value=\"" + (SendInactiveSource.Value ? 1 : 0) + "\" />");
output.AppendLine("</settings>");
writer.Write(output.ToString());