summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2014-11-07 23:46:20 +0100
committerAndrzej Rybczak <electricityispower@gmail.com>2014-11-07 23:46:20 +0100
commit7acc64979e3c4f46856ea8c9e34a6b474af4c820 (patch)
treebb2ad20a4d1f85016c169b7232ef30bd155d88de /src/settings.cpp
parent543dadf3c6a8c3fb823b2a76b22dfe4414509ae5 (diff)
settings: make slave screen optional and unset by default
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 68323d1e..646c141b 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -518,10 +518,13 @@ bool Configuration::read(const std::string &config_path)
}, defaults_to(startup_screen_type, ScreenType::Playlist)
));
p.add("startup_slave_screen", option_parser::worker([this](std::string v) {
- startup_slave_screen_type = stringtoStartupScreenType(v);
- if (startup_slave_screen_type == ScreenType::Unknown)
- throw std::runtime_error("unknown slave screen: " + v);
- }, defaults_to(startup_slave_screen_type, ScreenType::Playlist)
+ if (!v.empty())
+ {
+ startup_slave_screen_type = stringtoStartupScreenType(v);
+ if (startup_slave_screen_type == ScreenType::Unknown)
+ throw std::runtime_error("unknown slave screen: " + v);
+ }
+ }, defaults_to(startup_slave_screen_type, boost::none)
));
p.add("locked_screen_width_part", assign_default<double>(
locked_screen_width_part, 50.0, [](double v) {