From 399879d07ef911e58fe5fddcd9788f9e1990e192 Mon Sep 17 00:00:00 2001 From: Sven Arvidsson Date: Mon, 19 Feb 2024 23:39:38 +0000 Subject: [PATCH] quartz: HACK: Return success from SetTimeFormat for SWAT 3. SWAT 3 crashes on launch requesting the unimplemented TIME_FORMAT_FRAME format but will launch and play videos with the default time format. --- dlls/quartz/filtergraph.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index ef8d27ff5c8..383450aa162 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2223,6 +2223,7 @@ static HRESULT WINAPI MediaSeeking_IsUsingTimeFormat(IMediaSeeking *iface, const static HRESULT WINAPI MediaSeeking_SetTimeFormat(IMediaSeeking *iface, const GUID *pFormat) { struct filter_graph *This = impl_from_IMediaSeeking(iface); + const char *sgi; if (!pFormat) return E_POINTER; @@ -2232,6 +2233,11 @@ static HRESULT WINAPI MediaSeeking_SetTimeFormat(IMediaSeeking *iface, const GUI if (!IsEqualGUID(&TIME_FORMAT_MEDIA_TIME, pFormat)) { FIXME("Unhandled time format %s\n", debugstr_guid(pFormat)); + + /* SWAT 3 video fix */ + if ((sgi = getenv("SteamGameId")) && !strcmp(sgi, "560370")) + return S_OK; + return E_INVALIDARG; }