From: Lars Op den Kamp Date: Fri, 10 Feb 2012 09:32:48 +0000 (+0100) Subject: cec-config: save the config xml if the adapter doesn't support persisting settings. X-Git-Tag: upstream/2.2.0~1^2~35^2~118 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1361efd225b70e80a404c66047baf38a9db54e86;p=deb_libcec.git cec-config: save the config xml if the adapter doesn't support persisting settings. --- diff --git a/src/cec-config/cec-config.cpp b/src/cec-config/cec-config.cpp index 268cf97..2897e2d 100644 --- a/src/cec-config/cec-config.cpp +++ b/src/cec-config/cec-config.cpp @@ -444,6 +444,28 @@ int main (int argc, char *argv[]) else { PrintToStdOut("This adapter doesn't support settings persistence. Please set up these settings in your media player application."); + + ofstream configOutput; + configOutput.open("usb_2548_1001.xml"); + if (configOutput.is_open()) + { + configOutput << + "\n" << + "\t\n" << + "\t\n" << + "\t\n" << + "\t\n" << + "\t\n" << + "\t\n" << + "\t\n" << + "\t\n" << + "\t\n" << + "\t\n" << + ""; + configOutput.close(); + + PrintToStdOut("The configuration has been stored in 'usb_2548_1001.xml'. Copy this file to ~/.userdata/peripheral_data to use it in XBMC"); + } } g_parser->StandbyDevices();