Tim Clem : dplayx: Map global memory anywhere if the standard address is unavailable.
Alexandre Julliard
julliard at winehq.org
Mon Oct 4 15:42:19 CDT 2021
Module: wine
Branch: master
Commit: 9ea8b184aeb84357934c86872ca279144b6f4251
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9ea8b184aeb84357934c86872ca279144b6f4251
Author: Tim Clem <tclem at codeweavers.com>
Date: Wed Sep 29 13:13:04 2021 -0700
dplayx: Map global memory anywhere if the standard address is unavailable.
Signed-off-by: Tim Clem <tclem at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dplayx/dplayx_global.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/dplayx/dplayx_global.c b/dlls/dplayx/dplayx_global.c
index a544cd2196e..957f7cf46f5 100644
--- a/dlls/dplayx/dplayx_global.c
+++ b/dlls/dplayx/dplayx_global.c
@@ -418,6 +418,15 @@ BOOL DPLAYX_ConstructData(void)
FILE_MAP_WRITE,
0, 0, 0, lpDesiredMemoryMapStart );
+ if( lpSharedStaticData == NULL && GetLastError() == ERROR_INVALID_ADDRESS )
+ {
+ /* We couldn't map the data where we wanted. Try again, allowing any
+ * location. */
+ lpSharedStaticData = MapViewOfFile( hDplayxSharedMem,
+ FILE_MAP_WRITE,
+ 0, 0, 0 );
+ }
+
if( lpSharedStaticData == NULL )
{
ERR( ": unable to map static data into process memory space (%d)\n",
More information about the wine-cvs
mailing list