Permalink
Browse files

darwin, fixed. Cocoa_GL_GetCurrentDisplayID returns an ID, not a CGDi…

…splayModeRef
  • Loading branch information...
1 parent 5a586d8 commit 19ec8be8277bed006e54d4a91220d97e00087c26 @davilla davilla committed Nov 1, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 xbmc/osx/CocoaInterface.mm
@@ -50,7 +50,7 @@
CGDirectDisplayID Cocoa_GetDisplayIDFromScreen(NSScreen *screen);
-int Cocoa_GL_GetCurrentDisplayID(void)
+uint32_t Cocoa_GL_GetCurrentDisplayID(void)
{
// Find which display we are on from the current context (default to main display)
CGDirectDisplayID display_id = kCGDirectMainDisplay;
@@ -74,7 +74,7 @@ int Cocoa_GL_GetCurrentDisplayID(void)
}
}
- return((int)display_id);
+ return((uint32_t)display_id);
}
bool Cocoa_CVDisplayLinkCreate(void *displayLinkcallback, void *displayLinkContext)
@@ -151,8 +151,9 @@ void Cocoa_CVDisplayLinkUpdate(void)
}
else
{
+
CGDisplayModeRef display_mode;
- display_mode = (CGDisplayModeRef)Cocoa_GL_GetCurrentDisplayID();
+ display_mode = CGDisplayCopyDisplayMode((CGDirectDisplayID)Cocoa_GL_GetCurrentDisplayID());
fps = CGDisplayModeGetRefreshRate(display_mode);
CGDisplayModeRelease(display_mode);
if (fps <= 0.0)

0 comments on commit 19ec8be

Please sign in to comment.