Updated WICTextureLoader and ScreenGrab with Windows Phone 8 guards
This commit is contained in:
parent
42e9ba96a3
commit
0ef4a78e4a
@ -28,10 +28,12 @@
|
||||
#include <dxgiformat.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4005)
|
||||
#include <wincodec.h>
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -620,6 +622,8 @@ static HRESULT CaptureTexture( _In_ ID3D11DeviceContext* pContext,
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
|
||||
|
||||
static IWICImagingFactory* _GetWIC()
|
||||
{
|
||||
static IWICImagingFactory* s_Factory = nullptr;
|
||||
@ -644,6 +648,8 @@ static IWICImagingFactory* _GetWIC()
|
||||
return s_Factory;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
HRESULT DirectX::SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||
@ -793,6 +799,8 @@ HRESULT DirectX::SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
|
||||
|
||||
HRESULT DirectX::SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||
_In_ ID3D11Resource* pSource,
|
||||
_In_ REFGUID guidContainerFormat,
|
||||
@ -1006,3 +1014,5 @@ HRESULT DirectX::SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif // !WINAPI_FAMILY || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
|
||||
|
@ -36,9 +36,13 @@ namespace DirectX
|
||||
_In_ ID3D11Resource* pSource,
|
||||
_In_z_ LPCWSTR fileName );
|
||||
|
||||
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
|
||||
|
||||
HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||
_In_ ID3D11Resource* pSource,
|
||||
_In_ REFGUID guidContainerFormat,
|
||||
_In_z_ LPCWSTR fileName,
|
||||
_In_opt_ const GUID* targetFormat = nullptr );
|
||||
|
||||
#endif
|
||||
}
|
@ -29,6 +29,10 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#error WIC is not supported on Windows Phone
|
||||
#endif
|
||||
|
||||
#include <d3d11.h>
|
||||
|
||||
#pragma warning(push)
|
||||
|
Loading…
Reference in New Issue
Block a user