Skip to content

Commit

Permalink
display: ensure window sizes are pushed even when not invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Nov 10, 2024
1 parent 790e5cb commit a271d29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion game/system/hid/display_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,15 @@ void DisplayManager::update_resolutions() {
}
lg::info("[DISPLAY]: {}x{} is supported", new_res.width, new_res.height);
m_available_resolutions.push_back(new_res);
m_available_window_sizes.push_back(new_res);
}

// Sort by area
std::sort(m_available_resolutions.begin(), m_available_resolutions.end(),
[](const Resolution& a, const Resolution& b) -> bool {
return a.width * a.height > b.width * b.height;
});
std::sort(m_available_resolutions.begin(), m_available_resolutions.end(),
std::sort(m_available_window_sizes.begin(), m_available_window_sizes.end(),
[](const Resolution& a, const Resolution& b) -> bool {
return a.width * a.height > b.width * b.height;
});
Expand Down

0 comments on commit a271d29

Please sign in to comment.