diff options
author | kszaq <737984+kszaq@users.noreply.github.com> | 2023-01-04 16:35:22 +0100 |
---|---|---|
committer | kszaq <737984+kszaq@users.noreply.github.com> | 2023-01-06 11:56:46 +0100 |
commit | 47b8f6993ae901e78de4fd78eb7ae3eaadec57f6 (patch) | |
tree | fa5cf18d47f3944aa1bba603bb2fcfc487bdb247 | |
parent | fac12d4e0dd37563b61c18e1463f6be3798db8fb (diff) | |
download | xbmc-47b8f6993ae901e78de4fd78eb7ae3eaadec57f6.tar.xz |
Resolution: use iScreenWidth, iScreenHeight in GetMaxAllowedResolution
GetMaxAllowedResolution is used by inputstream.adaptive addon to
decide on stream resolution in Representation Chooser. As it decides
on video resolution, Kodi should return maximal possible video resolution,
not UI resolution.
-rw-r--r-- | xbmc/windowing/Resolution.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xbmc/windowing/Resolution.cpp b/xbmc/windowing/Resolution.cpp index 79123bcda6..682bcc317a 100644 --- a/xbmc/windowing/Resolution.cpp +++ b/xbmc/windowing/Resolution.cpp @@ -444,11 +444,11 @@ void CResolutionUtils::GetMaxAllowedResolution(unsigned int& width, unsigned int { RESOLUTION res = CDisplaySettings::GetInstance().GetResFromString(mode.asString()); RESOLUTION_INFO resInfo{CServiceBroker::GetWinSystem()->GetGfxContext().GetResInfo(res)}; - if (static_cast<unsigned int>(resInfo.iWidth) > maxWidth && - static_cast<unsigned int>(resInfo.iHeight) > maxHeight) + if (static_cast<unsigned int>(resInfo.iScreenWidth) > maxWidth && + static_cast<unsigned int>(resInfo.iScreenHeight) > maxHeight) { - maxWidth = static_cast<unsigned int>(resInfo.iWidth); - maxHeight = static_cast<unsigned int>(resInfo.iHeight); + maxWidth = static_cast<unsigned int>(resInfo.iScreenWidth); + maxHeight = static_cast<unsigned int>(resInfo.iScreenHeight); } } } @@ -460,11 +460,11 @@ void CResolutionUtils::GetMaxAllowedResolution(unsigned int& width, unsigned int for (const auto& res : resList) { RESOLUTION_INFO resInfo{CServiceBroker::GetWinSystem()->GetGfxContext().GetResInfo(res)}; - if (static_cast<unsigned int>(resInfo.iWidth) > maxWidth && - static_cast<unsigned int>(resInfo.iHeight) > maxHeight) + if (static_cast<unsigned int>(resInfo.iScreenWidth) > maxWidth && + static_cast<unsigned int>(resInfo.iScreenHeight) > maxHeight) { - maxWidth = static_cast<unsigned int>(resInfo.iWidth); - maxHeight = static_cast<unsigned int>(resInfo.iHeight); + maxWidth = static_cast<unsigned int>(resInfo.iScreenWidth); + maxHeight = static_cast<unsigned int>(resInfo.iScreenHeight); } } } |