mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 19:50:13 +02:00
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 <dxgiformat.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4005)
|
#pragma warning(disable : 4005)
|
||||||
#include <wincodec.h>
|
#include <wincodec.h>
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory>
|
#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* _GetWIC()
|
||||||
{
|
{
|
||||||
static IWICImagingFactory* s_Factory = nullptr;
|
static IWICImagingFactory* s_Factory = nullptr;
|
||||||
@ -644,6 +648,8 @@ static IWICImagingFactory* _GetWIC()
|
|||||||
return s_Factory;
|
return s_Factory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
HRESULT DirectX::SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
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,
|
HRESULT DirectX::SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||||
_In_ ID3D11Resource* pSource,
|
_In_ ID3D11Resource* pSource,
|
||||||
_In_ REFGUID guidContainerFormat,
|
_In_ REFGUID guidContainerFormat,
|
||||||
@ -1006,3 +1014,5 @@ HRESULT DirectX::SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
|||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !WINAPI_FAMILY || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
|
||||||
|
@ -36,9 +36,13 @@ namespace DirectX
|
|||||||
_In_ ID3D11Resource* pSource,
|
_In_ ID3D11Resource* pSource,
|
||||||
_In_z_ LPCWSTR fileName );
|
_In_z_ LPCWSTR fileName );
|
||||||
|
|
||||||
|
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
|
||||||
|
|
||||||
HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||||
_In_ ID3D11Resource* pSource,
|
_In_ ID3D11Resource* pSource,
|
||||||
_In_ REFGUID guidContainerFormat,
|
_In_ REFGUID guidContainerFormat,
|
||||||
_In_z_ LPCWSTR fileName,
|
_In_z_ LPCWSTR fileName,
|
||||||
_In_opt_ const GUID* targetFormat = nullptr );
|
_In_opt_ const GUID* targetFormat = nullptr );
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
@ -29,6 +29,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||||
|
#error WIC is not supported on Windows Phone
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <d3d11.h>
|
#include <d3d11.h>
|
||||||
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user