chore: better error reporting after fix for #300
Some checks failed
CMake / build-x11 (ubuntu-22.04) (push) Has been cancelled
CMake / build-x11 (ubuntu-24.04) (push) Has been cancelled
CMake / build-x11-wayland (ubuntu-22.04) (push) Has been cancelled
CMake / build-x11-wayland (ubuntu-24.04) (push) Has been cancelled
CMake / build-wayland (ubuntu-22.04) (push) Has been cancelled
CMake / build-wayland (ubuntu-24.04) (push) Has been cancelled

This commit is contained in:
Almamu 2025-05-15 22:28:23 +02:00
parent 555b488951
commit 3c334aac29

View File

@ -257,6 +257,10 @@ CApplicationContext::CApplicationContext (int argc, char* argv []) :
program.parse_known_args (argc, argv);
if (this->settings.general.defaultBackground.empty ()) {
throw std::runtime_error ("No default background specified. Either --bg/-b or <background id> must be specified");
}
this->settings.audio.volume = std::max(0, std::min (this->settings.audio.volume, 128));
this->settings.screenshot.delay = std::max (0, std::min (this->settings.screenshot.delay, 5));