diff --git a/clientscr/Mac_Saver_ModuleView.m b/clientscr/Mac_Saver_ModuleView.m index 55c21abde3..7546baab18 100644 --- a/clientscr/Mac_Saver_ModuleView.m +++ b/clientscr/Mac_Saver_ModuleView.m @@ -53,6 +53,7 @@ int gBlankingTime; // Delay in minutes before blanking the screen NSString *gPathToBundleResources = NULL; NSString *mBundleID = NULL; // our bundle ID NSImage *gBOINC_Logo = NULL; +NSImage *gPreview_Image = NULL; int gTopWindowListIndex = -1; @@ -253,12 +254,16 @@ int signof(float x) { if ([ self isPreview ]) { #if 1 // Currently drawRect just draws our logo in the preview window - NSString *fileName = [[ NSBundle bundleForClass:[ self class ]] pathForImageResource:@"boinc" ]; - if (fileName) { - NSImage *myImage = [[ NSImage alloc ] initWithContentsOfFile:fileName ]; - [ myImage setScalesWhenResized:YES ]; - [ myImage setSize:theFrame.size ]; - [ myImage drawAtPoint:NSZeroPoint fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 ]; + if (gPreview_Image == NULL) { + NSString *fileName = [[ NSBundle bundleForClass:[ self class ]] pathForImageResource:@"boinc" ]; + if (fileName) { + gPreview_Image = [[ NSImage alloc ] initWithContentsOfFile:fileName ]; + } + } + if (gPreview_Image) { + [ gPreview_Image setScalesWhenResized:YES ]; + [ gPreview_Image setSize:theFrame.size ]; + [ gPreview_Image drawAtPoint:NSZeroPoint fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 ]; } [ self setAnimationTimeInterval:1/1.0 ]; #else // Code for possible future use if we want to draw more in preview diff --git a/mac_build/boinc.xcodeproj/project.pbxproj b/mac_build/boinc.xcodeproj/project.pbxproj index 4dca697854..9a5ebbbbdf 100755 --- a/mac_build/boinc.xcodeproj/project.pbxproj +++ b/mac_build/boinc.xcodeproj/project.pbxproj @@ -3863,8 +3863,8 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_ARC = YES; - GCC_ENABLE_OBJC_GC = unsupported; + CLANG_ENABLE_OBJC_ARC = NO; + GCC_ENABLE_OBJC_GC = supported; HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = "ScreenSaver-Info.plist"; OTHER_LDFLAGS = ( @@ -4035,8 +4035,8 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_ARC = YES; - GCC_ENABLE_OBJC_GC = unsupported; + CLANG_ENABLE_OBJC_ARC = NO; + GCC_ENABLE_OBJC_GC = supported; HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = "ScreenSaver-Info.plist"; OTHER_LDFLAGS = (