aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2011-07-01 23:47:37 +0200
committerMemphiz <memphis@machzwo.de>2011-07-01 23:47:37 +0200
commit2aea49b8e0aa4db649818353d0f1756854b0a487 (patch)
tree5e72d693796e9a4b99f9b085fed06d4ec5ddba4a
parentb6a55cf17c13f82f5e27517c82d0570111dc4556 (diff)
[add] - HasCursor method to WinSystemBase - defaulting to true
- overwrite this for ios to false if not appletv2 - use HasCursor in GUIWindowPointer::UpdateVisibility
-rw-r--r--xbmc/windowing/WinSystem.h1
-rw-r--r--xbmc/windowing/osx/WinSystemIOS.h1
-rw-r--r--xbmc/windowing/osx/WinSystemIOS.mm13
-rw-r--r--xbmc/windows/GUIWindowPointer.cpp15
4 files changed, 23 insertions, 7 deletions
diff --git a/xbmc/windowing/WinSystem.h b/xbmc/windowing/WinSystem.h
index 5029560054..c7be3bab13 100644
--- a/xbmc/windowing/WinSystem.h
+++ b/xbmc/windowing/WinSystem.h
@@ -70,6 +70,7 @@ public:
virtual void NotifyAppFocusChange(bool bGaining) {}
virtual void NotifyAppActiveChange(bool bActivated) {}
virtual void ShowOSMouse(bool show) {};
+ virtual bool HasCursor(){ return true; }
virtual bool Minimize() { return false; }
virtual bool Restore() { return false; }
diff --git a/xbmc/windowing/osx/WinSystemIOS.h b/xbmc/windowing/osx/WinSystemIOS.h
index 5c0ce54af8..c7dd6f25b3 100644
--- a/xbmc/windowing/osx/WinSystemIOS.h
+++ b/xbmc/windowing/osx/WinSystemIOS.h
@@ -44,6 +44,7 @@ public:
virtual void UpdateResolutions();
virtual void ShowOSMouse(bool show);
+ virtual bool HasCursor();
virtual void NotifyAppActiveChange(bool bActivated);
diff --git a/xbmc/windowing/osx/WinSystemIOS.mm b/xbmc/windowing/osx/WinSystemIOS.mm
index ca0889ee25..6e0418f75e 100644
--- a/xbmc/windowing/osx/WinSystemIOS.mm
+++ b/xbmc/windowing/osx/WinSystemIOS.mm
@@ -40,6 +40,7 @@
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import "XBMCController.h"
+#include "utils/SystemInfo.h"
#import <dlfcn.h>
CWinSystemIOS::CWinSystemIOS() : CWinSystemBase()
@@ -200,6 +201,18 @@ void CWinSystemIOS::ShowOSMouse(bool show)
{
}
+bool CWinSystemIOS::HasCursor()
+{
+ if( g_sysinfo.IsAppleTV2() )
+ {
+ return true;
+ }
+ else//apple touch devices
+ {
+ return false;
+ }
+}
+
void CWinSystemIOS::NotifyAppActiveChange(bool bActivated)
{
if (bActivated && m_bWasFullScreenBeforeMinimize && !g_graphicsContext.IsFullScreenRoot())
diff --git a/xbmc/windows/GUIWindowPointer.cpp b/xbmc/windows/GUIWindowPointer.cpp
index dcbe003fbe..6a8030e773 100644
--- a/xbmc/windows/GUIWindowPointer.cpp
+++ b/xbmc/windows/GUIWindowPointer.cpp
@@ -21,6 +21,7 @@
#include "GUIWindowPointer.h"
#include "input/MouseStat.h"
+#include "windowing/WindowingFactory.h"
#include <climits>
#define ID_POINTER 10
@@ -56,13 +57,13 @@ void CGUIWindowPointer::SetPointer(int pointer)
void CGUIWindowPointer::UpdateVisibility()
{
-//no mouse pointer for ios devices (they are all touchy)
-#ifndef TARGET_DARWIN_IOS
- if (g_Mouse.IsActive())
- Show();
- else
- Close();
-#endif//TARGET_DARWIN_IOS
+ if(g_Windowing.HasCursor())
+ {
+ if (g_Mouse.IsActive())
+ Show();
+ else
+ Close();
+ }
}
void CGUIWindowPointer::OnWindowLoaded()