mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added winmm-fullpath patchset
This commit is contained in:
parent
b71d588d78
commit
90d57326b5
@ -320,6 +320,7 @@ patch_enable_all ()
|
||||
enable_winex11_drv_mouse_coorrds="$1"
|
||||
enable_wininet_Cleanup="$1"
|
||||
enable_winmm_Delay_Import_Depends="$1"
|
||||
enable_winmm_fullpath="$1"
|
||||
enable_winmm_mciSendCommandA="$1"
|
||||
enable_wintab32_improvements="$1"
|
||||
enable_wintrust_WTHelperGetProvCertFromChain="$1"
|
||||
@ -1050,6 +1051,9 @@ patch_enable ()
|
||||
winmm-Delay_Import_Depends)
|
||||
enable_winmm_Delay_Import_Depends="$2"
|
||||
;;
|
||||
winmm-fullpath)
|
||||
enable_winmm_fullpath="$2"
|
||||
;;
|
||||
winmm-mciSendCommandA)
|
||||
enable_winmm_mciSendCommandA="$2"
|
||||
;;
|
||||
@ -6125,6 +6129,21 @@ if test "$enable_winmm_Delay_Import_Depends" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winmm-fullpath
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#49650] winmm: Support relative paths when option media files
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/winmm/mmio.c
|
||||
# |
|
||||
if test "$enable_winmm_fullpath" -eq 1; then
|
||||
patch_apply winmm-fullpath/0001-winmm-Pass-a-fullpath-to-CreateFileA.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "winmm: Pass a fullpath to CreateFileA.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winmm-mciSendCommandA
|
||||
# |
|
||||
# | Modified files:
|
||||
|
@ -0,0 +1,48 @@
|
||||
From 48be62052066fd376cc5284ef0539f0ff4d6ba76 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 3 Aug 2020 12:02:13 +1000
|
||||
Subject: [PATCH] winmm: Pass a fullpath to CreateFileA
|
||||
|
||||
---
|
||||
dlls/winmm/mmio.c | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c
|
||||
index 48bbd3ed48d..a3e2650f50a 100644
|
||||
--- a/dlls/winmm/mmio.c
|
||||
+++ b/dlls/winmm/mmio.c
|
||||
@@ -52,6 +52,9 @@ static WINE_MMIO *MMIOList;
|
||||
static HANDLE create_file_OF( LPCSTR path, INT mode )
|
||||
{
|
||||
DWORD access, sharing, creation;
|
||||
+ HANDLE ret;
|
||||
+ char *fullpath = NULL;
|
||||
+ DWORD len;
|
||||
|
||||
if (mode & OF_CREATE)
|
||||
{
|
||||
@@ -79,7 +82,20 @@ static HANDLE create_file_OF( LPCSTR path, INT mode )
|
||||
case OF_SHARE_COMPAT:
|
||||
default: sharing = FILE_SHARE_READ | FILE_SHARE_WRITE; break;
|
||||
}
|
||||
- return CreateFileA( path, access, sharing, NULL, creation, FILE_ATTRIBUTE_NORMAL, 0 );
|
||||
+
|
||||
+ len = SearchPathA( NULL, path, NULL, 0, fullpath, NULL );
|
||||
+ if (!len)
|
||||
+ return CreateFileA( path, access, sharing, NULL, creation, FILE_ATTRIBUTE_NORMAL, 0 );
|
||||
+
|
||||
+ fullpath = HeapAlloc(GetProcessHeap(), 0, len);
|
||||
+ if (!fullpath)
|
||||
+ return INVALID_HANDLE_VALUE;
|
||||
+
|
||||
+ SearchPathA( NULL, path, NULL, len, fullpath, NULL );
|
||||
+ ret = CreateFileA( fullpath, access, sharing, NULL, creation, FILE_ATTRIBUTE_NORMAL, 0 );
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, fullpath);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
--
|
||||
2.27.0
|
||||
|
1
patches/winmm-fullpath/definition
Normal file
1
patches/winmm-fullpath/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [49650] winmm: Support relative paths when option media files
|
Loading…
Reference in New Issue
Block a user