diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-07-08 17:00:43 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-07-08 17:00:43 +0100 |
commit | a01a4b5ad7dfddd26deb1b93d9dffc684ba52ba7 (patch) | |
tree | e17c713523634e6c0c56f68f268d0bbd31fb7ebc /helpers | |
parent | 254fdf58691e2e1e82117ec9a87ff06b700b09c2 (diff) |
d3dtrace: Ensure we fallback to height*pitch for unknown/unexpected formats.
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/d3d8size.hpp | 2 | ||||
-rw-r--r-- | helpers/d3d9size.hpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/helpers/d3d8size.hpp b/helpers/d3d8size.hpp index d263e99f..21c53464 100644 --- a/helpers/d3d8size.hpp +++ b/helpers/d3d8size.hpp @@ -127,6 +127,8 @@ _getFormatSize(D3DFORMAT Format, size_t & BlockSize, UINT & BlockWidth, UINT & B default: os::log("apitrace: warning: %s: unknown D3DFMT %u\n", __FUNCTION__, Format); + BlockWidth = 0; + BlockHeight = 0; break; } } diff --git a/helpers/d3d9size.hpp b/helpers/d3d9size.hpp index 66040cb5..29b6fb1e 100644 --- a/helpers/d3d9size.hpp +++ b/helpers/d3d9size.hpp @@ -181,6 +181,8 @@ _getFormatSize(D3DFORMAT Format, size_t & BlockSize, UINT & BlockWidth, UINT & B default: os::log("apitrace: warning: %s: unknown D3DFMT %u\n", __FUNCTION__, Format); + BlockWidth = 0; + BlockHeight = 0; break; } } |