Support YUY2/UYVY formats in DDS files

* These can only be supported if the proxy texture can be created
This commit is contained in:
baldurk
2019-10-28 12:03:50 +00:00
parent ec29e92abf
commit 0fe6be3ac6
3 changed files with 64 additions and 8 deletions
+9
View File
@@ -456,6 +456,12 @@ ReplayStatus IMG_CreateReplayDevice(RDCFile *rdc, IReplayDriver **driver)
*driver = new ImageViewer(proxy, filename.c_str());
if((*driver)->GetResources()[0].resourceId == ResourceId())
{
delete *driver;
return ReplayStatus::ImageUnsupported;
}
return ReplayStatus::Succeeded;
}
@@ -731,6 +737,9 @@ void ImageViewer::RefreshFile()
if(m_TextureID == ResourceId())
m_TextureID = m_Proxy->CreateProxyTexture(texDetails);
if(m_TextureID == ResourceId())
RDCERR("Couldn't create proxy texture for image file");
if(!dds)
{
m_Proxy->SetProxyTextureData(m_TextureID, 0, 0, data, datasize);