COMMON: Add API for loading InstallShieldV3 from a stream

This commit is contained in:
elasota 2023-12-05 18:24:20 -05:00 committed by Filippos Karapetis
parent 737e5ef7ec
commit def3c4888a
2 changed files with 14 additions and 1 deletions

View File

@ -56,8 +56,20 @@ bool InstallShieldV3::open(const Common::FSNode &node) {
return read();
}
bool InstallShieldV3::open(Common::SeekableReadStream *stream) {
close();
if (stream == nullptr)
return false;
_stream = stream;
return read();
}
void InstallShieldV3::close() {
delete _stream; _stream = nullptr;
delete _stream;
_stream = nullptr;
_map.clear();
}

View File

@ -39,6 +39,7 @@ public:
bool open(const Common::String &filename);
bool open(const Common::FSNode &node);
bool open(Common::SeekableReadStream *stream);
void close();
bool isOpen() const { return _stream != nullptr; }