diff options
author | 2019-01-19 19:37:12 +1100 | |
---|---|---|
committer | 2019-01-19 19:37:12 +1100 | |
commit | e147e5ae97f4f3925bbc45453d5bad079fb9fc87 (patch) | |
tree | 618b485863a52d4eca32baafa2e135cd32aaf257 /src/emu/softlist_dev.cpp | |
parent | 4bea46bec7553159f4fb49ed3986ec45d8caa848 (diff) |
restore functionality of the "Add to Favorites" item on the main in-emulation menu
Diffstat (limited to 'src/emu/softlist_dev.cpp')
-rw-r--r-- | src/emu/softlist_dev.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/emu/softlist_dev.cpp b/src/emu/softlist_dev.cpp index e1539523dcb..b96fd63b3fa 100644 --- a/src/emu/softlist_dev.cpp +++ b/src/emu/softlist_dev.cpp @@ -255,18 +255,16 @@ const software_info *software_list_device::find(const std::string &look_for) // find a match (will cause a parse if needed when calling get_info) const auto &info_list = get_info(); auto iter = std::find_if( - info_list.begin(), - info_list.end(), - [&](const software_info &info) - { - const char *shortname = info.shortname().c_str(); - return (iswild && core_strwildcmp(look_for.c_str(), shortname) == 0) - || core_stricmp(look_for.c_str(), shortname) == 0; - }); - - return iter != info_list.end() - ? &*iter - : nullptr; + info_list.begin(), + info_list.end(), + [&look_for, iswild] (const software_info &info) + { + const char *shortname = info.shortname().c_str(); + return (iswild && core_strwildcmp(look_for.c_str(), shortname) == 0) + || core_stricmp(look_for.c_str(), shortname) == 0; + }); + + return iter != info_list.end() ? &*iter : nullptr; } |