aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/windowing/osx/WinSystemIOS.h1
-rw-r--r--xbmc/windowing/osx/WinSystemIOS.mm11
2 files changed, 12 insertions, 0 deletions
diff --git a/xbmc/windowing/osx/WinSystemIOS.h b/xbmc/windowing/osx/WinSystemIOS.h
index 4c9afd447a..0a7ad7f310 100644
--- a/xbmc/windowing/osx/WinSystemIOS.h
+++ b/xbmc/windowing/osx/WinSystemIOS.h
@@ -57,6 +57,7 @@ public:
virtual bool BeginRender();
virtual bool EndRender();
virtual int GetNumScreens();
+ virtual int GetCurrentScreen();
void InitDisplayLink(void);
void DeinitDisplayLink(void);
diff --git a/xbmc/windowing/osx/WinSystemIOS.mm b/xbmc/windowing/osx/WinSystemIOS.mm
index f50b68e6f9..677e46402e 100644
--- a/xbmc/windowing/osx/WinSystemIOS.mm
+++ b/xbmc/windowing/osx/WinSystemIOS.mm
@@ -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)