X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88a7a4e10ed18f81a576dcd866cfbf02bf404c00..98ebf9194b9211a1ddd244083383bd8a4469b7ed:/src/unix/displayx11.cpp diff --git a/src/unix/displayx11.cpp b/src/unix/displayx11.cpp index 53dba8c959..3f04ced7e5 100644 --- a/src/unix/displayx11.cpp +++ b/src/unix/displayx11.cpp @@ -34,10 +34,10 @@ #include "wx/string.h" #include "wx/utils.h" #include "wx/intl.h" + #include "wx/log.h" #endif /* WX_PRECOMP */ #include "wx/display_impl.h" -#include "wx/log.h" /* These must be included after the wx files. Otherwise the Data macro in * Xlibint.h conflicts with a function declaration in wx/list.h. */ @@ -265,7 +265,7 @@ bool wxDisplayImplX11::ChangeMode(const wxVideoMode& mode) #else // !HAVE_X11_EXTENSIONS_XF86VMODE_H -wxArrayVideoModes wxDisplayImplX11::GetModes(const wxVideoMode& mode) const +wxArrayVideoModes wxDisplayImplX11::GetModes(const wxVideoMode& modeMatch) const { int count_return; int* depths = XListDepths((Display*)wxGetDisplay(), 0, &count_return); @@ -274,7 +274,11 @@ wxArrayVideoModes wxDisplayImplX11::GetModes(const wxVideoMode& mode) const { for ( int x = 0; x < count_return; ++x ) { - modes.Add(wxVideoMode(m_rect.GetWidth(), m_rect.GetHeight(), depths[x])); + wxVideoMode mode(m_rect.GetWidth(), m_rect.GetHeight(), depths[x]); + if ( mode.Matches(modeMatch) ) + { + modes.Add(modeMatch); + } } XFree(depths); @@ -288,7 +292,7 @@ wxVideoMode wxDisplayImplX11::GetCurrentMode() const return wxVideoMode(); } -bool wxDisplayImplX11::ChangeMode(const wxVideoMode& mode) +bool wxDisplayImplX11::ChangeMode(const wxVideoMode& WXUNUSED(mode)) { // Not implemented return false;