From 1361efd225b70e80a404c66047baf38a9db54e86 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Fri, 10 Feb 2012 10:32:48 +0100 Subject: [PATCH] cec-config: save the config xml if the adapter doesn't support persisting settings. --- src/cec-config/cec-config.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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(); -- 2.34.1