From f59713882712c520f9d849f81c7a45e13725d944 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 4 Sep 2021 21:40:37 +0200 Subject: [PATCH] Cleanups --- gfx/drivers/d3d11.c | 5 +---- gfx/drivers/d3d12.c | 5 ----- menu/menu_displaylist.c | 36 ++++++++++++++++-------------------- 3 files changed, 17 insertions(+), 29 deletions(-) diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index d4ffca087b..5003ae1fba 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -1950,9 +1950,6 @@ static bool d3d11_gfx_frame( } D3D11SetRenderTargets(context, 1, &d3d11->pass[i].rt.rt_view, NULL); -#if 0 - D3D11ClearRenderTargetView(context, d3d11->pass[i].rt.rt_view, d3d11->clearcolor); -#endif D3D11SetViewports(context, 1, &d3d11->pass[i].viewport); D3D11Draw(context, 4, 0); @@ -2076,6 +2073,7 @@ static bool d3d11_gfx_frame( /* Copy over back buffer to swap chain render targets */ if(d3d11->hdr.enable) { + ID3D11ShaderResourceView* nullSRV[1] = {NULL}; D3D11SetRenderTargets(context, 1, &rtv, NULL); D3D11ClearRenderTargetView(context, rtv, d3d11->clearcolor); @@ -2104,7 +2102,6 @@ static bool d3d11_gfx_frame( D3D11Draw(context, 4, 0); - ID3D11ShaderResourceView* nullSRV[1] = {NULL}; D3D11SetPShaderResources(context, 0, 1, nullSRV); } #endif diff --git a/gfx/drivers/d3d12.c b/gfx/drivers/d3d12.c index b62898c23c..879a9c221e 100644 --- a/gfx/drivers/d3d12.c +++ b/gfx/drivers/d3d12.c @@ -1984,12 +1984,7 @@ static bool d3d12_gfx_frame( #if defined(_WIN32) && !defined(__WINRT__) win32_update_title(); #endif -#if 1 DXGIPresent(d3d12->chain.handle, sync_interval, present_flags); -#else - DXGI_PRESENT_PARAMETERS pp = { 0 }; - DXGIPresent1(d3d12->swapchain, 0, 0, &pp); -#endif /* Sync after Present for minimal delay */ d3d12_gfx_sync(d3d12); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index eb469112ff..f0abf2981d 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -6095,7 +6095,6 @@ unsigned menu_displaylist_build_list( MENU_ENUM_LABEL_VIDEO_SCALING_SETTINGS, PARSE_ACTION, false) == 0) count++; - /* if (video_driver_supports_hdr()) */ if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, MENU_ENUM_LABEL_VIDEO_HDR_SETTINGS, PARSE_ACTION, false) == 0) @@ -8011,25 +8010,22 @@ unsigned menu_displaylist_build_list( PARSE_ONLY_BOOL, false) == 0) count++; - /* if (settings->bools.video_hdr_enable) */ - { - if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, - MENU_ENUM_LABEL_VIDEO_HDR_MAX_NITS, - PARSE_ONLY_FLOAT, false) == 0) - count++; - if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, - MENU_ENUM_LABEL_VIDEO_HDR_PAPER_WHITE_NITS, - PARSE_ONLY_FLOAT, false) == 0) - count++; - if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, - MENU_ENUM_LABEL_VIDEO_HDR_CONTRAST, - PARSE_ONLY_FLOAT, false) == 0) - count++; - if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, - MENU_ENUM_LABEL_VIDEO_HDR_EXPAND_GAMUT, - PARSE_ONLY_BOOL, false) == 0) - count++; - } + if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, + MENU_ENUM_LABEL_VIDEO_HDR_MAX_NITS, + PARSE_ONLY_FLOAT, false) == 0) + count++; + if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, + MENU_ENUM_LABEL_VIDEO_HDR_PAPER_WHITE_NITS, + PARSE_ONLY_FLOAT, false) == 0) + count++; + if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, + MENU_ENUM_LABEL_VIDEO_HDR_CONTRAST, + PARSE_ONLY_FLOAT, false) == 0) + count++; + if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, + MENU_ENUM_LABEL_VIDEO_HDR_EXPAND_GAMUT, + PARSE_ONLY_BOOL, false) == 0) + count++; } } break;