diff options
author | Andre Heider | 2009-09-05 17:53:55 +0000 |
---|---|---|
committer | Andre Heider | 2009-09-05 17:53:55 +0000 |
commit | 0b002beccd31fa2796a319427624af1b2ad580b6 (patch) | |
tree | e625a36d21708cb2105e2979bbb9a29934ef03c0 /backends/platform/wii/osystem.cpp | |
parent | 549e2b054092d3ba2ef1c53245227107d406b4c8 (diff) | |
download | scummvm-rg350-0b002beccd31fa2796a319427624af1b2ad580b6.tar.gz scummvm-rg350-0b002beccd31fa2796a319427624af1b2ad580b6.tar.bz2 scummvm-rg350-0b002beccd31fa2796a319427624af1b2ad580b6.zip |
Support for SMB shares, cleaned up async FS functions.
svn-id: r43965
Diffstat (limited to 'backends/platform/wii/osystem.cpp')
-rw-r--r-- | backends/platform/wii/osystem.cpp | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 39c6b9df53..a32752104b 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -23,6 +23,7 @@ #include "backends/fs/wii/wii-fs-factory.h" #include "osystem.h" +#include "options.h" #include <unistd.h> @@ -103,6 +104,28 @@ OSystem_Wii::~OSystem_Wii() { void OSystem_Wii::initBackend() { _startup_time = gettime(); + ConfMan.registerDefault("fullscreen", true); + ConfMan.registerDefault("aspect_ratio", true); + ConfMan.registerDefault("wii_video_default_underscan_x", 16); + ConfMan.registerDefault("wii_video_default_underscan_y", 16); + ConfMan.registerDefault("wii_video_ds_underscan_x", 16); + ConfMan.registerDefault("wii_video_ds_underscan_y", 16); + ConfMan.registerDefault("wii_smb_server", ""); + ConfMan.registerDefault("wii_smb_share", ""); + ConfMan.registerDefault("wii_smb_username", ""); + ConfMan.registerDefault("wii_smb_password", ""); + + WiiFilesystemFactory &fsf = WiiFilesystemFactory::instance(); + +#ifdef USE_WII_SMB + fsf.setSMBLoginData(ConfMan.get("wii_smb_server"), + ConfMan.get("wii_smb_share"), + ConfMan.get("wii_smb_username"), + ConfMan.get("wii_smb_password")); +#endif + + fsf.asyncInit(); + char buf[MAXPATHLEN]; if (!getcwd(buf, MAXPATHLEN)) strcpy(buf, "/"); @@ -123,14 +146,12 @@ void OSystem_Wii::quit() { deinitSfx(); deinitGfx(); - // umount all async filesystems - WiiFilesystemFactory::asyncHandler(false, NULL); + WiiFilesystemFactory::instance().asyncDeinit(); } void OSystem_Wii::engineInit() { _gameRunning = true; - // umount not required filesystems for this game - WiiFilesystemFactory::asyncHandler(false, &ConfMan.get("path")); + WiiFilesystemFactory::instance().umountUnused(ConfMan.get("path")); } void OSystem_Wii::engineDone() { @@ -241,3 +262,16 @@ void OSystem_Wii::getTimeAndDate(struct tm &t) const { t = *localtime(&curTime); } +void OSystem_Wii::showOptionsDialog() { + if (_optionsDlgActive) + return; + + bool ds = (_actualGraphicsMode == gmDoubleStrike) || + (_actualGraphicsMode == gmDoubleStrikeFiltered); + + _optionsDlgActive = true; + WiiOptionsDialog dlg(ds); + dlg.runModal(); + _optionsDlgActive = false; +} + |