mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-28 17:16:46 +00:00
add last created devices
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user