mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 19:16:21 +00:00
WII: File system access performance optimization
Games load up to 30 times faster. For example, the Zork games took up to 10 minutes to start. Now they load in under 20 seconds. Similar improvements can be seen in the massadd feature.
This commit is contained in:
parent
b4b91b1fad
commit
92e37fd810
@ -152,8 +152,7 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
|
||||
if (_path.empty())
|
||||
return getDevopChildren(list, mode, hidden);
|
||||
|
||||
DIR* dp = opendir (_path.c_str());
|
||||
DIR* tmpdir;
|
||||
DIR *dp = opendir (_path.c_str());
|
||||
|
||||
if (dp == NULL)
|
||||
return false;
|
||||
@ -169,13 +168,7 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
|
||||
newPath += '/';
|
||||
newPath += pent->d_name;
|
||||
|
||||
bool isDir = false;
|
||||
tmpdir = opendir(newPath.c_str());
|
||||
if(tmpdir)
|
||||
{
|
||||
isDir = true;
|
||||
closedir(tmpdir);
|
||||
}
|
||||
bool isDir = ( pent->d_type == DT_DIR );
|
||||
|
||||
if ((mode == Common::FSNode::kListFilesOnly && isDir) ||
|
||||
(mode == Common::FSNode::kListDirectoriesOnly && !isDir))
|
||||
|
Loading…
x
Reference in New Issue
Block a user