mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[d3d9] Remove initial device reset outside of constructor
Allows us to funnel hresults from that to the response of CreateDevice
This commit is contained in:
parent
3b119c0be6
commit
009e772fe8
@ -37,8 +37,6 @@ namespace dxvk {
|
|||||||
D3DDEVTYPE DeviceType,
|
D3DDEVTYPE DeviceType,
|
||||||
HWND hFocusWindow,
|
HWND hFocusWindow,
|
||||||
DWORD BehaviorFlags,
|
DWORD BehaviorFlags,
|
||||||
D3DPRESENT_PARAMETERS* pPresentationParameters,
|
|
||||||
D3DDISPLAYMODEEX* pDisplayMode,
|
|
||||||
Rc<DxvkDevice> dxvkDevice)
|
Rc<DxvkDevice> dxvkDevice)
|
||||||
: m_adapter ( pAdapter )
|
: m_adapter ( pAdapter )
|
||||||
, m_dxvkDevice ( dxvkDevice )
|
, m_dxvkDevice ( dxvkDevice )
|
||||||
@ -81,10 +79,6 @@ namespace dxvk {
|
|||||||
SetupFPU();
|
SetupFPU();
|
||||||
|
|
||||||
m_availableMemory = DetermineInitialTextureMemory();
|
m_availableMemory = DetermineInitialTextureMemory();
|
||||||
|
|
||||||
HRESULT hr = InitialReset(pPresentationParameters, pDisplayMode);
|
|
||||||
if (FAILED(hr))
|
|
||||||
throw DxvkError("D3D9DeviceEx: Initial device reset failed.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,8 +110,6 @@ namespace dxvk {
|
|||||||
D3DDEVTYPE DeviceType,
|
D3DDEVTYPE DeviceType,
|
||||||
HWND hFocusWindow,
|
HWND hFocusWindow,
|
||||||
DWORD BehaviorFlags,
|
DWORD BehaviorFlags,
|
||||||
D3DPRESENT_PARAMETERS* pPresentationParameters,
|
|
||||||
D3DDISPLAYMODEEX* pDisplayMode,
|
|
||||||
Rc<DxvkDevice> dxvkDevice);
|
Rc<DxvkDevice> dxvkDevice);
|
||||||
|
|
||||||
~D3D9DeviceEx();
|
~D3D9DeviceEx();
|
||||||
|
@ -287,15 +287,20 @@ namespace dxvk {
|
|||||||
try {
|
try {
|
||||||
auto dxvkDevice = dxvkAdapter->createDevice(m_instance, clientApi, D3D9DeviceEx::GetDeviceFeatures(dxvkAdapter));
|
auto dxvkDevice = dxvkAdapter->createDevice(m_instance, clientApi, D3D9DeviceEx::GetDeviceFeatures(dxvkAdapter));
|
||||||
|
|
||||||
*ppReturnedDeviceInterface = ref(new D3D9DeviceEx(
|
auto* device = new D3D9DeviceEx(
|
||||||
this,
|
this,
|
||||||
adapter,
|
adapter,
|
||||||
DeviceType,
|
DeviceType,
|
||||||
hFocusWindow,
|
hFocusWindow,
|
||||||
BehaviorFlags,
|
BehaviorFlags,
|
||||||
pPresentationParameters,
|
dxvkDevice);
|
||||||
pFullscreenDisplayMode,
|
|
||||||
dxvkDevice));
|
HRESULT hr = device->InitialReset(pPresentationParameters, pFullscreenDisplayMode);
|
||||||
|
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
*ppReturnedDeviceInterface = ref(device);
|
||||||
}
|
}
|
||||||
catch (const DxvkError& e) {
|
catch (const DxvkError& e) {
|
||||||
Logger::err(e.message());
|
Logger::err(e.message());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user