BugFix#: 23117 Remove filter_lobby check from game_matches_filter function and check before calling game_matches_filter.

Only apply filters when the apply_filter checkbox is selected, else
display all games.
This commit is contained in:
Randypk 2015-03-26 20:15:11 -06:00 committed by Ignacio R. Morelle
parent e3970e8cb4
commit 300a814032
3 changed files with 7 additions and 3 deletions

View file

@ -11,6 +11,8 @@ Version 1.12.5+dev:
and/or shroud, and probably a lot of other occurrences that are now
covered by a proper fix on top of the quick hacks shipped with versions
1.11.16 and 1.12.3.
* Fixed MP lobby games list coming up empty when Invert is checked while
Apply Filter is not (bug #23117).
* Miscellaneous and bug fixes:
* Revert all updates to hot-key handling which broke letter-based short-cuts
on non-US keyboard layouts, where characters are in different key

View file

@ -13,6 +13,8 @@ Version 1.12.5+dev:
and/or shroud, and probably a lot of other occurrences that are now
covered by a proper fix on top of the quick hacks shipped with versions
1.11.16 and 1.12.3.
* Fixed MP lobby games list coming up empty when Invert is checked while
Apply Filter is not (bug #23117).
Version 1.12.5:

View file

@ -706,7 +706,9 @@ void gamebrowser::set_game_items(const config& cfg, const config& game_config)
games_.back().verified = verified;
// Hack...
if(preferences::fi_invert() ? game_matches_filter(games_.back(), cfg) : !game_matches_filter(games_.back(), cfg)) games_.pop_back();
if(preferences::filter_lobby()) {
if(preferences::fi_invert() ? game_matches_filter(games_.back(), cfg) : !game_matches_filter(games_.back(), cfg)) games_.pop_back();
}
}
set_full_size(games_.size());
set_shown_size(inner_location().h / row_height());
@ -751,8 +753,6 @@ void gamebrowser::select_game(const std::string& id) {
bool gamebrowser::game_matches_filter(const game_item& i, const config& cfg) {
if(!preferences::filter_lobby()) return true;
if(preferences::fi_vacant_slots() && i.vacant_slots == 0) return false;
if(preferences::fi_friends_in_game()) {