src/macosx/native/sun/awt/CGraphicsDevice.m

Print this page

        

*** 66,75 **** --- 66,80 ---- CFRelease(modeString); if (thisBpp != bpp || (int)CGDisplayModeGetHeight(cRef) != h || (int)CGDisplayModeGetWidth(cRef) != w) { // One of the key parameters does not match continue; } + + if (refrate == 0) { // REFRESH_RATE_UNKNOWN + return cRef; + } + // Refresh rate might be 0 in display mode and we ask for specific display rate // but if we do not find exact match then 0 refresh rate might be just Ok if (CGDisplayModeGetRefreshRate(cRef) == refrate) { // Exact match return cRef;