mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-08 12:35:08 +01:00
f1febd91be
*Fixed Font loading. The font.ttf is loaded from the path with .thems if it exists there. When a Theme is loaded and a font.ttf file exists in the defined "Image-Folder:" than this font.ttf will override all others. This ensures support for themes with special fonts. *Fixed double count on playcount bug *Updated libext2fs to git snapshot 2010-12-24 *Added proper close of all file systems where the games are loaded from (FAT32/NTFS/EXT) *Fixed hang bug when reloading into the IOS set in the individual game settings with that (reload to 223, 224, 245, ...)
38 lines
585 B
C++
38 lines
585 B
C++
#include <ext2.h>
|
|
#include "usbloader/usbstorage2.h"
|
|
#include "wbfs_ext.h"
|
|
|
|
sec_t ext_wbfs_sec = 0;
|
|
|
|
s32 Wbfs_Ext::Open()
|
|
{
|
|
Close();
|
|
strcpy(wbfs_fs_drive, "EXT:");
|
|
|
|
if (Mounted)
|
|
return 0;
|
|
|
|
Mounted = ext2Mount("EXT", &__io_usbstorage2, lba, CACHE_SIZE, CACHED_SECTORS, EXT2_FLAG_DEFAULT);
|
|
if (!Mounted)
|
|
return -2;
|
|
|
|
ext_wbfs_sec = lba;
|
|
|
|
return 0;
|
|
}
|
|
|
|
void Wbfs_Ext::Close()
|
|
{
|
|
if (hdd)
|
|
{
|
|
wbfs_close(hdd);
|
|
hdd = NULL;
|
|
}
|
|
|
|
/* Unmount device */
|
|
ext2Unmount("EXT:/");
|
|
|
|
Mounted = false;
|
|
ext_wbfs_sec = 0;
|
|
}
|