Skip to content

Commit

Permalink
[ios] more fixes to apple tv orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
ar2rsawseen committed Oct 13, 2015
1 parent f5d0018 commit 2e850fe
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions ios/iosplayer/iosplayer/giderosapi.mm
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,8 @@ void printToServer(const char *str, int len)
deviceOrientation_ = ePortrait;

#ifdef TARGET_OS_TV
if (width_>height_){
hardwareOrientation_ = eLandscapeLeft;
deviceOrientation_ = eLandscapeLeft;
}
else {
hardwareOrientation_ = ePortrait;
deviceOrientation_ = ePortrait;
}
hardwareOrientation_ = eLandscapeLeft;
deviceOrientation_ = eLandscapeLeft;
#endif

running_ = false;
Expand Down Expand Up @@ -1438,19 +1432,6 @@ void printToServer(const char *str, int len)
void ApplicationManager::willRotateToInterfaceOrientationHelperTV(Orientation deviceOrientation_)
{
application_->getApplication()->setDeviceOrientation(deviceOrientation_);



Orientation orientation = application_->orientation();

bool b1 = orientation == ePortrait || orientation == ePortraitUpsideDown;
bool b2 = deviceOrientation_ == ePortrait || deviceOrientation_ == ePortraitUpsideDown;

if (b1 != b2)
hardwareOrientation_ = deviceOrientation_;
else
hardwareOrientation_ = orientation;

application_->setHardwareOrientation(hardwareOrientation_);

}
Expand Down

0 comments on commit 2e850fe

Please sign in to comment.