wine-nine-standalone icon indicating copy to clipboard operation
wine-nine-standalone copied to clipboard

AdPDDS (Ordenador Texture Optimizer) fail create a present_group without windows focus

Open llde opened this issue 4 years ago • 2 comments

AdPDDS.exe (from Ordenador texture optimizer) fails while creating a present group without focus window. Trace: trace:d3d9nine:Direct3DCreate9 sdk_version 0x20. trace:d3d9nine:common_get_registry_string Getting string key 'ModulePath' at 'HKCU\Software\Wine\Direct3DNine' trace:d3d9nine:common_get_registry_string Failed to open path 'HKCU\Software\Wine\Direct3DNine' trace:d3d9nine:open_d3dadapter Trying to load '/usr/lib32/d3d/d3dadapter9.so.1' trace:d3d9nine:open_d3dadapter Loaded '/usr/lib32/d3d/d3dadapter9.so.1' trace:d3d9nine:present_has_d3dadapter d3dadapter9 version: 0.2 trace:d3d9nine:PRESENTCheckExtension PRESENT v1.0 found, v1.0 requested trace:d3d9nine:backend_probe dpy=0x7cc04660 trace:d3d9nine:dri3_probe DRI3 v1.0 found, v1.0 requested trace:d3d9nine:backend_create dpy=0x7cc04660 screen=0 trace:d3d9nine:dri3_probe DRI3 v1.0 found, v1.0 requested trace:d3d9nine:backend_create Active backend: dri3 trace:d3d9nine:present_create_adapter9 Created ID3DAdapter9 with fd 21 Native Direct3D 9 v0.6.0.360-devel is active. For more information visit https://github.com/iXit/wine-nine-standalone trace:d3d9nine:get_current_mode current mode 0 (1920x1080x32) trace:d3d9nine:present_create_present_group Active present version: v1.4 err:d3d9nine:present_create No focus HWND specified for presentation backend.

removing the return InvalidCall allow the program to start and work

llde avatar Apr 03 '20 20:04 llde

Hm, I'm hesitating to remove that check, that doesn't look right. @axeldavy any comments?

dhewg avatar Aug 15 '20 04:08 dhewg

According to the documentation, it is forbidden to have either both parameters set to NULL, thus the check would be right: hFocusWindow of https://docs.microsoft.com/en-us/windows/win32/api/d3d9/nf-d3d9-idirect3d9-createdevice hDeviceWindow of https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dpresent-parameters

However it might be possible that the runtime is fine if windowed and setting both to null, but using a non-null window for hDestWindowOverride of https://docs.microsoft.com/en-us/windows/win32/api/d3d9/nf-d3d9-idirect3ddevice9-present. Or maybe if the app has called Reset() before presenting for the first time, but with correct parameters this time. I'm not sure how to fix this bug. A workaround can indeed to stop returning error but warn instead of invalid behaviour. I doubt any apps rely on failures here (though you never know).

axeldavy avatar Aug 15 '20 10:08 axeldavy