// Author: Ryan Norton & Brian Victor
// Modified by: Royce Mitchell III, Vadim Zeitlin
// Created: 06/21/02
-// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
{
CGDisplayErr error = kCGErrorSuccess;
CGDisplayCount onlineCount;
-
+
error = CGGetOnlineDisplayList(0,NULL,&onlineCount);
if ( error == kCGErrorSuccess )
{
{
if ( CGDisplayMirrorsDisplay(onlineDisplays[i]) != kCGNullDirectDisplay )
continue;
-
+
if ( displays == NULL )
*displayCount += 1;
else
}
delete[] onlineDisplays;
}
-
+
}
return error;
}
bool wxDisplayImplMacOSX::ChangeMode( const wxVideoMode& mode )
{
- // Changing to default mode (wxDefaultVideoMode) doesn't
- // work because we don't have access to the system's 'scrn'
- // resource which holds the user's mode which the system
- // will return to after this app is done
+#ifndef __WXOSX_IPHONE__
+ if (mode == wxDefaultVideoMode)
+ {
+ CGRestorePermanentDisplayConfiguration();
+ return true;
+ }
+#endif
+
boolean_t bExactMatch;
CFDictionaryRef theCGMode = CGDisplayBestModeForParametersAndRefreshRate(
m_id,