Здравствуйте. Возникла проблема. Нужно организовать поворот экрана в ландскейп, и обратно в портрет, из exe
Вращаю так:
Вращается некорректно, на экране получется такая кашаCode:RWsSession ws; ws.Connect(); TInt XPixels,YPixels; CWsScreenDevice *screen = new(ELeave) CWsScreenDevice(ws); screen->Construct(); TPixelsTwipsAndRotation rotation; screen->GetScreenModeSizeAndRotation(screen->CurrentScreenMode(),rotation); YPixels = rotation.iPixelSize.iHeight; XPixels = rotation.iPixelSize.iWidth; if(rotation.iRotation == CFbsBitGc::EGraphicsOrientationNormal) { __LOGSTR("Normal"); rotation.iRotation = CFbsBitGc::EGraphicsOrientationRotated90; rotation.iPixelSize.iHeight = XPixels; rotation.iPixelSize.iWidth = YPixels; screen->SetScreenSizeAndRotation(rotation); screen->SetScreenMode(1); }else{ __LOGSTR("Landscape"); rotation.iRotation = CFbsBitGc::EGraphicsOrientationNormal; rotation.iPixelSize.iHeight = XPixels; rotation.iPixelSize.iWidth = YPixels; screen->SetScreenSizeAndRotation(rotation); screen->SetScreenMode(0); } ws.Close();
Что надо ещё сделать, чтобы экран повернулся корректно / что делаю не так?


Reply With Quote


