On Fri, 13 Jan 2012 22:47:38 +0100 Cedric BAIL <cedric.b...@free.fr> said:

> On Fri, Jan 13, 2012 at 8:30 PM, Youness Alaoui
> <kakar...@kakaroto.homelinux.net> wrote:
> > On Fri, Jan 13, 2012 at 10:32 AM, Cedric BAIL <cedric.b...@free.fr> wrote:
> >> On Fri, Jan 13, 2012 at 8:12 AM, Youness Alaoui
> >> <kakar...@kakaroto.homelinux.net> wrote:
> >> > I've had an issue recently when I tried to run my app (using edje) on the
> >> > PS3, the aspect ratio of all the images were wrong, and it looked really
> >> > bad. I investigated the issue and found out that the aspect_preference
> >> was
> >> > the cause and that when it's set to  'BOTH' for example, the
> >> > desc->aspect.prefer value is 50331648 which is.. 0x3000000 .. so it's a
> >> big
> >> > endian vs. little endian issue since the EDJE_ASPECT_PREFER_BOTH value in
> >> > the enum is '3'.
> >> > So I figured the reading of the .edj is wrong, so I looked and it seems
> >> to
> >> > read it as a 'EET_T_CHAR', but the structure contains the enum as type,
> >> > which makes it an int.. so what happens is that it stores 1 byte (the
> >> char)
> >> > in the 32bit variable.. on little endian, it's fine, it works, but on big
> >> > endian, it makes the value huge. So I fixed it by changing the
> >> declaration
> >> > of he 'aspect.prefer' structure to a char instead of the enum it
> >> > represents. I tested and it seems to work and not break anything (and
> >> fixes
> >> > the bug). However, since this seems a bit sensitive, I thought it's best
> >> to
> >> > send the patch here to make sure I'm not doing something wrong.
> >> > Thanks for reviewing this simple one liner patch :
> >> http://pastie.org/3176835
> >> > I have noticed other structures do the same thing, 'fill mode' for
> >> example
> >> > is defined as EET_T_UCHAR in the eet data description and as 'unsigned
> >> > char' in the structure, that's why I fixed it this way. Note also that
> >> this
> >> > shouldn't break the .edj file's compatibility or anything.
> >>
> >> Good, you figured out why it was broken. The fix sounds fine for me.
> >> Did you check that the only enum, we are using directly in one of our
> >> saved structure or should I check ?
> >>
> > Ok cool, I will commit it then. I checked and didn't see any other enum
> > being used, but I didn't do an extensive check. I will make sure it was the
> > only one and fix any other I might see.
> 
> Cool, thanks !

awesome. all handled before i got to it! eeeeeeeeeeeeeexcellent! :)

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to