[mupen64plus-core] 121/310: Correct OSD text position by x, y start offset of text
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:57:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-core.
commit 3d35b3f2f270677e525cf1850b9cc3babbfc4be6
Author: Sven Eckelmann <sven at narfation.org>
Date: Sun Oct 16 13:41:56 2011 +0200
Correct OSD text position by x,y start offset of text
---
debian/patches/ftgl_fontrendering.patch | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/debian/patches/ftgl_fontrendering.patch b/debian/patches/ftgl_fontrendering.patch
index 0a0e2b6..8f5e70b 100644
--- a/debian/patches/ftgl_fontrendering.patch
+++ b/debian/patches/ftgl_fontrendering.patch
@@ -1644,7 +1644,7 @@ index 22a7a9c691923bdb8526c610630f1ed898c2c02b..00000000000000000000000000000000
-#endif /* OGLFT_H */
-
diff --git a/src/osd/osd.cpp b/src/osd/osd.cpp
-index 29bea2d2475e91a51e79c37a2876d0f040e09fdd..0ac730a3046e889b0274d18156d1fa5014a7f714 100644
+index 29bea2d2475e91a51e79c37a2876d0f040e09fdd..7e7e426604521537f9e3f4ecd734ec96b969585d 100644
--- a/src/osd/osd.cpp
+++ b/src/osd/osd.cpp
@@ -22,7 +22,7 @@
@@ -1709,16 +1709,17 @@ index 29bea2d2475e91a51e79c37a2876d0f040e09fdd..0ac730a3046e889b0274d18156d1fa50
+ case OSD_BOTTOM_LEFT:
x = 0.;
- y = (float)height;
-+ x_adjust = 0.;
++ x_adjust = -msg->sizebox[0];
break;
case OSD_TOP_CENTER:
- l_font->setVerticalJustification(OGLFT::Face::TOP);
- l_font->setHorizontalJustification(OGLFT::Face::CENTER);
+- x = ((float)width)/2.0f;
+- y = (float)height;
+ case OSD_MIDDLE_CENTER:
+ case OSD_BOTTOM_CENTER:
- x = ((float)width)/2.0f;
-- y = (float)height;
-+ x_adjust = -(msg->sizebox[2] - msg->sizebox[0]) / 2.f;
++ x = ((float)width) / 2.0f;
++ x_adjust = (-msg->sizebox[0] - msg->sizebox[2]) / 2.f;
break;
case OSD_TOP_RIGHT:
- l_font->setVerticalJustification(OGLFT::Face::TOP);
@@ -1726,7 +1727,7 @@ index 29bea2d2475e91a51e79c37a2876d0f040e09fdd..0ac730a3046e889b0274d18156d1fa50
+ case OSD_MIDDLE_RIGHT:
+ case OSD_BOTTOM_RIGHT:
x = (float)width;
-+ x_adjust = -(msg->sizebox[2] - msg->sizebox[0]);
++ x_adjust = -msg->sizebox[2];
+ break;
+ }
+
@@ -1736,7 +1737,7 @@ index 29bea2d2475e91a51e79c37a2876d0f040e09fdd..0ac730a3046e889b0274d18156d1fa50
+ case OSD_TOP_CENTER:
+ case OSD_TOP_RIGHT:
y = (float)height;
-+ y_adjust = -(msg->sizebox[3] - msg->sizebox[1]);
++ y_adjust = - msg->sizebox[3];
break;
case OSD_MIDDLE_LEFT:
- l_font->setVerticalJustification(OGLFT::Face::MIDDLE);
@@ -1754,8 +1755,9 @@ index 29bea2d2475e91a51e79c37a2876d0f040e09fdd..0ac730a3046e889b0274d18156d1fa50
- l_font->setVerticalJustification(OGLFT::Face::MIDDLE);
- l_font->setHorizontalJustification(OGLFT::Face::RIGHT);
- x = (float)width;
- y = ((float)height)/2.0f;
-+ y_adjust = -(msg->sizebox[3] - msg->sizebox[1]) / 2.f;
+- y = ((float)height)/2.0f;
++ y = ((float)height) / 2.0f;
++ y_adjust = (-msg->sizebox[1] - msg->sizebox[3]) / 2.f;
break;
case OSD_BOTTOM_LEFT:
- l_font->setVerticalJustification(OGLFT::Face::BOTTOM);
@@ -1780,7 +1782,7 @@ index 29bea2d2475e91a51e79c37a2876d0f040e09fdd..0ac730a3046e889b0274d18156d1fa50
- l_font->setHorizontalJustification(OGLFT::Face::LEFT);
- x = 0.;
y = 0.;
-+ y_adjust = 0.;
++ y_adjust = -msg->sizebox[1];
break;
}
@@ -1854,3 +1856,12 @@ index 29bea2d2475e91a51e79c37a2876d0f040e09fdd..0ac730a3046e889b0274d18156d1fa50
}
// keeps track of next message position for each corner
+@@ -543,7 +534,7 @@ static void osd_remove_message(osd_message_t *msg)
+
+ if (msg->text) {
+ free(msg->text);
+- msg->text = NULL;
++ msg->text = NULL;
+ }
+
+ node = list_find_node(l_messageQueue, msg);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-core.git
More information about the Pkg-games-commits
mailing list