DS: List all available devices in the file browser
This commit is contained in:
parent
ab577c7930
commit
8c9eb8edc8
6 changed files with 89 additions and 4 deletions
44
backends/fs/devoptab/devoptab-fs-factory.cpp
Normal file
44
backends/fs/devoptab/devoptab-fs-factory.cpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(__DS__)
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
||||
|
||||
#include "backends/fs/devoptab/devoptab-fs-factory.h"
|
||||
|
||||
#include <sys/iosupport.h>
|
||||
|
||||
DevoptabFilesystemFactory::DevoptabFilesystemFactory() {
|
||||
// skip in, out and err
|
||||
for (uint8 i = 3; i < STD_MAX; ++i) {
|
||||
const devoptab_t *dt = devoptab_list[i];
|
||||
|
||||
if (!dt || !dt->name || !dt->open_r || !dt->diropen_r)
|
||||
continue;
|
||||
|
||||
addDrive(Common::String(dt->name) + ":/");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
38
backends/fs/devoptab/devoptab-fs-factory.h
Normal file
38
backends/fs/devoptab/devoptab-fs-factory.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DEVOPTAB_FILESYSTEM_FACTORY_H
|
||||
#define DEVOPTAB_FILESYSTEM_FACTORY_H
|
||||
|
||||
#include "backends/fs/posix-drives/posix-drives-fs-factory.h"
|
||||
|
||||
/**
|
||||
* A FilesystemFactory implementation for filesystems with a special
|
||||
* top-level directory listing all registered devoptab devices but
|
||||
* that otherwise implement the POSIX APIs.
|
||||
*/
|
||||
class DevoptabFilesystemFactory : public DrivesPOSIXFilesystemFactory {
|
||||
public:
|
||||
DevoptabFilesystemFactory();
|
||||
};
|
||||
|
||||
#endif
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#if defined(POSIX) || defined(PSP2)
|
||||
#if defined(POSIX) || defined(PSP2) || defined(__DS__)
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#if defined(POSIX) || defined(PSP2)
|
||||
#if defined(POSIX) || defined(PSP2) || defined(__DS__)
|
||||
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue