Module: wine Branch: master Commit: 4e7cbb2d09686113ac36ee1e6f8a4e5e11d6a2d8 URL: https://gitlab.winehq.org/wine/wine/-/commit/4e7cbb2d09686113ac36ee1e6f8a4e5...
Author: Mohamad Al-Jaf mohamadaljaf@gmail.com Date: Fri Mar 17 01:58:39 2023 -0400
graphicscapture: Partially implement IGraphicsCaptureSessionStatics::IsSupported().
Needed to prevent VR games from crashing when the user attempts to capture the desktop.
---
dlls/graphicscapture/session.c | 6 ++++-- dlls/graphicscapture/tests/graphicscapture.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/graphicscapture/session.c b/dlls/graphicscapture/session.c index a6752d364a4..8c7aecfc793 100644 --- a/dlls/graphicscapture/session.c +++ b/dlls/graphicscapture/session.c @@ -119,8 +119,10 @@ DEFINE_IINSPECTABLE( session_statics, IGraphicsCaptureSessionStatics, struct ses
static HRESULT WINAPI session_statics_IsSupported( IGraphicsCaptureSessionStatics *iface, boolean *result ) { - FIXME( "iface %p, result %p stub!\n", iface, result ); - return E_NOTIMPL; + TRACE( "iface %p, result %p\n", iface, result ); + + *result = FALSE; + return S_OK; }
static const struct IGraphicsCaptureSessionStaticsVtbl session_statics_vtbl = diff --git a/dlls/graphicscapture/tests/graphicscapture.c b/dlls/graphicscapture/tests/graphicscapture.c index 66283fbb5d3..caac271763b 100644 --- a/dlls/graphicscapture/tests/graphicscapture.c +++ b/dlls/graphicscapture/tests/graphicscapture.c @@ -75,7 +75,7 @@ static void test_GraphicsCaptureSessionStatics(void)
res = 2; hr = IGraphicsCaptureSessionStatics_IsSupported( session_statics, &res ); - todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); todo_wine ok( res == TRUE, "got %d.\n", res );
ref = IGraphicsCaptureSessionStatics_Release( session_statics );