diff options
author | Jonathan Marshall <jmarshall@xbmc.org> | 2014-02-20 12:55:09 +1300 |
---|---|---|
committer | Jonathan Marshall <jmarshall@xbmc.org> | 2014-02-22 09:04:46 +1300 |
commit | f87731bef8ad5ae48cc3a90f1f3a02b601a150e4 (patch) | |
tree | cd04dc3da76285c954a75e0a7394014561859965 | |
parent | 4298c43dc3a6d80cc60a55172c68f10544b479cb (diff) |
[ios] adds CWinSystemIOS::GetCurrentScreen()
-rw-r--r-- | xbmc/windowing/osx/WinSystemIOS.h | 1 | ||||
-rw-r--r-- | xbmc/windowing/osx/WinSystemIOS.mm | 11 |
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) |