From 18f487a5e42ec16976bba01066500c2b455a5939 Mon Sep 17 00:00:00 2001 From: Danilo Date: Thu, 14 Nov 2024 21:22:52 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=B5es=20em=20GraphicsDevice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/xna-dx/implementations.hpp | 3 ++- sources/framework-dx/device.cpp | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/xna-dx/implementations.hpp b/includes/xna-dx/implementations.hpp index 7c0f302..a049b13 100644 --- a/includes/xna-dx/implementations.hpp +++ b/includes/xna-dx/implementations.hpp @@ -31,7 +31,8 @@ namespace xna { std::shared_ptr RenderTarget2D; intptr_t WindowHandle{ 0 }; - inline static constexpr D3D_FEATURE_LEVEL FeatureLevels[7] = + static constexpr int FeatureLevelCount = 7; + inline static constexpr D3D_FEATURE_LEVEL FeatureLevels[FeatureLevelCount] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, diff --git a/sources/framework-dx/device.cpp b/sources/framework-dx/device.cpp index 9c344ca..20b30fa 100644 --- a/sources/framework-dx/device.cpp +++ b/sources/framework-dx/device.cpp @@ -14,7 +14,6 @@ namespace xna { #if _DEBUG createDeviceFlags = D3D11_CREATE_DEVICE_FLAG::D3D11_CREATE_DEVICE_DEBUG; #endif - const auto& pAdapter = GraphicsAdapter::UseNullDevice() ? NULL : currentAdapter.Implementation->Adapter.Get(); // @@ -39,7 +38,7 @@ namespace xna { //_In_reads_opt_( FeatureLevels ) CONST D3D_FEATURE_LEVEL* pFeatureLevels, FeatureLevels, //UINT FeatureLevels, - 7, + static_cast(FeatureLevelCount), //UINT SDKVersion, D3D11_SDK_VERSION, //_COM_Outptr_opt_ ID3D11Device** ppDevice