mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 18:42:40 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user