mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Updated xactengine3_7-Notification patchset
Updated to reflect upstream changse and re-enable.
This commit is contained in:
parent
0de9d1028b
commit
92ce758ac8
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "1113f42aa748d9e0a27c4663b9d8de1237f95e73"
|
||||
echo "e0d8bd3f5a7b4c8722d3632a9954f1647851f3d3"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -261,6 +261,7 @@ patch_enable_all ()
|
||||
enable_ws2_32_SIO_IDEAL_SEND_BACKLOG_QUERY="$1"
|
||||
enable_wscript_support_d_u_switches="$1"
|
||||
enable_xactengine_initial="$1"
|
||||
enable_xactengine3_7_Notification="$1"
|
||||
enable_xactengine3_7_PrepareWave="$1"
|
||||
}
|
||||
|
||||
@ -805,6 +806,9 @@ patch_enable ()
|
||||
xactengine-initial)
|
||||
enable_xactengine_initial="$2"
|
||||
;;
|
||||
xactengine3_7-Notification)
|
||||
enable_xactengine3_7_Notification="$2"
|
||||
;;
|
||||
xactengine3_7-PrepareWave)
|
||||
enable_xactengine3_7_PrepareWave="$2"
|
||||
;;
|
||||
@ -3860,6 +3864,18 @@ if test "$enable_xactengine_initial" -eq 1; then
|
||||
patch_apply xactengine-initial/0003-xactengine3_7-tests-Add-Global-settings-test.patch
|
||||
fi
|
||||
|
||||
# Patchset xactengine3_7-Notification
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#50546] xactengine3_7: Send Notification after the Wavebank is created.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/xactengine3_7/xact_dll.c
|
||||
# |
|
||||
if test "$enable_xactengine3_7_Notification" -eq 1; then
|
||||
patch_apply xactengine3_7-Notification/0002-xactengine3_7-Record-context-for-each-notications.patch
|
||||
fi
|
||||
|
||||
# Patchset xactengine3_7-PrepareWave
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,58 +1,72 @@
|
||||
From 1c50e3c6a275e0700e546586a63d2b900234a693 Mon Sep 17 00:00:00 2001
|
||||
From 96755049b6c8cddd313b9e4451b85a64410774ee Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 28 Jan 2021 12:29:42 +1100
|
||||
Date: Wed, 20 Jul 2022 10:55:43 +1000
|
||||
Subject: [PATCH] xactengine3_7: Record context for each notications
|
||||
|
||||
This helps the first lockup but starting a game causes another freeze.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49678
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/xactengine3_7/xact_dll.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
dlls/xactengine3_7/xact_dll.c | 15 ++++-----------
|
||||
1 file changed, 4 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
|
||||
index 4fd47be84db..83af1035583 100644
|
||||
index 754f488681e..66f06456d28 100644
|
||||
--- a/dlls/xactengine3_7/xact_dll.c
|
||||
+++ b/dlls/xactengine3_7/xact_dll.c
|
||||
@@ -717,6 +717,8 @@ typedef struct _XACT3EngineImpl {
|
||||
XACT_READFILE_CALLBACK pReadFile;
|
||||
@@ -83,8 +83,7 @@ typedef struct _XACT3EngineImpl {
|
||||
XACT_GETOVERLAPPEDRESULT_CALLBACK pGetOverlappedResult;
|
||||
XACT_NOTIFICATION_CALLBACK notification_callback;
|
||||
+
|
||||
|
||||
- void *wb_prepared_context;
|
||||
- void *wb_destroyed_context;
|
||||
+ void *contexts[17];
|
||||
struct wine_rb_tree wb_wrapper_lookup;
|
||||
CRITICAL_SECTION wb_wrapper_lookup_cs;
|
||||
} XACT3EngineImpl;
|
||||
@@ -935,6 +934,7 @@ static void FACTCALL fact_notification_cb(const FACTNotification *notification)
|
||||
|
||||
typedef struct wrap_readfile_struct {
|
||||
@@ -998,6 +1000,7 @@ static void send_wavebank_notification(XACT3EngineImpl *This, IXACT3WaveBank *wa
|
||||
xnotification.type = xact_notification_type_from_fact(notification->type);
|
||||
xnotification.timeStamp = notification->timeStamp;
|
||||
+ xnotification.pvContext = engine->contexts[notification->type - 1];
|
||||
|
||||
tdata->engine = This;
|
||||
tdata->note.type = XACTNOTIFICATIONTYPE_WAVEBANKPREPARED;
|
||||
+ tdata->note.pvContext = This->contexts[XACTNOTIFICATIONTYPE_WAVEBANKPREPARED - 1];
|
||||
tdata->note.wave.pWaveBank = wavebank;
|
||||
if (notification->type == XACTNOTIFICATIONTYPE_WAVEBANKPREPARED
|
||||
|| notification->type == XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED)
|
||||
@@ -952,10 +952,6 @@ static void FACTCALL fact_notification_cb(const FACTNotification *notification)
|
||||
xnotification.waveBank.pWaveBank = lookup->xact;
|
||||
}
|
||||
LeaveCriticalSection(&engine->wb_wrapper_lookup_cs);
|
||||
- if (notification->type == XACTNOTIFICATIONTYPE_WAVEBANKPREPARED)
|
||||
- xnotification.pvContext = engine->wb_prepared_context;
|
||||
- else
|
||||
- xnotification.pvContext = engine->wb_destroyed_context;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1501,12 +1497,8 @@ static HRESULT WINAPI IXACT3EngineImpl_RegisterNotification(IXACT3Engine *iface,
|
||||
|
||||
thread = CreateThread(NULL, 0, thread_notications, tdata, 0, NULL);
|
||||
@@ -1257,9 +1260,11 @@ static HRESULT WINAPI IXACT3EngineImpl_RegisterNotification(IXACT3Engine *iface,
|
||||
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
|
||||
FACTNotificationDescription fdesc;
|
||||
|
||||
- TRACE("(%p)->(%p)\n", This, pNotificationDesc);
|
||||
+ TRACE("(%p)->(%p, pvContext %p)\n", This, pNotificationDesc, pNotificationDesc->pvContext);
|
||||
TRACE("(%p)->(%p)\n", This, pNotificationDesc);
|
||||
|
||||
- if (pNotificationDesc->type == XACTNOTIFICATIONTYPE_WAVEBANKPREPARED)
|
||||
- This->wb_prepared_context = pNotificationDesc->pvContext;
|
||||
- else if (pNotificationDesc->type == XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED)
|
||||
- This->wb_destroyed_context = pNotificationDesc->pvContext;
|
||||
-
|
||||
unwrap_notificationdesc(&fdesc, pNotificationDesc);
|
||||
+
|
||||
+ This->contexts[pNotificationDesc->type - 1] = pNotificationDesc->pvContext;
|
||||
fdesc.pvContext = This;
|
||||
return FACTAudioEngine_RegisterNotification(This->fact_engine, &fdesc);
|
||||
}
|
||||
@@ -1273,6 +1278,8 @@ static HRESULT WINAPI IXACT3EngineImpl_UnRegisterNotification(IXACT3Engine *ifac
|
||||
@@ -1520,6 +1512,7 @@ static HRESULT WINAPI IXACT3EngineImpl_UnRegisterNotification(IXACT3Engine *ifac
|
||||
TRACE("(%p)->(%p)\n", This, pNotificationDesc);
|
||||
|
||||
unwrap_notificationdesc(&fdesc, pNotificationDesc);
|
||||
+
|
||||
+ This->contexts[pNotificationDesc->type - 1] = pNotificationDesc->pvContext;
|
||||
fdesc.pvContext = This;
|
||||
return FACTAudioEngine_UnRegisterNotification(This->fact_engine, &fdesc);
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
2.35.1
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
# The actual fix will involve FAudio and wine changes.
|
||||
Fixes: [50546] xactengine3_7: Send Notification after the Wavebank is created.
|
||||
Disabled: True
|
||||
|
Loading…
Reference in New Issue
Block a user