mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
(D3D11+12) Allow fastforward in fullscreen
This commit is contained in:
parent
ec7e528094
commit
8584b122e1
@ -319,6 +319,7 @@ bool d3d12_init_swapchain(d3d12_video_t* d3d12,
|
||||
#else
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
|
||||
#endif
|
||||
desc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING;
|
||||
|
||||
#ifdef __WINRT__
|
||||
hr = DXGICreateSwapChainForCoreWindow(d3d12->factory, d3d12->queue.handle, corewindow, &desc, NULL, &d3d12->chain.handle);
|
||||
|
@ -679,6 +679,7 @@ static bool d3d11_init_swapchain(d3d11_video_t* d3d11,
|
||||
#else
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
|
||||
#endif
|
||||
desc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING;
|
||||
|
||||
#ifdef DEBUG
|
||||
flags |= D3D11_CREATE_DEVICE_DEBUG;
|
||||
@ -1325,6 +1326,8 @@ static bool d3d11_gfx_frame(
|
||||
D3D11RenderTargetView rtv = NULL;
|
||||
d3d11_video_t* d3d11 = (d3d11_video_t*)data;
|
||||
D3D11DeviceContext context = d3d11->context;
|
||||
bool vsync = d3d11->vsync;
|
||||
unsigned present_flags = (vsync) ? 0 : DXGI_PRESENT_ALLOW_TEARING;
|
||||
const char *stat_text = video_info->stat_text;
|
||||
unsigned video_width = video_info->width;
|
||||
unsigned video_height = video_info->height;
|
||||
@ -1337,7 +1340,7 @@ static bool d3d11_gfx_frame(
|
||||
|
||||
if (d3d11->resize_chain)
|
||||
{
|
||||
DXGIResizeBuffers(d3d11->swapChain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
|
||||
DXGIResizeBuffers(d3d11->swapChain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING);
|
||||
|
||||
d3d11->viewport.Width = video_width;
|
||||
d3d11->viewport.Height = video_height;
|
||||
@ -1663,7 +1666,7 @@ static bool d3d11_gfx_frame(
|
||||
}
|
||||
d3d11->sprites.enabled = false;
|
||||
|
||||
DXGIPresent(d3d11->swapChain, !!d3d11->vsync, 0);
|
||||
DXGIPresent(d3d11->swapChain, !!vsync, present_flags);
|
||||
Release(rtv);
|
||||
|
||||
return true;
|
||||
|
@ -1169,6 +1169,8 @@ static bool d3d12_gfx_frame(
|
||||
unsigned i;
|
||||
d3d12_texture_t* texture = NULL;
|
||||
d3d12_video_t* d3d12 = (d3d12_video_t*)data;
|
||||
bool vsync = d3d12->chain.vsync;
|
||||
unsigned present_flags = (vsync) ? 0 : DXGI_PRESENT_ALLOW_TEARING;
|
||||
const char *stat_text = video_info->stat_text;
|
||||
bool statistics_show = video_info->statistics_show;
|
||||
unsigned video_width = video_info->width;
|
||||
@ -1189,7 +1191,7 @@ static bool d3d12_gfx_frame(
|
||||
for (i = 0; i < countof(d3d12->chain.renderTargets); i++)
|
||||
Release(d3d12->chain.renderTargets[i]);
|
||||
|
||||
DXGIResizeBuffers(d3d12->chain.handle, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
|
||||
DXGIResizeBuffers(d3d12->chain.handle, 0, 0, 0, DXGI_FORMAT_UNKNOWN, DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING);
|
||||
|
||||
for (i = 0; i < countof(d3d12->chain.renderTargets); i++)
|
||||
{
|
||||
@ -1612,7 +1614,7 @@ static bool d3d12_gfx_frame(
|
||||
D3D12ExecuteGraphicsCommandLists(d3d12->queue.handle, 1, &d3d12->queue.cmd);
|
||||
|
||||
#if 1
|
||||
DXGIPresent(d3d12->chain.handle, !!d3d12->chain.vsync, 0);
|
||||
DXGIPresent(d3d12->chain.handle, !!vsync, present_flags);
|
||||
#else
|
||||
DXGI_PRESENT_PARAMETERS pp = { 0 };
|
||||
DXGIPresent1(d3d12->swapchain, 0, 0, &pp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user