mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Emscripten port
This commit is contained in:
@@ -100,6 +100,8 @@ namespace PortabilityLayer
|
||||
if (!stream)
|
||||
return nullptr;
|
||||
|
||||
fprintf(stderr, "Composite file opened\n");
|
||||
|
||||
ZipFileProxy *zipFile = ZipFileProxy::Create(stream);
|
||||
if (!zipFile)
|
||||
{
|
||||
@@ -107,6 +109,8 @@ namespace PortabilityLayer
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Zip proxy created\n");
|
||||
|
||||
size_t metaIndex = 0;
|
||||
if (!zipFile->IndexFile("!!meta", metaIndex))
|
||||
{
|
||||
@@ -114,6 +118,8 @@ namespace PortabilityLayer
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Meta file indexed\n");
|
||||
|
||||
MacFilePropertiesSerialized mfps;
|
||||
|
||||
GpIOStream *metaStream = zipFile->OpenFile(metaIndex);
|
||||
@@ -124,6 +130,8 @@ namespace PortabilityLayer
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Meta data deserialized\n");
|
||||
|
||||
if (!metaStream->ReadExact(mfps.m_data, sizeof(mfps.m_data)))
|
||||
{
|
||||
metaStream->Close();
|
||||
@@ -152,6 +160,8 @@ namespace PortabilityLayer
|
||||
stream = nullptr;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Composite constructed\n");
|
||||
|
||||
CompositeFile *compositeFile = CompositeFileImpl::Create(dirID, filename, stream, zipFile, mfp, hasResources, hasData, hasData ? dataIndex : 0);
|
||||
if (!compositeFile)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user