From 4a21224de519aeb6ffa0377a70c93d1a17ae15d3 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Wed, 27 Jun 2018 18:18:21 +0200 Subject: [PATCH] Prevent bad width and height values --- src/display.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/display.cxx b/src/display.cxx index 195aa3f..af9a94c 100644 --- a/src/display.cxx +++ b/src/display.cxx @@ -33,6 +33,11 @@ Display::readDisplaySize () this->width = displayMode.w; this->height = displayMode.h; + + if (this->width < this->getLogicWidth ()) + this->width = this->getLogicWidth (); + if (this->height < this->getLogicHeight ()) + this->height = this->getLogicHeight (); } Sint32