mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-17 23:41:53 +01:00
-moved down frag list to mem1 and also use mem1 memalign as it
is properly needed
This commit is contained in:
parent
199db7cfaa
commit
f98ca361e8
@ -241,7 +241,7 @@ int get_frag_list(u8 *id, char *path, const u32 hdd_sector_size)
|
||||
frag_concat(fa, fs);
|
||||
}
|
||||
|
||||
frag_list = MEM2_alloc((sizeof(FragList)+31)&(~31));
|
||||
frag_list = MEM1_memalign(32, ALIGN32(sizeof(FragList)));
|
||||
if(frag_list == NULL)
|
||||
goto out;
|
||||
|
||||
@ -274,14 +274,21 @@ int get_frag_list(u8 *id, char *path, const u32 hdd_sector_size)
|
||||
ret_val = 0;
|
||||
|
||||
out:
|
||||
if (frag_list != NULL)
|
||||
MEM2_free(frag_list);
|
||||
if(fs != NULL)
|
||||
{
|
||||
MEM2_free(fs);
|
||||
fs = NULL;
|
||||
}
|
||||
if(fa != NULL)
|
||||
{
|
||||
MEM2_free(fa);
|
||||
fa = NULL;
|
||||
}
|
||||
if(fw != NULL)
|
||||
{
|
||||
MEM2_free(fw);
|
||||
fw = NULL;
|
||||
}
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
@ -295,12 +302,10 @@ int set_frag_list(u8 *id)
|
||||
DCFlushRange(frag_list, size);
|
||||
|
||||
gprintf("Calling WDVD_SetFragList, frag list size %d\n", size);
|
||||
/* if (size > 400) ghexdump(frag_list, 400);
|
||||
else ghexdump(frag_list, size); */
|
||||
|
||||
int ret = WDVD_SetFragList(wbfsDev, frag_list, size);
|
||||
|
||||
MEM2_free(frag_list);
|
||||
MEM1_free(frag_list);
|
||||
frag_list = NULL;
|
||||
|
||||
if(ret)
|
||||
|
@ -25,8 +25,7 @@
|
||||
***************************************************************************/
|
||||
#include "mem2.hpp"
|
||||
#include "BufferCircle.hpp"
|
||||
|
||||
#define ALIGN32(x) (((x) + 31) & ~31)
|
||||
#include "utils.h"
|
||||
|
||||
BufferCircle::BufferCircle()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user