Description: Rename Rectangle to Rect to avoid one-definition-rule error
Author: Bas Wijnen <wijnen@debian.org>
Forwarded: no
Last-Update: 2025-03-04

--- openmsx-20.0+dfsg.orig/src/console/OSDWidget.cc
+++ openmsx-20.0+dfsg/src/console/OSDWidget.cc
@@ -21,8 +21,8 @@ using namespace gl;
 namespace openmsx {
 
 // intersect two rectangles
-struct Rectangle { int x, y, w, h; };
-static constexpr Rectangle intersect(const Rectangle& a, const Rectangle& b)
+struct Rect { int x, y, w, h; };
+static constexpr Rect intersect(const Rect& a, const Rect& b)
 {
 	int x1 = std::max<int>(a.x, b.x);
 	int y1 = std::max<int>(a.y, b.y);
@@ -74,8 +74,8 @@ GLScopedClip::GLScopedClip(const OutputS
 		origClip.emplace();
 		glGetIntegerv(GL_SCISSOR_BOX, origClip->data());
 		auto [xn, yn, wn, hn] = intersect(
-			Rectangle{(*origClip)[0], (*origClip)[1], (*origClip)[2], (*origClip)[3]},
-			Rectangle{ix, iy, iw, ih});
+			Rect{(*origClip)[0], (*origClip)[1], (*origClip)[2], (*origClip)[3]},
+			Rect{ix, iy, iw, ih});
 		glScissor(xn, yn, wn, hn);
 	} else {
 		glScissor(ix, iy, iw, ih);
