diff --git a/plugins/GSdx/GSTextureSW.cpp b/plugins/GSdx/GSTextureSW.cpp index 6655973c4b..f6c63bf6f8 100644 --- a/plugins/GSdx/GSTextureSW.cpp +++ b/plugins/GSdx/GSTextureSW.cpp @@ -63,8 +63,6 @@ bool GSTextureSW::Update(const GSVector4i& r, const void* data, int pitch) bool GSTextureSW::Map(GSMap& m, const GSVector4i* r) { - HRESULT hr; - if(m_data != NULL && r->left >= 0 && r->right <= m_size.x && r->top >= 0 && r->bottom <= m_size.y) { if(!_interlockedbittestandset(&m_mapped, 0)) @@ -111,6 +109,8 @@ struct BITMAPINFOHEADER uint32 biClrUsed; uint32 biClrImportant; }; + +#define BI_RGB 0 #pragma pack(pop) @@ -126,19 +126,23 @@ bool GSTextureSW::Save(const string& fn, bool dds) memset(&bih, 0, sizeof(bih)); - bih.biSize = sizeof(bih); - bih.biWidth = m_size.x; - bih.biHeight = m_size.y; - bih.biPlanes = 1; - bih.biBitCount = 32; - bih.biCompression = BI_RGB; - bih.biSizeImage = m_size.x * m_size.y << 2; + bih.biSize = sizeof(bih); + bih.biWidth = m_size.x; + bih.biHeight = m_size.y; + bih.biPlanes = 1; + bih.biBitCount = 32; + bih.biCompression = BI_RGB; + bih.biSizeImage = m_size.x * m_size.y << 2; BITMAPFILEHEADER bfh; - memset(&bfh, 0, sizeof(bfh)); - - bfh.bfType = 'MB'; + memset(&bfh, 0, sizeof(bfh)); + + uint8* bfType = (uint8*)bfh.bfType; + + // bfh.bfType = 'MB'; + bfType[0] = 0x42; + bfType[1] = 0x4d; bfh.bfOffBits = sizeof(bfh) + sizeof(bih); bfh.bfSize = bfh.bfOffBits + bih.biSizeImage; bfh.bfReserved1 = bfh.bfReserved2 = 0; diff --git a/plugins/GSdx/GSdx.gcc.cbp b/plugins/GSdx/GSdx.gcc.cbp index b6f68b3795..dccbfca9eb 100644 --- a/plugins/GSdx/GSdx.gcc.cbp +++ b/plugins/GSdx/GSdx.gcc.cbp @@ -82,6 +82,8 @@ + + @@ -124,6 +126,8 @@ + + diff --git a/plugins/GSdx/GSdx.icc.cbp b/plugins/GSdx/GSdx.icc.cbp index 917e64f02b..b1f629bb50 100644 --- a/plugins/GSdx/GSdx.icc.cbp +++ b/plugins/GSdx/GSdx.icc.cbp @@ -13,6 +13,10 @@