Fix the incorrect orientation of the gravity sensor and JSVM crash issue in HarmonyOS Next (#18041)

* 1.Fix the problem of incorrect rotation direction of openharmony screen
2.Remove redundant files

# Conflicts:
#	templates/harmonyos-next/entry/src/main/ets/cocos/jsb-adapter/sys-ability-polyfill.js

* Fix the issue of JSVM running crash

---------

Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
This commit is contained in:
qiuguohua
2024-12-17 10:43:39 +08:00
committed by GitHub
parent 86aed391c1
commit 2e4a9d57e0
13 changed files with 26 additions and 275 deletions
@@ -56,11 +56,11 @@ Screen::Orientation Screen::getDeviceOrientation() const {
if(value == 0) {
return Orientation::PORTRAIT;
} else if(value == 1) {
return Orientation::LANDSCAPE_RIGHT;
return Orientation::LANDSCAPE_LEFT;
} else if(value == 2) {
return Orientation::PORTRAIT_UPSIDE_DOWN;
} else if(value == 3) {
return Orientation::LANDSCAPE_LEFT;
return Orientation::LANDSCAPE_RIGHT;
}
CC_ASSERT(false);
return Orientation::PORTRAIT;