[ios] adds CWinSystemIOS::GetCurrentScreen()
authorJonathan Marshall <jmarshall@xbmc.org>
Wed, 19 Feb 2014 23:55:09 +0000 (12:55 +1300)
committerJonathan Marshall <jmarshall@xbmc.org>
Fri, 21 Feb 2014 20:04:46 +0000 (09:04 +1300)
xbmc/windowing/osx/WinSystemIOS.h
xbmc/windowing/osx/WinSystemIOS.mm

index 4c9afd4..0a7ad7f 100644 (file)
@@ -57,6 +57,7 @@ public:
   virtual bool BeginRender();
   virtual bool EndRender();
   virtual int GetNumScreens();    
+  virtual int GetCurrentScreen();
   
           void InitDisplayLink(void);
           void DeinitDisplayLink(void);
index f50b68e..677e464 100644 (file)
@@ -45,6 +45,7 @@
 #else
 #import "ios/XBMCController.h"
 #endif
+#import "osx/IOSScreenManager.h"
 #include "osx/DarwinUtils.h"
 #import <dlfcn.h>
 
@@ -169,6 +170,16 @@ int CWinSystemIOS::GetNumScreens()
   return [[UIScreen screens] count];
 }
 
+int CWinSystemIOS::GetCurrentScreen()
+{
+  int idx = 0;
+  if ([[IOSScreenManager sharedInstance] isExternalScreen])
+  {
+    idx = 1;
+  }
+  return idx;
+}
+
 bool CWinSystemIOS::GetScreenResolution(int* w, int* h, double* fps, int screenIdx)
 {
   // Figure out the screen size. (default to main screen)