diff --git a/frontend/drivers/platform_wiiu.c b/frontend/drivers/platform_wiiu.c index 2f5d484cff..96cdcc6c7b 100644 --- a/frontend/drivers/platform_wiiu.c +++ b/frontend/drivers/platform_wiiu.c @@ -49,7 +49,6 @@ #include "../../retroarch.h" #include "../../gfx/video_driver.h" -#include "wiiu_main.h" #include "hbl.h" #include "wiiu_dbg.h" #include "system/exception_handler.h" @@ -68,10 +67,6 @@ * The Wii U frontend driver, along with the main() method. */ -/* TODO: If we want greater control over which filesystems get mounted, - * implement callbacks and assign them below. */ -hooks_t hooks = { NULL, NULL }; - static enum frontend_fork wiiu_fork_mode = FRONTEND_FORK_NONE; static const char *elf_path_cst = WIIU_SD_PATH "retroarch/retroarch.elf"; diff --git a/wiiu/main.c b/wiiu/main.c index 3fcd225294..b2cc511436 100644 --- a/wiiu/main.c +++ b/wiiu/main.c @@ -188,36 +188,36 @@ static void try_shutdown_iosuhax(void) iosuhaxMount = false; } +__attribute__((weak)) +void mount_filesystems(void) +{ + if(iosuhaxMount) + fatInitDefault(); + else + mount_sd_fat("sd"); +} + +__attribute__((weak)) +void unmount_filesystems(void) +{ + if (iosuhaxMount) + { + fatUnmount("sd:"); + fatUnmount("usb:"); + } + else + unmount_sd_fat("sd"); +} + static void fsdev_init(void) { iosuhaxMount = try_init_iosuhax(); - if(hooks.fs_mount != NULL && hooks.fs_unmount != NULL) - hooks.fs_mount(); - else - { - if(iosuhaxMount) - fatInitDefault(); - else - mount_sd_fat("sd"); - } + mount_filesystems(); } static void fsdev_exit(void) { - if(hooks.fs_mount != NULL && hooks.fs_unmount != NULL) - - hooks.fs_unmount(); - else - { - if (iosuhaxMount) - { - fatUnmount("sd:"); - fatUnmount("usb:"); - } - else - unmount_sd_fat("sd"); - } - + unmount_filesystems(); try_shutdown_iosuhax(); } diff --git a/wiiu/wiiu_main.h b/wiiu/wiiu_main.h index 7c16c813c4..4a8cbdb80d 100644 --- a/wiiu/wiiu_main.h +++ b/wiiu/wiiu_main.h @@ -3,14 +3,8 @@ #include "wiiu/types.h" -struct main_hooks { - void (*fs_mount)(void); - void (*fs_unmount)(void); -}; - -typedef struct main_hooks hooks_t; - -extern hooks_t hooks; +void mount_filesystems(void); +void unmount_filesystems(void); extern bool iosuhaxMount; #endif /* _MAIN_H */