X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/24d2b4f5ba8ceffe55e7520a233ba6b3046aa27e..2fb18bf45bcf391a8eb973886072dc67893e9bbe:/src/msw/display.cpp?ds=inline diff --git a/src/msw/display.cpp b/src/msw/display.cpp index 2933da9ef7..c0e4b95986 100644 --- a/src/msw/display.cpp +++ b/src/msw/display.cpp @@ -1,8 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// // Name: display.cpp // Purpose: MSW Implementation of wxDisplay class -// Author: Royce Mitchell III, Ryan Norton +// Author: Royce Mitchell III // Modified by: VZ (resolutions enumeration/change support, DirectDraw, ...) +// Ryan Norton (IsPrimary override) // Created: 06/21/02 // RCS-ID: $Id$ // Copyright: (c) wxWidgets team @@ -17,10 +18,6 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "display.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -55,6 +52,10 @@ #pragma warning(disable:4706) #endif +// with mingw32, we must include windows.h first and it doesn't hurt with other +// compilers +#include + #include #ifdef _MSC_VER @@ -377,10 +378,12 @@ size_t wxDisplayBase::GetCount() { InitDisplays(); - // I'm not sure if they really always return the same thing and if this is - // not true I'd like to know in which situation does it happen - wxASSERT_MSG( gs_displays->GetCount() == (size_t)::GetSystemMetrics(SM_CMONITORS), - _T("So how many displays does this system have?") ); + //RN: FIXME: This is wrong - the display info array should reload after every call + //to GetCount() - otherwise it will not be accurate. + //The user can change the number of displays in display properties/settings + //after GetCount or similar is called and really mess this up... + //wxASSERT_MSG( gs_displays->GetCount() == (size_t)::GetSystemMetrics(SM_CMONITORS), + // _T("So how many displays does this system have?") ); return gs_displays->GetCount(); }