diff options
author | fuzzard <fuzzard@users.noreply.github.com> | 2024-05-19 07:41:54 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-19 07:41:54 +1000 |
commit | 2ea6438fe751c07d2beec653e37ff885d9c5041d (patch) | |
tree | 54e06a73503aab2361e46f3a6e3e4a1e1cb86479 | |
parent | ca8f70a84cb1bed10abc0474462a6cf79e4dfce0 (diff) | |
parent | af57e694fd8e9eec6e0f70a3f587f73883afc0c4 (diff) | |
download | xbmc-2ea6438fe751c07d2beec653e37ff885d9c5041d.tar.xz |
Merge pull request #25135 from j-piecuch/wayland-fix-zero-display-size
[wayland] Treat monitor physical width/height of 0 as invalid
-rw-r--r-- | xbmc/windowing/wayland/Output.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xbmc/windowing/wayland/Output.cpp b/xbmc/windowing/wayland/Output.cpp index d4e031121b..833f7b96c0 100644 --- a/xbmc/windowing/wayland/Output.cpp +++ b/xbmc/windowing/wayland/Output.cpp @@ -31,9 +31,9 @@ COutput::COutput(std::uint32_t globalName, { std::unique_lock<CCriticalSection> lock(m_geometryCriticalSection); m_position = {x, y}; - // Some monitors report invalid (negative) values that would cause an exception - // with CSizeInt - if (physWidth < 0 || physHeight < 0) + // Some monitors report invalid (non-positive) values that would cause an exception + // with CSizeInt and/or lead to nonsensical DPI values. + if (physWidth <= 0 || physHeight <= 0) m_physicalSize = {}; else m_physicalSize = {physWidth, physHeight}; |