mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 07:14:59 +00:00
PETKA: Migrate engine to Path
This commit is contained in:
parent
ffe2ad5446
commit
cfdd63abf8
@ -30,7 +30,7 @@ namespace Petka {
|
|||||||
|
|
||||||
bool FileMgr::openStore(const Common::String &name) {
|
bool FileMgr::openStore(const Common::String &name) {
|
||||||
Common::SharedPtr<Common::File> file(new Common::File());
|
Common::SharedPtr<Common::File> file(new Common::File());
|
||||||
if (name.empty() || !file->open(name) || file->readUint32BE() != MKTAG('S', 't', 'O', 'R')) {
|
if (name.empty() || !file->open(Common::Path(name)) || file->readUint32BE() != MKTAG('S', 't', 'O', 'R')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,13 +81,13 @@ void FileMgr::closeAll() {
|
|||||||
_stores.clear();
|
_stores.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
static Common::String formPath(Common::String name) {
|
static Common::Path formPath(Common::String name) {
|
||||||
for (uint i = 0; i < name.size(); ++i) {
|
for (uint i = 0; i < name.size(); ++i) {
|
||||||
if (name[i] == '\\') {
|
if (name[i] == '\\') {
|
||||||
name.setChar('/', i);
|
name.setChar('/', i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name;
|
return Common::Path(name, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::SeekableReadStream *FileMgr::getFileStream(const Common::String &name) {
|
Common::SeekableReadStream *FileMgr::getFileStream(const Common::String &name) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user