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