Navigation Menu

Skip to content

Commit

Permalink
darwin, fixed. Cocoa_GL_GetCurrentDisplayID returns an ID, not a CGDi…
Browse files Browse the repository at this point in the history
…splayModeRef
  • Loading branch information
davilla committed Nov 1, 2013
1 parent 5a586d8 commit 19ec8be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xbmc/osx/CocoaInterface.mm
Expand Up @@ -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;
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 19ec8be

Please sign in to comment.