From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- .../holographic_space.c | 18 +++++++++++++----- .../windows.perception.stub/tests/perception.c | 3 +++ 2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/dlls/windows.perception.stub/holographic_space.c b/dlls/windows.perception.stub/holographic_space.c index 4640ef48c50..df30a406d37 100644 --- a/dlls/windows.perception.stub/holographic_space.c +++ b/dlls/windows.perception.stub/holographic_space.c @@ -22,6 +22,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(perception);
+static EventRegistrationToken dummy_cookie = {.value = 0xdeadbeef}; + struct holographic_space_statics { IActivationFactory IActivationFactory_iface; @@ -285,33 +287,39 @@ static HRESULT WINAPI holographic_space_get_PrimaryAdapterId( IHolographicSpace static HRESULT WINAPI holographic_space_SetDirect3D11Device( IHolographicSpace *iface, IDirect3DDevice *value ) { FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + + if (!value ) return E_INVALIDARG; + return S_OK; }
static HRESULT WINAPI holographic_space_add_CameraAdded( IHolographicSpace *iface, ITypedEventHandler_HolographicSpace_HolographicSpaceCameraAddedEventArgs *handler, EventRegistrationToken *cookie ) { FIXME( "iface %p, handler %p, cookie %p stub!\n", iface, handler, cookie ); - return E_NOTIMPL; + + *cookie = dummy_cookie; + return S_OK; }
static HRESULT WINAPI holographic_space_remove_CameraAdded( IHolographicSpace *iface, EventRegistrationToken cookie ) { FIXME( "iface %p, cookie %#I64x stub!\n", iface, cookie.value ); - return E_NOTIMPL; + return S_OK; }
static HRESULT WINAPI holographic_space_add_CameraRemoved( IHolographicSpace *iface, ITypedEventHandler_HolographicSpace_HolographicSpaceCameraRemovedEventArgs *handler, EventRegistrationToken *cookie ) { FIXME( "iface %p, handler %p, cookie %p stub!\n", iface, handler, cookie ); - return E_NOTIMPL; + + *cookie = dummy_cookie; + return S_OK; }
static HRESULT WINAPI holographic_space_remove_CameraRemoved( IHolographicSpace *iface, EventRegistrationToken cookie ) { FIXME( "iface %p, cookie %#I64x stub!\n", iface, cookie.value ); - return E_NOTIMPL; + return S_OK; }
static HRESULT WINAPI holographic_space_CreateNextFrame( IHolographicSpace *iface, IHolographicFrame **value ) diff --git a/dlls/windows.perception.stub/tests/perception.c b/dlls/windows.perception.stub/tests/perception.c index c8b6e529324..5b1aa4cfb18 100644 --- a/dlls/windows.perception.stub/tests/perception.c +++ b/dlls/windows.perception.stub/tests/perception.c @@ -238,6 +238,9 @@ static void test_HolographicSpaceStatics(void) ok( adapter_id.LowPart == 0, "got adapter_id.LowPart %u.\n", adapter_id.LowPart ); ok( adapter_id.HighPart == 0, "got adapter_id.HighPart %u.\n", adapter_id.HighPart );
+ hr = IHolographicSpace_SetDirect3D11Device( holographic_space, NULL ); + ok( hr == E_INVALIDARG, "got hr %#lx.\n", hr ); + DestroyWindow( window ); ref = IHolographicSpace_Release( holographic_space ); ok( ref == 0, "got ref %ld.\n", ref );