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; late final int orientationCode;
switch (orientation) { switch (orientation) {
case Orientation.landscape: case Orientation.landscape:
// SCREEN_ORIENTATION_USER_LANDSCAPE // SCREEN_ORIENTATION_SENSOR_LANDSCAPE
orientationCode = 11; orientationCode = 6;
break; break;
case Orientation.portrait: case Orientation.portrait:
// SCREEN_ORIENTATION_USER_PORTRAIT // SCREEN_ORIENTATION_SENSOR_PORTRAIT
orientationCode = 12; orientationCode = 7;
break; break;
default: default:
// SCREEN_ORIENTATION_UNSPECIFIED // SCREEN_ORIENTATION_UNSPECIFIED