From 1df052b79a01d6abdc299e6db9c0e8eb7e0f5d07 Mon Sep 17 00:00:00 2001 From: liuyangyang Date: Wed, 28 Feb 2024 15:56:56 +0800 Subject: [PATCH] fix setResolution bug Signed-off-by: liuyangyang --- utils/src/display_info.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/src/display_info.cpp b/utils/src/display_info.cpp index 69af120289..8b2feea0a9 100644 --- a/utils/src/display_info.cpp +++ b/utils/src/display_info.cpp @@ -26,7 +26,8 @@ bool DisplayInfo::Marshalling(Parcel &parcel) const parcel.WriteInt32(width_) && parcel.WriteInt32(height_) && parcel.WriteInt32(physicalWidth_) && parcel.WriteInt32(physicalHeight_) && parcel.WriteUint32(refreshRate_) && parcel.WriteUint64(screenId_) && - parcel.WriteFloat(virtualPixelRatio_) && parcel.WriteFloat(xDpi_) && parcel.WriteFloat(yDpi_) && + parcel.WriteFloat(virtualPixelRatio_) && parcel.WriteFloat(densityInCurResolution_) && + parcel.WriteFloat(xDpi_) && parcel.WriteFloat(yDpi_) && parcel.WriteUint32(static_cast(rotation_)) && parcel.WriteUint32(static_cast(orientation_)) && parcel.WriteInt32(offsetX_) && parcel.WriteInt32(offsetY_) && @@ -52,7 +53,7 @@ DisplayInfo *DisplayInfo::Unmarshalling(Parcel &parcel) parcel.ReadInt32(displayInfo->width_) && parcel.ReadInt32(displayInfo->height_) && parcel.ReadInt32(displayInfo->physicalWidth_) && parcel.ReadInt32(displayInfo->physicalHeight_) && parcel.ReadUint32(displayInfo->refreshRate_) && parcel.ReadUint64(displayInfo->screenId_) && - parcel.ReadFloat(displayInfo->virtualPixelRatio_) && + parcel.ReadFloat(displayInfo->virtualPixelRatio_) && parcel.ReadFloat(displayInfo->densityInCurResolution_) && parcel.ReadFloat(displayInfo->xDpi_) && parcel.ReadFloat(displayInfo->yDpi_) && parcel.ReadUint32(rotation) && parcel.ReadUint32(orientation) && parcel.ReadInt32(displayInfo->offsetX_) && parcel.ReadInt32(displayInfo->offsetY_) &&