- wxASSERT(err == noErr);
-
- // For the really paranoid -
- // unsigned long flags;
- // Boolean bok;
- // wxASSERT(noErr == DMCheckDisplayMode(m_priv->m_hndl, sMode.csData,
- // sMode.csMode, &flags, NULL, &bok));
- // wxASSERT(bok);
-
- Handle hDisplayState;
- if (DMBeginConfigureDisplays(&hDisplayState) != noErr)
- {
- wxLogSysError(wxT("Could not lock display for display mode changing!"));
- return false;
- }
-
- unsigned long dwBPP = (unsigned long) mode.bpp;
- if (DMSetDisplayMode(m_priv->m_hndl, sMode.csData,
- (unsigned long*) &(dwBPP), NULL
- //(unsigned long) &sMode
- , hDisplayState
- ) != noErr)
- {
- DMEndConfigureDisplays(hDisplayState);
- wxMessageBox(wxString::Format(wxT("Could not set the display mode")));
+ verify_noerr( err );
+
+ // For the really paranoid -
+ // unsigned long flags;
+ // Boolean bok;
+ // wxASSERT(noErr == DMCheckDisplayMode(m_hndl, sMode.csData,
+ // sMode.csMode, &flags, NULL, &bok));
+ // wxASSERT(bok);
+
+ Handle hDisplayState;
+ if (DMBeginConfigureDisplays(&hDisplayState) != noErr)
+ {
+ wxLogSysError(wxT("Could not lock display for display mode changing!"));
+
+ return false;
+ }
+
+ unsigned long dwBPP = (unsigned long) mode.bpp;
+ err = DMSetDisplayMode(
+ m_hndl, sMode.csData,
+ (unsigned long*) &(dwBPP),
+ NULL, //(unsigned long) &sMode
+ hDisplayState );
+
+ if (err != noErr)
+ {
+ DMEndConfigureDisplays(hDisplayState);
+ wxLogError(wxT("Could not set the display mode"));
+