Refused interfaces are logged: XGameRuntime objects and DirectStorage

A title asking for an interface version XCL does not know got E_NOINTERFACE silently and
asserted; the IID and the class are in the log now (as GameInput's and D3D12's already were).
This commit is contained in:
Guyliano Buyssens
2026-11-23 15:02:33 +00:00
parent 956a476bf7
commit b8a7794a9e
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -170,6 +170,14 @@ unsafe fn query(p: *mut c_void, own: &GUID, riid: *const GUID, out: *mut *mut c_
return S_OK;
}
*out = std::ptr::null_mut();
// a newer DirectStorage interface version a title asks for: named, so its assert has a cause
if !riid.is_null() {
let (r, o) = (&*riid, own);
crate::xlog_warn!(
"DirectStorage: QueryInterface({:08x}-{:04x}-{:04x}-{:02x?}) on the object of {:08x}-{:04x}-{:04x} refused (E_NOINTERFACE)",
r.data1, r.data2, r.data3, r.data4, o.data1, o.data2, o.data3
);
}
E_NOINTERFACE
}
+2
View File
@@ -372,6 +372,8 @@ unsafe extern "system" fn query_interface(this: *const Obj, iid: *const Guid, ou
return S_OK;
}
*out = std::ptr::null_mut();
// a title asserting on this (a newer interface version of the class?) ends without a trace otherwise
crate::xlog_warn!("XGameRuntime: {} QueryInterface({}) refused (E_NOINTERFACE) – an interface version XCL's GDK table does not know?", f.name, *iid);
E_NOINTERFACE
}