aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorAndre Heider2009-09-20 11:47:11 +0000
committerAndre Heider2009-09-20 11:47:11 +0000
commitcd1628f70d3e950cb1480a904a25eebd6724fea1 (patch)
tree26ca73ad4ee10bf96166bdcc2f890a5aede4aef3 /backends/fs
parent44ce4edeaa4457bf9057ed4776c00997b914e624 (diff)
downloadscummvm-rg350-cd1628f70d3e950cb1480a904a25eebd6724fea1.tar.gz
scummvm-rg350-cd1628f70d3e950cb1480a904a25eebd6724fea1.tar.bz2
scummvm-rg350-cd1628f70d3e950cb1480a904a25eebd6724fea1.zip
Mention mount errors on the status labels.
svn-id: r44202
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/wii/wii-fs-factory.cpp21
-rw-r--r--backends/fs/wii/wii-fs-factory.h3
2 files changed, 23 insertions, 1 deletions
diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp
index 4595e93555..c06b6e5d5f 100644
--- a/backends/fs/wii/wii-fs-factory.cpp
+++ b/backends/fs/wii/wii-fs-factory.cpp
@@ -40,7 +40,9 @@ DECLARE_SINGLETON(WiiFilesystemFactory);
WiiFilesystemFactory::WiiFilesystemFactory() :
_dvdMounted(false),
- _smbMounted(false) {
+ _smbMounted(false),
+ _dvdError(false),
+ _smbError(false) {
}
AbstractFSNode *WiiFilesystemFactory::makeRootFileNode() const {
@@ -104,6 +106,17 @@ bool WiiFilesystemFactory::isMounted(FileSystemType type) {
return false;
}
+bool WiiFilesystemFactory::failedToMount(FileSystemType type) {
+ switch (type) {
+ case kDVD:
+ return _dvdError;
+ case kSMB:
+ return _smbError;
+ }
+
+ return false;
+}
+
void WiiFilesystemFactory::mount(FileSystemType type) {
switch (type) {
case kDVD:
@@ -126,9 +139,11 @@ void WiiFilesystemFactory::mount(FileSystemType type) {
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");
}
#endif
@@ -149,8 +164,10 @@ void WiiFilesystemFactory::mount(FileSystemType type) {
if (smbInit(_smbUsername.c_str(), _smbPassword.c_str(),
_smbShare.c_str(), _smbServer.c_str())) {
_smbMounted = true;
+ _smbError = false;
printf("smb mounted\n");
} else {
+ _smbError = true;
printf("error mounting smb\n");
}
#endif
@@ -171,6 +188,7 @@ void WiiFilesystemFactory::umount(FileSystemType type) {
DI_StopMotor();
_dvdMounted = false;
+ _dvdError = false;
#endif
break;
@@ -187,6 +205,7 @@ void WiiFilesystemFactory::umount(FileSystemType type) {
printf("error umounting smb\n");
_smbMounted = false;
+ _smbError = false;
#endif
break;
}
diff --git a/backends/fs/wii/wii-fs-factory.h b/backends/fs/wii/wii-fs-factory.h
index 0e7f87a783..42795ebf33 100644
--- a/backends/fs/wii/wii-fs-factory.h
+++ b/backends/fs/wii/wii-fs-factory.h
@@ -57,6 +57,7 @@ public:
#endif
bool isMounted(FileSystemType type);
+ bool failedToMount(FileSystemType type);
void mount(FileSystemType type);
void umount(FileSystemType type);
@@ -72,6 +73,8 @@ private:
bool _dvdMounted;
bool _smbMounted;
+ bool _dvdError;
+ bool _smbError;
#ifdef USE_WII_SMB
String _smbServer;