add last created devices

This commit is contained in:
cdozdil
2024-12-21 22:16:44 +03:00
parent 8bb508e0c7
commit bc0d81ed52
2 changed files with 9 additions and 0 deletions
+3
View File
@@ -285,6 +285,9 @@ public:
IFeature* CurrentFeature = nullptr;
ID3D12Device* lastCreatedD3D12Device = nullptr;
ID3D11Device* lastCreatedD3D11Device = nullptr;
bool Reload(std::filesystem::path iniPath);
bool LoadFromPath(const wchar_t* InPath);
bool SaveIni();
+6
View File
@@ -3331,6 +3331,8 @@ static HRESULT hkD3D11CreateDevice(IDXGIAdapter* pAdapter, D3D_DRIVER_TYPE Drive
LOG_FUNC_RESULT(result);
Config::Instance()->lastCreatedD3D11Device = *ppDevice;
return result;
}
@@ -3411,6 +3413,8 @@ static HRESULT hkD3D11CreateDeviceAndSwapChain(IDXGIAdapter* pAdapter, D3D_DRIVE
LOG_FUNC_RESULT(result);
Config::Instance()->lastCreatedD3D11Device = *ppDevice;
return result;
}
@@ -3481,6 +3485,8 @@ static HRESULT hkD3D12CreateDevice(IDXGIAdapter* pAdapter, D3D_FEATURE_LEVEL Min
#endif
}
Config::Instance()->lastCreatedD3D12Device = (ID3D12Device*)*ppDevice;
LOG_FUNC_RESULT(result);
return result;