From 137c2331c6ba0c1e06c5aafb35e59b4877fefcb2 Mon Sep 17 00:00:00 2001 From: dimok321 <15055714+dimok789@users.noreply.github.com> Date: Sat, 25 Sep 2010 07:07:08 +0000 Subject: [PATCH] *Fixed crash with fat cache free on gamestart *Moved fat cache to mem2 --- HBC/META.XML | 4 ++-- source/fatmounter.c | 22 ---------------------- source/libfat/mem_allocate.h | 7 ++++--- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/HBC/META.XML b/HBC/META.XML index 06ff7764..40d203b5 100644 --- a/HBC/META.XML +++ b/HBC/META.XML @@ -2,8 +2,8 @@ USB Loader GX USB Loader GX Team - 1.0 r973 - 201009250551 + 1.0 r974 + 201009250702 Loads games from USB-devices USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times. The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller. diff --git a/source/fatmounter.c b/source/fatmounter.c index acfbef68..12adaebd 100644 --- a/source/fatmounter.c +++ b/source/fatmounter.c @@ -190,9 +190,6 @@ s32 MountNTFS(u32 sector) s32 ret; if (fs_ntfs_mount) return 0; - //printf("mounting NTFS\n"); - //Wpad_WaitButtons(); - _FAT_mem_init(); ntfsInit(); // Call ntfs init here, to prevent locale resets @@ -253,22 +250,3 @@ s32 UnmountNTFS(void) return 0; } - -void _FAT_mem_init() -{ -} - -void* _FAT_mem_allocate(size_t size) -{ - return malloc(size); -} - -void* _FAT_mem_align(size_t size) -{ - return memalign(32, size); -} - -void _FAT_mem_free(void *mem) -{ - free(mem); -} diff --git a/source/libfat/mem_allocate.h b/source/libfat/mem_allocate.h index 8f9d5240..91ef37ad 100644 --- a/source/libfat/mem_allocate.h +++ b/source/libfat/mem_allocate.h @@ -32,21 +32,22 @@ #define __MEM_ALLOCATE_H_ #include +#include "memory/mem2.h" static inline void* _FAT_mem_allocate(size_t size) { - return malloc(size); + return MEM2_alloc(size); } static inline void* _FAT_mem_align(size_t size) { - return memalign(32, size); + return MEM2_alloc(size); } static inline void _FAT_mem_free(void* mem) { - free(mem); + MEM2_free(mem); } #endif // _MEM_ALLOCATE_H