Support headless mode

This commit is contained in:
Yukino Song
2024-08-21 23:39:41 +08:00
parent c071e4ae12
commit 8db50446a7
10 changed files with 104 additions and 86 deletions

View File

@@ -280,7 +280,8 @@ main(int argc, char *argv[]) {
BOOST_LOG(warning) << "No gamepad input is available"sv;
}
if (video::probe_encoders()) {
// Do not probe encoders on startup if headless mode is enabled
if (!config::video.headless_mode && video::probe_encoders()) {
BOOST_LOG(error) << "Video failed to find working encoder"sv;
}