Merge pull request !12324 from 张有康/master
This commit is contained in:
openharmony_ci 2025-01-23 07:57:34 +00:00 committed by Gitee
commit 7eeab36c04
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 1 deletions

View File

@ -354,6 +354,7 @@ enum class DisplayStateChangeType : uint32_t {
DISPLAY_COMPRESS, DISPLAY_COMPRESS,
UPDATE_SCALE, UPDATE_SCALE,
UNKNOWN, UNKNOWN,
RESOLUTION_CHANGE,
}; };
/** /**

View File

@ -1446,7 +1446,7 @@ DMError ScreenSessionManager::SetVirtualPixelRatio(ScreenId screenId, float virt
virtualPixelRatio); virtualPixelRatio);
screenSession->SetVirtualPixelRatio(virtualPixelRatio); screenSession->SetVirtualPixelRatio(virtualPixelRatio);
std::map<DisplayId, sptr<DisplayInfo>> emptyMap; std::map<DisplayId, sptr<DisplayInfo>> emptyMap;
NotifyDisplayStateChange(GetDefaultScreenId(), screenSession->ConvertToDisplayInfo(), NotifyDisplayStateChange(screenId, screenSession->ConvertToDisplayInfo(),
emptyMap, DisplayStateChangeType::VIRTUAL_PIXEL_RATIO_CHANGE); emptyMap, DisplayStateChangeType::VIRTUAL_PIXEL_RATIO_CHANGE);
NotifyScreenChanged(screenSession->ConvertToScreenInfo(), ScreenChangeEvent::VIRTUAL_PIXEL_RATIO_CHANGED); NotifyScreenChanged(screenSession->ConvertToScreenInfo(), ScreenChangeEvent::VIRTUAL_PIXEL_RATIO_CHANGED);
NotifyDisplayChanged(screenSession->ConvertToDisplayInfo(), NotifyDisplayChanged(screenSession->ConvertToDisplayInfo(),