``` Current logic is broken and does not allow releasing a factory, and creating another one. There is no reason at the moment not to have multiple factory instances. ```
That seems easy enough to fix, just move that variable into global scope and clear it on destruction. There may not be a known application that relies on it, but no reason to add todo_wine to a test when just fixing the code is easier.
``` dxcore/tests: Remove unrelated interfaces checks. ```
Why spend a patch on this? I don't think they're necessary, but they aren't really hurting anything.
``` + if (FAILED(hr = dxcore_create_adapter_list(&IID_IDXCoreAdapterList, (void **)&list))) + return hr; + + count = IDXCoreAdapterList_GetAdapterCount(list); + + for (uint32_t i = 0; i < count; ++i) + { + if (SUCCEEDED(IDXCoreAdapterList_GetAdapter(list, i, &IID_IDXCoreAdapter, (void **)&adapter))) + { + if (SUCCEEDED(IDXCoreAdapter_GetProperty(adapter, InstanceLuid, sizeof(luid), &luid))) + { + if (!memcmp(&luid, adapter_luid, sizeof(luid))) + { + hr = IDXCoreAdapter_QueryInterface(adapter, riid, out); + + IDXCoreAdapter_Release(adapter); + IDXCoreAdapterList_Release(list); + return hr; + } + } + IDXCoreAdapter_Release(adapter); + } + } ```
I guess. If it were me I'd just avoid the list and use wined3d functions directly.