Skip to content

Commit

Permalink
Updates from PR feedback (ty @aliaspider)
Browse files Browse the repository at this point in the history
  • Loading branch information
gblues committed Jun 8, 2018
1 parent 8b87a53 commit 9ea16c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
21 changes: 15 additions & 6 deletions wiiu/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include <iosuhax.h>
#include <sys/iosupport.h>

#include "wiiu_main.h"

#include "hbl.h"

#include "fs/fs_utils.h"
Expand Down Expand Up @@ -188,17 +186,28 @@ static void try_shutdown_iosuhax(void)
iosuhaxMount = false;
}

/**
* Mount the filesystem(s) needed by the application. By default, we
* mount the SD card to /sd.
*
* The 'iosuhaxMount' symbol used here is public and can be referenced
* in overriding implementations.
*/
__attribute__((weak))
void mount_filesystems(void)
void __mount_filesystems(void)
{
if(iosuhaxMount)
fatInitDefault();
else
mount_sd_fat("sd");
}

/**
* Unmount filesystems. Implementing applications should be careful to
* clean up anything mounted in __mount_filesystems() here.
*/
__attribute__((weak))
void unmount_filesystems(void)
void __unmount_filesystems(void)
{
if (iosuhaxMount)
{
Expand All @@ -213,11 +222,11 @@ static void fsdev_init(void)
{
iosuhaxMount = try_init_iosuhax();

mount_filesystems();
__mount_filesystems();
}

static void fsdev_exit(void)
{
unmount_filesystems();
__unmount_filesystems();
try_shutdown_iosuhax();
}
10 changes: 0 additions & 10 deletions wiiu/wiiu_main.h

This file was deleted.

0 comments on commit 9ea16c0

Please sign in to comment.