From ab942bc221822b2c3eb0ef83c1d4d6a0d4b304be Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 25 Jul 2020 16:37:52 -0230 Subject: [PATCH] Fixed snapshots being cut off in fullscreen mode (fixes #674). --- Changes.txt | 3 +++ src/common/Rect.hxx | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes.txt b/Changes.txt index 32969710a..0a1179454 100644 --- a/Changes.txt +++ b/Changes.txt @@ -14,6 +14,9 @@ 6.2.1 to 6.3 (XXXX XX, 2020) + * Fix bug when taking fullscreen snapshots; the dimensions were sometimes + cut off. + * Added autofire. * Added new interface palette 'Dark'. (TODO: DOC) diff --git a/src/common/Rect.hxx b/src/common/Rect.hxx index 155151457..5243740f2 100644 --- a/src/common/Rect.hxx +++ b/src/common/Rect.hxx @@ -111,7 +111,8 @@ struct Rect Rect() {} explicit Rect(const Size& s) : bottom(s.h), right(s.w) { assert(valid()); } Rect(uInt32 w, uInt32 h) : bottom(h), right(w) { assert(valid()); } - Rect(const Point& p, uInt32 w, uInt32 h) : top(p.y), left(p.x), bottom(h), right(w) { assert(valid()); } + Rect(const Point& p, uInt32 w, uInt32 h) + : top(p.y), left(p.x), bottom(p.y + h), right(p.x + w) { assert(valid()); } Rect(uInt32 x1, uInt32 y1, uInt32 x2, uInt32 y2) : top(y1), left(x1), bottom(y2), right(x2) { assert(valid()); } uInt32 x() const { return left; }