From 679730fc4ea42687e1b65a043d0c2673afb4ee61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Sat, 25 Jul 2020 16:24:24 -0700 Subject: [PATCH] Cleanup. --- src/dxgi.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/dxgi.cpp b/src/dxgi.cpp index b0f9b4d3c..5f9c740a7 100644 --- a/src/dxgi.cpp +++ b/src/dxgi.cpp @@ -246,12 +246,12 @@ namespace bgfx { DXGI_OUTPUT_DESC outputDesc; hr = output->GetDesc(&outputDesc); - if (SUCCEEDED(hr)) + if (SUCCEEDED(hr) ) { BX_TRACE("\tOutput #%d", jj); char deviceName[BX_COUNTOF(outputDesc.DeviceName)]; - wcstombs(deviceName, outputDesc.DeviceName, BX_COUNTOF(outputDesc.DeviceName)); + wcstombs(deviceName, outputDesc.DeviceName, BX_COUNTOF(outputDesc.DeviceName) ); BX_TRACE("\t\t DeviceName: %s", deviceName); BX_TRACE("\t\t DesktopCoordinates: %d, %d, %d, %d" , outputDesc.DesktopCoordinates.left @@ -457,22 +457,24 @@ namespace bgfx } # if BX_PLATFORM_WINRT - IInspectable *nativeWindow = reinterpret_cast(_scd.nwh); + IInspectable *nativeWindow = reinterpret_cast(_scd.nwh); ISwapChainPanelNative* swapChainPanelNative; hr = nativeWindow->QueryInterface( - __uuidof(ISwapChainPanelNative) - , (void**)&swapChainPanelNative); + __uuidof(ISwapChainPanelNative) + , (void**)&swapChainPanelNative + ); - if (!FAILED(hr)) + if (!FAILED(hr) ) { // Swap Chain Panel if (NULL != swapChainPanelNative) { hr = swapChainPanelNative->SetSwapChain(*_swapChain); - if (FAILED(hr)) + if (FAILED(hr) ) { + BX_TRACE("Failed to SetSwapChain, hr %x."); return hr; } @@ -482,15 +484,14 @@ namespace bgfx else { // Swap Chain Background Panel - ISwapChainBackgroundPanelNative* swapChainBackgroundPanelNative = NULL; hr = nativeWindow->QueryInterface( - __uuidof(ISwapChainBackgroundPanelNative) + __uuidof(ISwapChainBackgroundPanelNative) , (void**)&swapChainBackgroundPanelNative - ); + ); - if (FAILED(hr)) + if (FAILED(hr) ) { return hr; } @@ -499,8 +500,9 @@ namespace bgfx { hr = swapChainBackgroundPanelNative->SetSwapChain(*_swapChain); - if (FAILED(hr)) + if (FAILED(hr) ) { + BX_TRACE("Failed to SetSwapChain, hr %x."); return hr; }