mirror of https://github.com/encounter/SDL.git
Fixed d3d11 renderer creation
This commit is contained in:
parent
d9f70878f9
commit
e77cfb9a11
|
@ -770,7 +770,11 @@ D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h)
|
||||||
if (usingXAML) {
|
if (usingXAML) {
|
||||||
swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
|
swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
|
||||||
} else {
|
} else {
|
||||||
|
if (WIN_IsWindows8OrGreater()) {
|
||||||
swapChainDesc.Scaling = DXGI_SCALING_NONE;
|
swapChainDesc.Scaling = DXGI_SCALING_NONE;
|
||||||
|
} else {
|
||||||
|
swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; /* All Windows Store apps must use this SwapEffect. */
|
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; /* All Windows Store apps must use this SwapEffect. */
|
||||||
#endif
|
#endif
|
||||||
|
@ -953,6 +957,7 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer)
|
||||||
*
|
*
|
||||||
* TODO, WinRT: reexamine the docs for IDXGISwapChain1::SetRotation, see if might be available, usable, and prudent-to-call on WinPhone 8.1
|
* TODO, WinRT: reexamine the docs for IDXGISwapChain1::SetRotation, see if might be available, usable, and prudent-to-call on WinPhone 8.1
|
||||||
*/
|
*/
|
||||||
|
if (WIN_IsWindows8OrGreater()) {
|
||||||
if (data->swapEffect == DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL) {
|
if (data->swapEffect == DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL) {
|
||||||
result = IDXGISwapChain1_SetRotation(data->swapChain, data->rotation);
|
result = IDXGISwapChain1_SetRotation(data->swapChain, data->rotation);
|
||||||
if (FAILED(result)) {
|
if (FAILED(result)) {
|
||||||
|
@ -960,6 +965,7 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
result = IDXGISwapChain_GetBuffer(data->swapChain,
|
result = IDXGISwapChain_GetBuffer(data->swapChain,
|
||||||
|
|
Loading…
Reference in New Issue