Hi, On Fri, Jan 13, 2012 at 8:12 AM, Youness Alaoui <[email protected]> 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 ? Regards, -- Cedric BAIL ------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
