|
发表于 2022-12-28 14:21:56
只看该作者
156#
diff --git a/dmserver/src/abstract_screen_controller.cpp b/dmserver/src/abstract_screen_controller.cpp
index 2760175..b672d45 100644
--- a/dmserver/src/abstract_screen_controller.cpp
+++ b/dmserver/src/abstract_screen_controller.cpp
@@ -330,12 +330,14 @@ bool AbstractScreenController::FillAbstractScreen(sptr<AbstractScreen>& absScree
WLOGE("supported screen mode is 0, screenId=%{public}" PRIu64"", rsScreenId);
return false;
}
+ absScreen->modes_.assign(allModes.size(), nullptr);//增加当前行
for (RSScreenModeInfo rsScreenModeInfo : allModes) {
sptr<SupportedScreenModes> info = new SupportedScreenModes();
info->width_ = static_cast<uint32_t>(rsScreenModeInfo.GetScreenWidth());
info->height_ = static_cast<uint32_t>(rsScreenModeInfo.GetScreenHeight());
info->refreshRate_ = rsScreenModeInfo.GetScreenFreshRate();
- absScreen->modes_.push_back(info);
+ absScreen->modes_.at(rsScreenModeInfo.GetScreenModeId()) = info;//增加当前行
+ /* absScreen->modes_.push_back(info); */
WLOGD("fill screen w/h:%{public}d/%{public}d", info->width_, info->height_);
}
int32_t activeModeId = rsInterface_.GetScreenActiveMode(rsScreenId).GetScreenModeId();
@@ -1114,4 +1116,4 @@ ScreenPowerState AbstractScreenController::GetScreenPower(ScreenId dmsScreenId)
WLOGFI("GetScreenPower:%{public}u, rsscreen:%{public}" PRIu64".", state, rsId);
return state;
}
-} // namespace OHOS::Rosen
\ No newline at end of file
+} // namespace OHOS::Rosen
|
|