aboutsummaryrefslogtreecommitdiff
path: root/xbmc/windowing/wayland/Output.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/windowing/wayland/Output.cpp')
-rw-r--r--xbmc/windowing/wayland/Output.cpp6
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};