19 const std::string& saved_category,
20 const std::vector<std::string>& available_categories) {
21 auto category_available = [&](
const std::string& cat) {
22 if (available_categories.empty()) {
25 for (
const auto& candidate : available_categories) {
26 if (candidate == cat) {
33 if (!saved_category.empty() && category_available(saved_category)) {
34 return saved_category;
37 for (
const auto& cat : available_categories) {
38 if (cat !=
"Emulator") {