File: minor-bugfix.diff

package info (click to toggle)
openmsx 20.0%2Bdfsg-1.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,544 kB
  • sloc: cpp: 236,922; xml: 49,948; tcl: 15,056; python: 5,385; perl: 281; sh: 77; makefile: 53
file content (29 lines) | stat: -rw-r--r-- 1,084 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);