aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/wii/wii-fs-factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/fs/wii/wii-fs-factory.cpp')
-rw-r--r--backends/fs/wii/wii-fs-factory.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp
index 5bc8ba56f5..2e8051029d 100644
--- a/backends/fs/wii/wii-fs-factory.cpp
+++ b/backends/fs/wii/wii-fs-factory.cpp
@@ -29,6 +29,7 @@
#ifdef USE_WII_DI
#include <di/di.h>
+#include <iso9660.h>
#endif
#ifdef USE_WII_SMB
@@ -71,8 +72,10 @@ void WiiFilesystemFactory::asyncInit() {
void WiiFilesystemFactory::asyncDeinit() {
#ifdef USE_WII_DI
umount(kDVD);
+#ifndef GAMECUBE
DI_Close();
#endif
+#endif
#ifdef USE_WII_SMB
umount(kSMB);
net_deinit();
@@ -125,24 +128,11 @@ void WiiFilesystemFactory::mount(FileSystemType type) {
break;
printf("mount dvd\n");
- DI_Mount();
-
- while (DI_GetStatus() & DVD_INIT)
- usleep(20 * 1000);
-
- if (!(DI_GetStatus() & DVD_READY)) {
- DI_StopMotor();
- printf("error mounting dvd\n");
- break;
- }
-
- printf("mount ISO9660\n");
if (ISO9660_Mount()) {
_dvdMounted = true;
_dvdError = false;
printf("ISO9660 mounted\n");
} else {
- DI_StopMotor();
_dvdError = true;
printf("ISO9660 mount failed\n");
}
@@ -185,7 +175,6 @@ void WiiFilesystemFactory::umount(FileSystemType type) {
printf("umount dvd\n");
ISO9660_Unmount();
- DI_StopMotor();
_dvdMounted = false;
_dvdError = false;
@@ -199,10 +188,7 @@ void WiiFilesystemFactory::umount(FileSystemType type) {
printf("umount smb\n");
- if (smbClose("smb:"))
- printf("smb umounted\n");
- else
- printf("error umounting smb\n");
+ smbClose("smb:");
_smbMounted = false;
_smbError = false;