Merge pull request #4728 from xav-ie/fix-cava-config

fix-cava-config
This commit is contained in:
Alexis Rouillard 2025-12-28 23:11:05 +01:00 committed by GitHub
commit 46a6f60138
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 6 deletions

View File

@ -13,18 +13,15 @@ AModule* getModule(const std::string& id, const Json::Value& config) {
#ifdef HAVE_LIBCAVA
const std::shared_ptr<CavaBackend> backend_{waybar::modules::cava::CavaBackend::inst(config)};
switch (backend_->getPrm()->output) {
case ::cava::output_method::OUTPUT_RAW:
return new waybar::modules::cava::Cava(id, config);
break;
#ifdef HAVE_LIBCAVAGLSL
case ::cava::output_method::OUTPUT_SDL_GLSL:
return new waybar::modules::cava::CavaGLSL(id, config);
break;
#endif
default:
break;
return new waybar::modules::cava::Cava(id, config);
}
#endif
#else
throw std::runtime_error("Unknown module");
#endif
};
} // namespace waybar::modules::cava