X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce00f59b5b169752d2f05ce3bb1a88ddc1b38b4c..39ab701469f1568bd030eb0d681864545863d83d:/src/osx/core/display.cpp diff --git a/src/osx/core/display.cpp b/src/osx/core/display.cpp index 38ca6cba0c..998eff23f7 100644 --- a/src/osx/core/display.cpp +++ b/src/osx/core/display.cpp @@ -267,10 +267,14 @@ wxVideoMode wxDisplayImplMacOSX::GetCurrentMode() const 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,