alignment correction

This commit is contained in:
dborth 2009-03-21 21:17:09 +00:00
parent 81d8491821
commit 56e9c8304e
2 changed files with 5 additions and 4 deletions

View File

@ -285,7 +285,7 @@ ParseDirectory()
ResetBrowser();
// add device to path
sprintf(fulldir, "%s/%s", rootdir, browser.dir);
sprintf(fulldir, "%s%s", rootdir, browser.dir);
// open the directory
dir = diropen(fulldir);

View File

@ -31,7 +31,9 @@ GuiImageData::GuiImageData(const u8 * img)
if(res == PNGU_OK)
{
data = (u8 *)memalign (32, imgProp.imgWidth * imgProp.imgHeight * 4);
int len = imgProp.imgWidth * imgProp.imgHeight * 4;
if(len%32) len += (32-len%32);
data = (u8 *)memalign (32, len);
if(data)
{
@ -41,8 +43,7 @@ GuiImageData::GuiImageData(const u8 * img)
{
width = imgProp.imgWidth;
height = imgProp.imgHeight;
int len = imgProp.imgWidth * imgProp.imgHeight * 4;
DCFlushRange(data, len+len%32);
DCFlushRange(data, len);
}
else
{