X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d20c3f418164bab70aa71e395677df9e3b0c259b..c5fe22f8f43dfb5cca0c09f639a8eafe314ae809:/src/msw/display.cpp

diff --git a/src/msw/display.cpp b/src/msw/display.cpp
index 5dd3994788..56845df6e8 100644
--- a/src/msw/display.cpp
+++ b/src/msw/display.cpp
@@ -56,6 +56,10 @@
     #pragma warning(disable:4706)
 #endif
 
+// with mingw32, we must include windows.h first and it doesn't hurt with other
+// compilers
+#include <windows.h>
+
 #include <multimon.h>
 
 #ifdef _MSC_VER
@@ -378,10 +382,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();
 }