fixed incorrect D3D11 swap chain parameter

This commit is contained in:
Noel Berry 2021-03-20 22:23:34 -07:00
parent 4351d77f73
commit d388931dd3
2 changed files with 5 additions and 3 deletions

View File

@ -5,14 +5,18 @@
using namespace Blah;
#ifdef __CLANG__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-function"
#endif
#define STBTT_STATIC
#define STB_TRUETYPE_IMPLEMENTATION
#include "../third_party/stb_truetype.h"
#ifdef __CLANG__
#pragma clang diagnostic pop
#endif
namespace
{

View File

@ -699,7 +699,7 @@ namespace Blah
state.last_size = Point(App::draw_width(), App::draw_height());
// Define Swap Chain
DXGI_SWAP_CHAIN_DESC desc;
DXGI_SWAP_CHAIN_DESC desc = {};
desc.BufferDesc.RefreshRate.Numerator = 0;
desc.BufferDesc.RefreshRate.Denominator = 1;
desc.BufferDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
@ -709,8 +709,6 @@ namespace Blah
desc.BufferCount = 1;
desc.OutputWindow = (HWND)PlatformBackend::d3d11_get_hwnd();
desc.Windowed = true;
desc.Flags = 0;
desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
// Creation Flags
UINT flags = D3D11_CREATE_DEVICE_SINGLETHREADED;