- PrintToStdOut("Use the TV's language setting: %s", bUseTVMenuLanguage ? "yes" : "no");
- PrintToStdOut("Power on the TV when starting XBMC: %s", bPowerOnStartup ? "yes" : "no");
- PrintToStdOut("Put devices in standby mode when activating screensaver: %s", bPowerOffScreensaver ? "yes" : "no");
- PrintToStdOut("Put this PC in standby mode when the TV is switched off: %s", bPowerOffOnStandby ? "yes" : "no");
+ PrintToStdOut("Use the TV's language setting: %s", g_config.bUseTVMenuLanguage ? "yes" : "no");
+ PrintToStdOut("Power on the TV when starting XBMC: %s", g_config.bPowerOnStartup ? "yes" : "no");
+ PrintToStdOut("Power off devices when stopping XBMC: %s", g_config.bPowerOffShutdown ? "yes" : "no");
+ PrintToStdOut("Put devices in standby mode when activating screensaver: %s", g_config.bPowerOffScreensaver ? "yes" : "no");
+ PrintToStdOut("Put this PC in standby mode when the TV is switched off: %s\n\n", g_config.bPowerOffOnStandby ? "yes" : "no");
+
+ if (g_parser->CanPersistConfiguration())
+ {
+ PrintToStdOut("Do you want to store these settings in the adapter (y/n)?");
+ string input;
+ getline(cin, input);
+ cin.clear();
+ if (input == "y" || input == "Y")
+ {
+ PrintToStdOut("Storing settings ...");
+ if (g_parser->PersistConfiguration(&g_config))
+ PrintToStdOut("Settings stored.");
+ else
+ PrintToStdOut("The settings could not be stored");
+ }
+ }
+ else
+ {
+ PrintToStdOut("This adapter doesn't support settings persistence. Please set up these settings in your media player application.");
+ }