File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ class CHW
126126 void UpdateViews ();
127127#endif
128128#if defined(USE_DX10) || defined(USE_DX11)
129- bool CheckFormatSupport (DXGI_FORMAT format, D3D_FORMAT_SUPPORT feature) const ;
129+ bool CheckFormatSupport (DXGI_FORMAT format, UINT feature) const ;
130130 DXGI_FORMAT SelectFormat (D3D_FORMAT_SUPPORT feature, const DXGI_FORMAT formats[], size_t count) const ;
131131 virtual void OnAppActivate ();
132132 virtual void OnAppDeactivate ();
Original file line number Diff line number Diff line change @@ -260,11 +260,16 @@ void CHW::Reset()
260260 UpdateViews ();
261261}
262262
263- bool CHW::CheckFormatSupport (const DXGI_FORMAT format, const D3D_FORMAT_SUPPORT feature) const
263+ bool CHW::CheckFormatSupport (const DXGI_FORMAT format, const UINT feature) const
264264{
265- UINT feature_bit = feature;
266- if (SUCCEEDED (pDevice->CheckFormatSupport (format, &feature_bit)))
267- return true ;
265+ UINT supports;
266+
267+ if (SUCCEEDED (pDevice->CheckFormatSupport (format, &supports)))
268+ {
269+ if (supports & feature)
270+ return true ;
271+ }
272+
268273 return false ;
269274}
270275
You can’t perform that action at this time.
0 commit comments