Simplify mode matching test, and add actual mode (not function parameter) to modes list, in GetModes()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2013-11-15 17:28:42 +00:00
parent 3e8b0d8144
commit 70bb02115f

View File

@@ -252,8 +252,7 @@ wxArrayVideoModes wxDisplayImplX11::GetModes(const wxVideoMode& mode) const
{
XF86VidModeModeInfo& info = *ppXModes[i];
const wxVideoMode vm = wxCVM(info, display, nScreen);
if (mode == wxDefaultVideoMode || //According to display.h All modes valid if dafault mode...
mode.Matches(vm)) //...?
if (vm.Matches(mode))
{
Modes.Add(vm);
}
@@ -341,7 +340,7 @@ wxArrayVideoModes wxDisplayImplX11::GetModes(const wxVideoMode& modeMatch) const
wxVideoMode mode(m_rect.GetWidth(), m_rect.GetHeight(), depths[x]);
if ( mode.Matches(modeMatch) )
{
modes.Add(modeMatch);
modes.Add(mode);
}
}