Use CGRestorePermanentDisplayConfiguration() to implement switching to default
video mode in wxOSX wxDisplay implementation.
Closes #12914.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66843
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Center task dialog-based wxProgressDialog on the parent (John Roberts).
- wxAutomationObject::GetInstance() creates objects on demand (Kolya Kosenko).
- Center task dialog-based wxProgressDialog on the parent (John Roberts).
- wxAutomationObject::GetInstance() creates objects on demand (Kolya Kosenko).
+OSX:
+
+- Implement switching to default video mode in wxDisplay (soren).
there are differences on other platforms. On Unix variations using X11
extensions it should behave as defined, but some irregularities may
occur.
there are differences on other platforms. On Unix variations using X11
extensions it should behave as defined, but some irregularities may
occur.
-
- On wxMac passing in wxDefaultVideoMode as the mode parameter does
- nothing. This happens because carbon no longer has access to
- @c DMUseScreenPrefs(), an undocumented function that changed the video
- mode to the system default by using the system's "scrn" resource.
*/
bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode);
*/
bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode);
bool wxDisplayImplMacOSX::ChangeMode( const wxVideoMode& mode )
{
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,
boolean_t bExactMatch;
CFDictionaryRef theCGMode = CGDisplayBestModeForParametersAndRefreshRate(
m_id,