Rebase against 0aa6f8e2ea1e3f2e852bef1a07d0d1f983870150.

This commit is contained in:
Alistair Leslie-Hughes 2020-12-19 12:29:38 +11:00
parent a5a402a003
commit a8947d8016
3 changed files with 0 additions and 65 deletions

View File

@ -314,7 +314,6 @@ 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"
@ -1029,9 +1028,6 @@ patch_enable ()
winmm-Delay_Import_Depends)
enable_winmm_Delay_Import_Depends="$2"
;;
winmm-fullpath)
enable_winmm_fullpath="$2"
;;
winmm-mciSendCommandA)
enable_winmm_mciSendCommandA="$2"
;;
@ -5045,18 +5041,6 @@ if test "$enable_winmm_Delay_Import_Depends" -eq 1; then
patch_apply winmm-Delay_Import_Depends/0001-winmm-Delay-import-ole32-msacm32-to-workaround-bug-w.patch
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
fi
# Patchset winmm-mciSendCommandA
# |
# | Modified files:

View File

@ -1,48 +0,0 @@
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

View File

@ -1 +0,0 @@
Fixes: [49650] winmm: Support relative paths when option media files