settings: restrict value of visualizer_sync_interval to be >= 10

This commit is contained in:
Andrzej Rybczak
2015-08-13 11:26:33 +02:00
parent 46960aaaea
commit b91bcc291f
2 changed files with 2 additions and 0 deletions

1
NEWS
View File

@@ -28,6 +28,7 @@ ncmpcpp-0.7 (????-??-??)
* Support for range selection was added (bound to Ctrl-V by default). In addition, sorting, reversing and shuffling items in playlist now works on ranges. * Support for range selection was added (bound to Ctrl-V by default). In addition, sorting, reversing and shuffling items in playlist now works on ranges.
* Support for selecting found items was added (bound to Ctrl-_ by default). * Support for selecting found items was added (bound to Ctrl-_ by default).
* Tracks in media library are now properly sorted for track numbers greater than 99. * Tracks in media library are now properly sorted for track numbers greater than 99.
* Value of 'visualizer_sync_interval' is now restricted to be greater than 9.
ncmpcpp-0.6.5 (2015-07-05) ncmpcpp-0.6.5 (2015-07-05)

View File

@@ -253,6 +253,7 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
})); }));
p.add("visualizer_sync_interval", assign_default<unsigned>( p.add("visualizer_sync_interval", assign_default<unsigned>(
visualizer_sync_interval, 30, [](unsigned v) { visualizer_sync_interval, 30, [](unsigned v) {
lowerBoundCheck(v, 10u);
return boost::posix_time::seconds(v); return boost::posix_time::seconds(v);
})); }));
p.add("visualizer_type", assign_default( p.add("visualizer_type", assign_default(