mutter/fixed-to-float-patches/clutter-actor.c.0.patch
Robert Bragg 012b169a73 [fixed-to-float-patches] Updates the patches in line with the last merge
Most of the patches updated weren't failing but there were a number of
hunk offsets when applying so it tidies that up. The change in
mtx_transform.0.patch has been moved to clutter-actor.c.0.patch.
2009-01-12 17:13:51 +00:00

50 lines
2.4 KiB
Diff

diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 8db8206..f4cec66 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -806,7 +806,7 @@ static inline void
mtx_transform (const ClutterFixed m[],
fixed_vertex_t *vertex)
{
- ClutterFixed _x, _y, _z, _w;
+ float _x, _y, _z, _w;
_x = vertex->x;
_y = vertex->y;
@@ -846,8 +846,11 @@ mtx_transform (const ClutterFixed m[],
/* Help macros to scale from OpenGL <-1,1> coordinates system to our
* X-window based <0,window-size> coordinates
*/
-#define MTX_GL_SCALE_X(x,w,v1,v2) (CLUTTER_FIXED_MUL (((CLUTTER_FIXED_DIV ((x), (w)) + 1.0) >> 1), (v1)) + (v2))
-#define MTX_GL_SCALE_Y(y,w,v1,v2) ((v1) - CLUTTER_FIXED_MUL (((CLUTTER_FIXED_DIV ((y), (w)) + 1.0) >> 1), (v1)) + (v2))
+#define MTX_GL_SCALE_X(x,w,v1,v2) \
+ (CLUTTER_FIXED_MUL (((CLUTTER_FIXED_DIV ((x), (w)) + 1.0) / 2), (v1)) + (v2))
+#define MTX_GL_SCALE_Y(y,w,v1,v2) \
+ ((v1) - CLUTTER_FIXED_MUL (((CLUTTER_FIXED_DIV ((y), (w)) + 1.0) / 2), \
+ (v1)) + (v2))
#define MTX_GL_SCALE_Z(z,w,v1,v2) (MTX_GL_SCALE_X ((z), (w), (v1), (v2)))
/* transforms a 4-tuple of coordinates using @matrix and
@@ -3244,8 +3247,8 @@ clutter_actor_get_preferred_width (ClutterActor *self,
if (natural_width < min_width)
{
- g_warning ("Actor of type %s reported a natural width of %d (%d px) "
- "lower than min width %d (%d px)",
+ g_warning ("Actor of type %s reported a natural width of %f (%d px) "
+ "lower than min width %f (%d px)",
G_OBJECT_TYPE_NAME (self),
natural_width, CLUTTER_UNITS_TO_DEVICE (natural_width),
min_width, CLUTTER_UNITS_TO_DEVICE (min_width));
@@ -3314,8 +3317,8 @@ clutter_actor_get_preferred_height (ClutterActor *self,
if (natural_height < min_height)
{
- g_warning ("Actor of type %s reported a natural height of %d "
- "(%d px) lower than min height %d (%d px)",
+ g_warning ("Actor of type %s reported a natural height of %f "
+ "(%d px) lower than min height %f (%d px)",
G_OBJECT_TYPE_NAME (self),
natural_height, CLUTTER_UNITS_TO_DEVICE (natural_height),
min_height, CLUTTER_UNITS_TO_DEVICE (min_height));