Skip to content

Commit

Permalink
Merge pull request xbmc#6410 from Memphiz/ios8tvout
Browse files Browse the repository at this point in the history
[ios] - when using the hdmi adapter (or any other hardware tvout adapter...
  • Loading branch information
Memphiz committed Feb 11, 2015
2 parents c121ad3 + 0fdb388 commit fd81a3e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion xbmc/osx/IOSScreenManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,20 @@ - (void) fadeFromBlack:(CGFloat) delaySecs
- (void) setScreen:(unsigned int) screenIdx withMode:(UIScreenMode *)mode
{
UIScreen *newScreen = [[UIScreen screens] objectAtIndex:screenIdx];
bool toExternal = _screenIdx == 0 && _screenIdx != screenIdx;
bool toExternal = false;

// current screen is main screen and new screen
// is different
if (_screenIdx == 0 && _screenIdx != screenIdx)
toExternal = true;

// current screen is not main screen
// and new screen is the same as current
// this means we are external already but
// for example resolution gets changed
// treat this as toExternal for proper rotation...
if (_screenIdx != 0 && _screenIdx == screenIdx)
toExternal = true;

//set new screen mode
[newScreen setCurrentMode:mode];
Expand Down

0 comments on commit fd81a3e

Please sign in to comment.