From 9ea8b184aeb84357934c86872ca279144b6f4251 Mon Sep 17 00:00:00 2001 From: Tim Clem Date: Wed, 29 Sep 2021 13:13:04 -0700 Subject: [PATCH] dplayx: Map global memory anywhere if the standard address is unavailable. Signed-off-by: Tim Clem Signed-off-by: Alexandre Julliard --- 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",