aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/symbian
diff options
context:
space:
mode:
authorLars Persson2005-12-03 21:29:13 +0000
committerLars Persson2005-12-03 21:29:13 +0000
commit6ed67205ec31305ad19f2e4469de27e7a93c51e8 (patch)
treed32eeffc50c1a9a4d6d3db6c29e1f1774d441f63 /backends/fs/symbian
parent02f5921cbeca2352df9fa84628d3e835df15cc2a (diff)
downloadscummvm-rg350-6ed67205ec31305ad19f2e4469de27e7a93c51e8.tar.gz
scummvm-rg350-6ed67205ec31305ad19f2e4469de27e7a93c51e8.tar.bz2
scummvm-rg350-6ed67205ec31305ad19f2e4469de27e7a93c51e8.zip
1. New build structure for Symbian builds to allow easier build and project updates
2. Updated framework files for new structure 3. Uncommented Debug statements in vorbis.cpp (Should probably be removed alltogether. 4. Incorporated Sevs code formatting changes in the new Symbian source structure. 5. Removed/Changed EScummVM to ScummVM instead, hopefully most cases covered. 6. Beginning vibration support to be used for Scumm shake effects (Work ongoing by SumthinWicked) 7. Replaced the ScummVM icon for the FavIcon and upscaled the icon to 32x32. I think it looks ok, comments are welcome. 8. Built for S60V1 and UIQ2 targets from the cvs 9. Updated Readme with new build instructions. Any comments are welcome. Hopefully the other builds are not affected by this and all Sevs code updates are also incorporated. svn-id: r19739
Diffstat (limited to 'backends/fs/symbian')
-rw-r--r--backends/fs/symbian/symbian-fs.cpp49
1 files changed, 29 insertions, 20 deletions
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index a1bee1f6ff..d23fbe402a 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header$
*/
@@ -83,9 +83,6 @@ SymbianFilesystemNode::SymbianFilesystemNode(bool aIsRoot) {
}
-// SumthinWicked says: added next function myself, since it was not in 0.7.1.
-// might still be a little buggy, or simply the reason ScummVM can't run any
-// games on the phone yet :P
SymbianFilesystemNode::SymbianFilesystemNode(const String &path) {
if (path.size() == 0)
_isPseudoRoot = true;
@@ -113,23 +110,35 @@ FSList SymbianFilesystemNode::listDir(ListMode mode) const {
if (_isPseudoRoot) {
// Drives enumeration
- TDriveList drivelist;
- CEikonEnv::Static()->FsSession().DriveList(drivelist);
- for (int loop=0;loop<KMaxDrives;loop++) {
- if(drivelist[loop]>0) {
- SymbianFilesystemNode entry(false);
- char drive_name[2];
- drive_name[0] = loop+'A';
- drive_name[1] = '\0';
- entry._displayName = drive_name;
- entry._isDirectory = true;
- entry._isValid = true;
- entry._isPseudoRoot = false;
- char path[10];
- sprintf(path,"%c:\\",loop+'A');
- entry._path=path;
- myList.push_back(wrap(new SymbianFilesystemNode(&entry)));
+ RFs fs = CEikonEnv::Static()->FsSession();
+ TInt driveNumber;
+ TChar driveLetter;
+ TVolumeInfo volumeInfo;
+ TBuf8<30> driveLabel8;
+ TBuf8<30> driveString8;
+
+ for (driveNumber=EDriveA; driveNumber<=EDriveZ; driveNumber++) {
+ TInt err = fs.Volume(volumeInfo, driveNumber);
+ if (err != KErrNone)
+ continue;
+ User::LeaveIfError(fs.DriveToChar(driveNumber,driveLetter));
+ if(volumeInfo.iName.Length() > 0) {
+ driveLabel8.Copy(volumeInfo.iName); // 16 to 8bit des // enabling this line alone gives KERN-EXEC 3 with non-optimized GCC? WHY? grrr
+ driveString8.Format(_L8("Drive %c: (%S)"), driveLetter, &driveLabel8);
+ } else {
+ driveString8.Format(_L8("Drive %c:"), driveLetter);
}
+
+ char path[10];
+ sprintf(path,"%c:\\", driveNumber+'A');
+
+ SymbianFilesystemNode entry(false);
+ entry._displayName = (char*)driveString8.PtrZ(); // drive_name
+ entry._isDirectory = true;
+ entry._isValid = true;
+ entry._isPseudoRoot = false;
+ entry._path = path;
+ myList.push_back(wrap(new SymbianFilesystemNode(&entry)));
}
} else {
TPtrC8 ptr((const unsigned char*)_path.c_str(),_path.size());