viewer: fixed manual screen rotation to follow sensor

This commit is contained in:
Thibault Deckers 2021-07-13 10:59:04 +09:00
parent 1f7e70697e
commit bcbb7d5994

View file

@ -41,12 +41,12 @@ class PlatformWindowService implements WindowService {
late final int orientationCode;
switch (orientation) {
case Orientation.landscape:
// SCREEN_ORIENTATION_USER_LANDSCAPE
orientationCode = 11;
// SCREEN_ORIENTATION_SENSOR_LANDSCAPE
orientationCode = 6;
break;
case Orientation.portrait:
// SCREEN_ORIENTATION_USER_PORTRAIT
orientationCode = 12;
// SCREEN_ORIENTATION_SENSOR_PORTRAIT
orientationCode = 7;
break;
default:
// SCREEN_ORIENTATION_UNSPECIFIED