mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Merge pull request #10581 from Roet-Ivar/wiiu_storage_usb_access
Added access to WiiU-formated storage to be browsed by RetroArch
This commit is contained in:
commit
b78c48c2c3
@ -61,6 +61,7 @@
|
|||||||
|
|
||||||
#define WIIU_SD_PATH "sd:/"
|
#define WIIU_SD_PATH "sd:/"
|
||||||
#define WIIU_USB_PATH "usb:/"
|
#define WIIU_USB_PATH "usb:/"
|
||||||
|
#define WIIU_STORAGE_USB_PATH "storage_usb:/"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Wii U frontend driver, along with the main() method.
|
* The Wii U frontend driver, along with the main() method.
|
||||||
@ -188,6 +189,10 @@ static int frontend_wiiu_parse_drive_list(void *data, bool load_content)
|
|||||||
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
||||||
enum_idx,
|
enum_idx,
|
||||||
FILE_TYPE_DIRECTORY, 0, 0);
|
FILE_TYPE_DIRECTORY, 0, 0);
|
||||||
|
menu_entries_append_enum(list, WIIU_STORAGE_USB_PATH,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
||||||
|
enum_idx,
|
||||||
|
FILE_TYPE_DIRECTORY, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
18
wiiu/main.c
18
wiiu/main.c
@ -22,6 +22,7 @@
|
|||||||
#if defined(HAVE_IOSUHAX) && defined(HAVE_LIBFAT)
|
#if defined(HAVE_IOSUHAX) && defined(HAVE_LIBFAT)
|
||||||
#include <fat.h>
|
#include <fat.h>
|
||||||
#include <iosuhax.h>
|
#include <iosuhax.h>
|
||||||
|
#include <iosuhax_devoptab.h>
|
||||||
#include <sys/iosupport.h>
|
#include <sys/iosupport.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -54,7 +55,7 @@ static void fsdev_init(void);
|
|||||||
static void fsdev_exit(void);
|
static void fsdev_exit(void);
|
||||||
|
|
||||||
bool iosuhaxMount = 0;
|
bool iosuhaxMount = 0;
|
||||||
|
int fsaFd = -1;
|
||||||
static int mcp_hook_fd = -1;
|
static int mcp_hook_fd = -1;
|
||||||
|
|
||||||
/* HBL elf entry point */
|
/* HBL elf entry point */
|
||||||
@ -204,7 +205,11 @@ void __mount_filesystems(void)
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_LIBFAT
|
#ifdef HAVE_LIBFAT
|
||||||
if(iosuhaxMount)
|
if(iosuhaxMount)
|
||||||
|
{
|
||||||
fatInitDefault();
|
fatInitDefault();
|
||||||
|
fsaFd = IOSUHAX_FSA_Open();
|
||||||
|
mount_fs("storage_usb", fsaFd, NULL, "/vol/storage_usb01");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
mount_sd_fat("sd");
|
mount_sd_fat("sd");
|
||||||
#else
|
#else
|
||||||
@ -224,6 +229,17 @@ void __unmount_filesystems(void)
|
|||||||
{
|
{
|
||||||
fatUnmount("sd:");
|
fatUnmount("sd:");
|
||||||
fatUnmount("usb:");
|
fatUnmount("usb:");
|
||||||
|
|
||||||
|
IOSUHAX_sdio_disc_interface.shutdown();
|
||||||
|
IOSUHAX_usb_disc_interface.shutdown();
|
||||||
|
|
||||||
|
unmount_fs("storage_usb");
|
||||||
|
IOSUHAX_FSA_Close(fsaFd);
|
||||||
|
|
||||||
|
if(mcp_hook_fd >= 0)
|
||||||
|
MCPHookClose();
|
||||||
|
else
|
||||||
|
IOSUHAX_Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
unmount_sd_fat("sd");
|
unmount_sd_fat("sd");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user