Minor improvements in gamma bias error handling

This commit is contained in:
Jens Hemprich 2006-08-25 21:59:23 +00:00
parent d32852ae89
commit 717a5bd03c
1 changed files with 8 additions and 4 deletions

View File

@ -395,14 +395,15 @@ OSErr DisplayManager_RememberPassthroughDisplay()
PassthroughDisplay.HorizontalPixels, PassthroughDisplay.VerticalLines, PassthroughDisplay.HorizontalPixels, PassthroughDisplay.VerticalLines,
PassthroughDisplay.ColorDepth, PassthroughDisplay.RefreshRate); PassthroughDisplay.ColorDepth, PassthroughDisplay.RefreshRate);
#endif #endif
if (DisplayManager_RememberGamma(PassthroughDisplay) == noErr) err = DisplayManager_RememberGamma(PassthroughDisplay) ;
if (err == noErr)
{ {
PassthroughDisplay.GammaValid = true; PassthroughDisplay.GammaValid = true;
} }
// Remember menubar status // Remember menubar status
RestoreMenuBar = IsMenuBarVisible(); RestoreMenuBar = IsMenuBarVisible();
} }
else if (err != noErr)
{ {
GlideMsg("Display Manager: Error while remembering passthrough display mode: %d\n", err); GlideMsg("Display Manager: Error while remembering passthrough display mode: %d\n", err);
} }
@ -529,9 +530,12 @@ OSErr DisplayManager_RestorePassthroughDisplay()
if (err == noErr) if (err == noErr)
{ {
if (RestoreMenuBar) ShowMenuBar(); if (RestoreMenuBar) ShowMenuBar();
if (PassthroughDisplay.GammaValid == true) DisplayManager_RestoreGamma(PassthroughDisplay); if (PassthroughDisplay.GammaValid == true)
{
err = DisplayManager_RestoreGamma(PassthroughDisplay);
}
} }
else if (err != noErr)
{ {
GlideMsg("Display Manager: Error while restoring passthrough display mode: %d\n", err); GlideMsg("Display Manager: Error while restoring passthrough display mode: %d\n", err);
} }