Skip to content

Commit

Permalink
Remove duplicate video modes (#1221)
Browse files Browse the repository at this point in the history
 (Fixes #1219)
  • Loading branch information
crschardt authored Feb 5, 2024
1 parent bc55218 commit 45a39f6
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ public HashMap<Integer, VideoMode> getAllVideoModes() {
// Sort by resolution
var sortedList =
videoModesList.stream()
.distinct() // remove redundant video mode entries
.sorted(((a, b) -> (b.width + b.height) - (a.width + a.height)))
.collect(Collectors.toList());
Collections.reverse(sortedList);
Expand Down

0 comments on commit 45a39f6

Please sign in to comment.