From 2685bbd05bf3aa9c7801eb2eca56cff8f78f699c Mon Sep 17 00:00:00 2001 From: Bernard Niset Date: Mon, 20 Aug 2018 21:03:56 +0200 Subject: [PATCH] Added options to all_display_modes --- core-graphics/src/display.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core-graphics/src/display.rs b/core-graphics/src/display.rs index 71caea5..202a336 100644 --- a/core-graphics/src/display.rs +++ b/core-graphics/src/display.rs @@ -412,9 +412,9 @@ impl CGDisplay { } impl CGDisplayMode { - pub fn all_display_modes(display_id: CGDirectDisplayID) -> Option> { + pub fn all_display_modes(display_id: CGDirectDisplayID, options: CFDictionaryRef) -> Option> { let array_opt: Option = unsafe { - let array_ref = CGDisplayCopyAllDisplayModes(display_id, ptr::null()); + let array_ref = CGDisplayCopyAllDisplayModes(display_id, options); if array_ref != ptr::null() { Some(CFArray::wrap_under_create_rule(array_ref)) } else { @@ -497,6 +497,8 @@ extern "C" { pub static CGRectNull: CGRect; pub static CGRectInfinite: CGRect; + pub static kCGDisplayShowDuplicateLowResolutionModes: CFStringRef; + pub fn CGDisplayModeRelease(mode: ::sys::CGDisplayModeRef); pub fn CGMainDisplayID() -> CGDirectDisplayID;