mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 23:52:20 +01:00
[d3d9] Order modes descending by refresh rate
This commit is contained in:
parent
6e43bf6d61
commit
f74b2cd6c6
@ -817,8 +817,9 @@ namespace dxvk {
|
|||||||
m_modes.push_back(mode);
|
m_modes.push_back(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort display modes by width, height and refresh rate,
|
// Sort display modes by width, height and refresh rate (descending), in that order.
|
||||||
// in that order. Some games rely on correct ordering.
|
// Some games rely on correct ordering, e.g. Prince of Persia (2008) expects the highest
|
||||||
|
// refresh rate to be listed first for a particular resolution.
|
||||||
std::sort(m_modes.begin(), m_modes.end(),
|
std::sort(m_modes.begin(), m_modes.end(),
|
||||||
[](const D3DDISPLAYMODEEX& a, const D3DDISPLAYMODEEX& b) {
|
[](const D3DDISPLAYMODEEX& a, const D3DDISPLAYMODEEX& b) {
|
||||||
if (a.Width < b.Width) return true;
|
if (a.Width < b.Width) return true;
|
||||||
@ -827,7 +828,7 @@ namespace dxvk {
|
|||||||
if (a.Height < b.Height) return true;
|
if (a.Height < b.Height) return true;
|
||||||
if (a.Height > b.Height) return false;
|
if (a.Height > b.Height) return false;
|
||||||
|
|
||||||
return a.RefreshRate < b.RefreshRate;
|
return b.RefreshRate < a.RefreshRate;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user