// Author: Ryan Norton
// Modified by:
// Created: 2004-10-03
-// RCS-ID: $Id$
// Copyright: (c) Ryan Norton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
unsigned wxDisplayFactoryMacOSX::GetCount()
{
CGDisplayCount count;
-#ifdef __WXDEBUG__
- CGDisplayErr err =
-#endif
- CGGetActiveDisplayList(0, NULL, &count);
-
- wxASSERT(err == CGDisplayNoErr);
+ CGDisplayErr err = CGGetActiveDisplayList(0, NULL, &count);
+ wxCHECK_MSG( err != CGDisplayNoErr, 0, "CGGetActiveDisplayList() failed" );
return count;
}
CGDisplayCount theCount = GetCount();
CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount];
-#ifdef __WXDEBUG__
- CGDisplayErr err =
-#endif
- CGGetActiveDisplayList(theCount, theIDs, &theCount);
+ CGDisplayErr err = CGGetActiveDisplayList(theCount, theIDs, &theCount);
+ wxCHECK_MSG( err != CGDisplayNoErr, NULL, "CGGetActiveDisplayList() failed" );
- wxASSERT( err == CGDisplayNoErr );
wxASSERT( n < theCount );
wxDisplayImplMacOSX *display = new wxDisplayImplMacOSX(n, theIDs[n]);