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_concat(fa, fs);
|
||||||
}
|
}
|
||||||
|
|
||||||
frag_list = MEM2_alloc((sizeof(FragList)+31)&(~31));
|
frag_list = MEM1_memalign(32, ALIGN32(sizeof(FragList)));
|
||||||
if(frag_list == NULL)
|
if(frag_list == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@ -274,14 +274,21 @@ int get_frag_list(u8 *id, char *path, const u32 hdd_sector_size)
|
|||||||
ret_val = 0;
|
ret_val = 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (frag_list != NULL)
|
|
||||||
MEM2_free(frag_list);
|
|
||||||
if(fs != NULL)
|
if(fs != NULL)
|
||||||
|
{
|
||||||
MEM2_free(fs);
|
MEM2_free(fs);
|
||||||
|
fs = NULL;
|
||||||
|
}
|
||||||
if(fa != NULL)
|
if(fa != NULL)
|
||||||
|
{
|
||||||
MEM2_free(fa);
|
MEM2_free(fa);
|
||||||
|
fa = NULL;
|
||||||
|
}
|
||||||
if(fw != NULL)
|
if(fw != NULL)
|
||||||
|
{
|
||||||
MEM2_free(fw);
|
MEM2_free(fw);
|
||||||
|
fw = NULL;
|
||||||
|
}
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,12 +302,10 @@ int set_frag_list(u8 *id)
|
|||||||
DCFlushRange(frag_list, size);
|
DCFlushRange(frag_list, size);
|
||||||
|
|
||||||
gprintf("Calling WDVD_SetFragList, frag list size %d\n", 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);
|
int ret = WDVD_SetFragList(wbfsDev, frag_list, size);
|
||||||
|
|
||||||
MEM2_free(frag_list);
|
MEM1_free(frag_list);
|
||||||
frag_list = NULL;
|
frag_list = NULL;
|
||||||
|
|
||||||
if(ret)
|
if(ret)
|
||||||
|
@ -25,8 +25,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "mem2.hpp"
|
#include "mem2.hpp"
|
||||||
#include "BufferCircle.hpp"
|
#include "BufferCircle.hpp"
|
||||||
|
#include "utils.h"
|
||||||
#define ALIGN32(x) (((x) + 31) & ~31)
|
|
||||||
|
|
||||||
BufferCircle::BufferCircle()
|
BufferCircle::BufferCircle()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user