aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGL.cpp16
-rw-r--r--xbmc/osx/DarwinUtils.h1
-rw-r--r--xbmc/osx/DarwinUtils.mm17
-rw-r--r--xbmc/windowing/osx/WinSystemOSX.mm26
4 files changed, 39 insertions, 21 deletions
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
index 1cf52d3d4a..fff9e9fe09 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
@@ -68,6 +68,9 @@
#include "osx/CocoaInterface.h"
#include <CoreVideo/CoreVideo.h>
#include <OpenGL/CGLIOSurface.h>
+ #ifdef TARGET_DARWIN_OSX
+ #include "osx/DarwinUtils.h"
+ #endif
#endif
#ifdef HAS_GLX
@@ -313,6 +316,19 @@ bool CLinuxRendererGL::Configure(unsigned int width, unsigned int height, unsign
m_pboSupported = glewIsSupported("GL_ARB_pixel_buffer_object") && g_guiSettings.GetBool("videoplayer.usepbo");
+#ifdef TARGET_DARWIN_OSX
+ // on osx 10.9 mavericks we get a strange ripple
+ // effect when rendering with pbo
+ // when used on intel gpu - we have to quirk it here
+ if (DarwinIsMavericks())
+ {
+ CStdString rendervendor = g_Windowing.GetRenderVendor();
+ rendervendor.MakeLower();
+ if (rendervendor.find("intel") != std::string::npos)
+ m_pboSupported = false;
+ }
+#endif
+
return true;
}
diff --git a/xbmc/osx/DarwinUtils.h b/xbmc/osx/DarwinUtils.h
index 8f325a54e1..367ac4da58 100644
--- a/xbmc/osx/DarwinUtils.h
+++ b/xbmc/osx/DarwinUtils.h
@@ -32,6 +32,7 @@ extern "C"
{
#endif
bool DarwinIsAppleTV2(void);
+ bool DarwinIsMavericks(void);
bool DarwinHasRetina(void);
const char *GetDarwinOSReleaseString(void);
const char *GetDarwinVersionString(void);
diff --git a/xbmc/osx/DarwinUtils.mm b/xbmc/osx/DarwinUtils.mm
index 5aff49e057..d8646a16e3 100644
--- a/xbmc/osx/DarwinUtils.mm
+++ b/xbmc/osx/DarwinUtils.mm
@@ -135,6 +135,23 @@ bool DarwinIsAppleTV2(void)
return (platform == AppleTV2);
}
+bool DarwinIsMavericks(void)
+{
+ static int isMavericks = -1;
+#if defined(TARGET_DARWIN_OSX)
+ // there is no NSAppKitVersionNumber10_9 out there anywhere
+ // so we detect mavericks by one of these newly added app nap
+ // methods - and fix the ugly mouse rect problem which was hitting
+ // us when mavericks came out
+ if (isMavericks == -1)
+ {
+ CLog::Log(LOGDEBUG, "Detected Mavericks...");
+ isMavericks = [NSProcessInfo instancesRespondToSelector:@selector(beginActivityWithOptions:reason:)] == TRUE ? 1 : 0;
+ }
+#endif
+ return isMavericks == 1;
+}
+
bool DarwinHasRetina(void)
{
static enum iosPlatform platform = iDeviceUnknown;
diff --git a/xbmc/windowing/osx/WinSystemOSX.mm b/xbmc/windowing/osx/WinSystemOSX.mm
index e305942fa8..380e50ab5a 100644
--- a/xbmc/windowing/osx/WinSystemOSX.mm
+++ b/xbmc/windowing/osx/WinSystemOSX.mm
@@ -662,28 +662,12 @@ bool CWinSystemOSX::DestroyWindow()
return true;
}
-bool isMavericks()
-{
- static int isMavericks = -1;
-
- // there is no NSAppKitVersionNumber10_9 out there anywhere
- // so we detect mavericks by one of these newly added app nap
- // methods - and fix the ugly mouse rect problem which was hitting
- // us when mavericks came out
- if (isMavericks == -1)
- {
- CLog::Log(LOGDEBUG, "Detected Mavericks - enable windowing fixups.");
- isMavericks = [NSProcessInfo instancesRespondToSelector:@selector(beginActivityWithOptions:reason:)] == TRUE ? 1 : 0;
- }
- return isMavericks == 1;
-}
-
extern "C" void SDL_SetWidthHeight(int w, int h);
bool CWinSystemOSX::ResizeWindowInternal(int newWidth, int newHeight, int newLeft, int newTop, void *additional)
{
bool ret = ResizeWindow(newWidth, newHeight, newLeft, newTop);
- if( isMavericks() )
+ if( DarwinIsMavericks() )
{
NSView * last_view = (NSView *)additional;
if (last_view && [last_view window])
@@ -857,7 +841,7 @@ bool CWinSystemOSX::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl
[newContext setView:blankView];
// Hide the menu bar.
- if (GetDisplayID(res.iScreen) == kCGDirectMainDisplay || isMavericks() )
+ if (GetDisplayID(res.iScreen) == kCGDirectMainDisplay || DarwinIsMavericks() )
SetMenuBarVisible(false);
// Blank other displays if requested.
@@ -891,7 +875,7 @@ bool CWinSystemOSX::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl
CGDisplayCapture(GetDisplayID(res.iScreen));
// If we don't hide menu bar, it will get events and interrupt the program.
- if (GetDisplayID(res.iScreen) == kCGDirectMainDisplay || isMavericks() )
+ if (GetDisplayID(res.iScreen) == kCGDirectMainDisplay || DarwinIsMavericks() )
SetMenuBarVisible(false);
}
@@ -919,7 +903,7 @@ bool CWinSystemOSX::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl
[NSCursor unhide];
// Show menubar.
- if (GetDisplayID(res.iScreen) == kCGDirectMainDisplay || isMavericks() )
+ if (GetDisplayID(res.iScreen) == kCGDirectMainDisplay || DarwinIsMavericks() )
SetMenuBarVisible(true);
if (g_guiSettings.GetBool("videoscreen.fakefullscreen"))
@@ -1455,7 +1439,7 @@ void CWinSystemOSX::NotifyAppFocusChange(bool bGaining)
// find the screenID
NSDictionary* screenInfo = [[window screen] deviceDescription];
NSNumber* screenID = [screenInfo objectForKey:@"NSScreenNumber"];
- if ((CGDirectDisplayID)[screenID longValue] == kCGDirectMainDisplay || isMavericks() )
+ if ((CGDirectDisplayID)[screenID longValue] == kCGDirectMainDisplay || DarwinIsMavericks() )
{
SetMenuBarVisible(false);
}