Rebase against f820c0942854c14fcd063c83225af03e73286334.

[dinput-DIPROP_USERNAME]
Removed patch to implement dinput device property DIPROP_USERNAME (accepted
upstream).

[kernel32-CreateFileA]
Removed patch to check for invalid filename pointers in CreateFileA in Win 9x
mode (accepted upstream).

[kernel32-ERROR_DLL_NOT_FOUND]
Removed patch to set ERROR_DLL_NOT_FOUND as error code for Win 9X instead of
ERROR_MOD_NOT_FOUND in load_library (accepted upstream).

[kernel32-GetOverlappedResult]
Removed patch to fix handling of GetOverlappedResult when status remains
STATUS_PENDING (accepted upstream).

[setupapi-SetupDiSetDeviceInstallParamsW]
Removed patch to add stub for setupapi.SetupDiSetDeviceInstallParamsW
(accepted upstream).

[user32-EnumDisplayMonitors]
Removed patch to set %ecx to address of rect in EnumDisplayMonitors callback
(accepted upstream).
This commit is contained in:
Sebastian Lackner 2016-04-01 00:35:55 +02:00
parent 9d68d56c29
commit 9527830afa
15 changed files with 18 additions and 548 deletions

View File

@ -1,177 +0,0 @@
From 4eb926239cec9c6dfa489056bb30d698039926a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernhardu@vr-web.de>
Date: Tue, 24 Nov 2015 21:13:50 +0100
Subject: dinput: Implement device property DIPROP_USERNAME.
https://bugs.winehq.org/show_bug.cgi?id=39667
Probably same issue as in https://bugs.winehq.org/show_bug.cgi?id=12432 .
(Attached backtrace seems equal.)
Steps to reproduce:
- start launcher
- "Configure Controller"
- leave dialog with "Cancel"
- crash
MotoGP 3 demo launcher uses ConfigureDevices for the key mapping.
This seems because the result of a GetProperty(DIPROP_USERNAME) is used
without checking.
---
dlls/dinput/device.c | 39 +++++++++++++++++++++++++++++++++++++++
dlls/dinput/device_private.h | 1 +
dlls/dinput8/tests/device.c | 29 +++++++++++++++++++++++++++--
3 files changed, 67 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index e525f01..41fb2c4 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -778,11 +778,13 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, LPCDIDATAFORMAT df)
{
+ static const WCHAR emptyW[] = { 0 };
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
DIDATAFORMAT data_format;
DIOBJECTDATAFORMAT *obj_df = NULL;
DIPROPDWORD dp;
DIPROPRANGE dpr;
+ DIPROPSTRING dps;
WCHAR username[MAX_PATH];
DWORD username_size = MAX_PATH;
int i, action = 0, num_actions = 0;
@@ -863,6 +865,13 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
else
lstrcpynW(username, lpszUserName, MAX_PATH);
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ lstrcpynW(dps.wsz, (dwFlags & DIDSAM_NOUSER) ? emptyW : username, sizeof(dps.wsz)/sizeof(WCHAR));
+ IDirectInputDevice8_SetProperty(iface, DIPROP_USERNAME, &dps.diph);
+
/* Save the settings to disk */
save_mapping_settings(iface, lpdiaf, username);
@@ -1100,6 +1109,9 @@ ULONG WINAPI IDirectInputDevice2WImpl_Release(LPDIRECTINPUTDEVICE8W iface)
/* Free action mapping */
HeapFree(GetProcessHeap(), 0, This->action_map);
+ /* Free username */
+ HeapFree(GetProcessHeap(), 0, This->username);
+
EnterCriticalSection( &This->dinput->crit );
list_remove( &This->entry );
LeaveCriticalSection( &This->dinput->crit );
@@ -1251,6 +1263,17 @@ HRESULT WINAPI IDirectInputDevice2WImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface,
TRACE("buffersize = %d\n", pd->dwData);
break;
}
+ case (DWORD_PTR) DIPROP_USERNAME:
+ {
+ LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph;
+
+ if (pdiph->dwSize != sizeof(DIPROPSTRING)) return DIERR_INVALIDPARAM;
+
+ ps->wsz[0] = 0;
+ if (This->username)
+ lstrcpynW(ps->wsz, This->username, sizeof(ps->wsz)/sizeof(WCHAR));
+ break;
+ }
case (DWORD_PTR) DIPROP_VIDPID:
FIXME("DIPROP_VIDPID not implemented\n");
return DIERR_UNSUPPORTED;
@@ -1324,6 +1347,22 @@ HRESULT WINAPI IDirectInputDevice2WImpl_SetProperty(
LeaveCriticalSection(&This->crit);
break;
}
+ case (DWORD_PTR) DIPROP_USERNAME:
+ {
+ LPCDIPROPSTRING ps = (LPCDIPROPSTRING)pdiph;
+
+ if (pdiph->dwSize != sizeof(DIPROPSTRING)) return DIERR_INVALIDPARAM;
+
+ if (!This->username)
+ This->username = HeapAlloc(GetProcessHeap(), 0, sizeof(ps->wsz));
+ if (!This->username)
+ return DIERR_OUTOFMEMORY;
+
+ This->username[0] = 0;
+ if (ps->wsz)
+ lstrcpynW(This->username, ps->wsz, sizeof(ps->wsz)/sizeof(WCHAR));
+ break;
+ }
default:
WARN("Unknown property %s\n", debugstr_guid(rguid));
return DIERR_UNSUPPORTED;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index 52bbec4..44fa46a 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -81,6 +81,7 @@ struct IDirectInputDeviceImpl
/* Action mapping */
int num_actions; /* number of actions mapped */
ActionMap *action_map; /* array of mappings */
+ WCHAR *username; /* set by 'SetActionMap' */
};
extern BOOL get_app_key(HKEY*, HKEY*) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 6495559..b5e27ad 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -223,8 +223,8 @@ static BOOL CALLBACK enumeration_callback(const DIDEVICEINSTANCEA *lpddi, IDirec
dps.wsz[0] = '\0';
hr = IDirectInputDevice_GetProperty(lpdid, DIPROP_USERNAME, &dps.diph);
- todo_wine ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
- todo_wine ok (!lstrcmpW(usernameW, dps.wsz), "Username not set correctly expected=%s, got=%s\n", wine_dbgstr_wn(usernameW, -1), wine_dbgstr_wn(dps.wsz, -1));
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (!lstrcmpW(usernameW, dps.wsz), "Username not set correctly expected=%s, got=%s\n", wine_dbgstr_wn(usernameW, -1), wine_dbgstr_wn(dps.wsz, -1));
/* Test buffer size */
memset(&dp, 0, sizeof(dp));
@@ -275,6 +275,7 @@ static void test_action_mapping(void)
HINSTANCE hinst = GetModuleHandleA(NULL);
IDirectInput8A *pDI = NULL;
DIACTIONFORMATA af;
+ DIPROPSTRING dps;
struct enum_data data = {pDI, &af, NULL, NULL, NULL, 0};
HWND hwnd;
@@ -342,6 +343,30 @@ static void test_action_mapping(void)
af.dwDataSize = 4 * sizeof(actionMapping) / sizeof(actionMapping[0]);
af.dwNumActions = sizeof(actionMapping) / sizeof(actionMapping[0]);
+
+ /* test DIDSAM_NOUSER */
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ dps.wsz[0] = '\0';
+
+ hr = IDirectInputDevice_GetProperty(data.keyboard, DIPROP_USERNAME, &dps.diph);
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (dps.wsz[0] != 0, "Expected any username, got=%s\n", wine_dbgstr_wn(dps.wsz, -1));
+
+ hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, DIDSAM_NOUSER);
+ ok (SUCCEEDED(hr), "SetActionMap failed hr=%08x\n", hr);
+
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ dps.wsz[0] = '\0';
+
+ hr = IDirectInputDevice_GetProperty(data.keyboard, DIPROP_USERNAME, &dps.diph);
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (dps.wsz[0] == 0, "Expected empty username, got=%s\n", wine_dbgstr_wn(dps.wsz, -1));
}
if (data.mouse != NULL)
--
2.6.2

View File

@ -1 +0,0 @@
Fixes: [39667] Implement dinput device property DIPROP_USERNAME

View File

@ -1,31 +0,0 @@
From db905292a144241f781c451d1e72f8992abbf97a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 2 Mar 2016 04:24:35 +0100
Subject: kernel32: Check for invalid filename pointers in CreateFileA in Win
9X mode.
The demo version of Test Drive 5 loops through a list of filenames and opens
them using CreateFileA. The stop condition is not correct and the game reads
past the end of the array and therefore passes several invalid pointers to
the CreateFileA API. Windows 98 catches those invalid pointers and the game
can load sucessfully. This commit adds the same behavior when setting the
Windows version to 9X.
---
dlls/kernel32/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index b6dba6a..750a8ac 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -1629,6 +1629,7 @@ HANDLE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
{
WCHAR *nameW;
+ if ((GetVersion() & 0x80000000) && IsBadStringPtrA(filename, -1)) return INVALID_HANDLE_VALUE;
if (!(nameW = FILE_name_AtoW( filename, FALSE ))) return INVALID_HANDLE_VALUE;
return CreateFileW( nameW, access, sharing, sa, creation, attributes, template );
}
--
2.7.1

View File

@ -1 +0,0 @@
Fixes: Check for invalid filename pointers in CreateFileA in Win 9x mode

View File

@ -1,29 +0,0 @@
From 9d075c0f5c958becf8fe661b8c2877115501f044 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 1 Mar 2016 20:11:57 +0100
Subject: kernel32: Set ERROR_DLL_NOT_FOUND as error code for Win 9X instead of
ERROR_MOD_NOT_FOUND.
---
dlls/kernel32/module.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index dac66c1..badfe1d 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -948,7 +948,10 @@ static HMODULE load_library( const UNICODE_STRING *libname, DWORD flags )
if (nts != STATUS_SUCCESS)
{
hModule = 0;
- SetLastError( RtlNtStatusToDosError( nts ) );
+ if (nts == STATUS_DLL_NOT_FOUND && (GetVersion() & 0x80000000))
+ SetLastError( ERROR_DLL_NOT_FOUND );
+ else
+ SetLastError( RtlNtStatusToDosError( nts ) );
}
done:
HeapFree( GetProcessHeap(), 0, load_path );
--
2.7.1

View File

@ -1 +0,0 @@
Fixes: Set ERROR_DLL_NOT_FOUND as error code for Win 9X instead of ERROR_MOD_NOT_FOUND in load_library

View File

@ -1,48 +0,0 @@
From d424317603a8ddce1475af26071374642edba457 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 13 Mar 2016 07:25:01 +0100
Subject: kernel32: Fix handling of GetOverlappedResult when status remains
STATUS_PENDING.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Spotted by Michael Müller.
---
dlls/kernel32/file.c | 2 ++
dlls/kernel32/tests/file.c | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index b6dba6a..a518e08 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -625,7 +625,9 @@ BOOL WINAPI GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped,
if (WaitForSingleObject( lpOverlapped->hEvent ? lpOverlapped->hEvent : hFile,
INFINITE ) == WAIT_FAILED)
return FALSE;
+
status = lpOverlapped->Internal;
+ if (status == STATUS_PENDING) status = STATUS_SUCCESS;
}
*lpTransferred = lpOverlapped->InternalHigh;
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
index 8353c21..a066692 100644
--- a/dlls/kernel32/tests/file.c
+++ b/dlls/kernel32/tests/file.c
@@ -3361,6 +3361,11 @@ static void test_overlapped(void)
"wrong error %u\n", GetLastError() );
ok( r == FALSE, "should return false\n");
+ r = GetOverlappedResult( 0, &ov, &result, TRUE );
+ ok( r == TRUE, "should return TRUE\n" );
+ ok( result == 0xabcd, "wrong result %u\n", result );
+ ok( ov.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", ov.Internal );
+
ResetEvent( ov.hEvent );
SetLastError( 0xb00 );
--
2.7.1

View File

@ -1 +0,0 @@
Fixes: Fix handling of GetOverlappedResult when status remains STATUS_PENDING

View File

@ -1,44 +0,0 @@
From a3e9e92ee5c436b3704b505ae4ea4cc076526b0e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 31 Oct 2015 02:41:47 +0100
Subject: ntdll: Use close_handle instead of NtClose for internal memory
management functions.
---
dlls/ntdll/virtual.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index f30d94a..54c4cf4 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1279,7 +1279,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
error:
if (view) delete_view( view );
server_leave_uninterrupted_section( &csVirtual, &sigset );
- if (dup_mapping) NtClose( dup_mapping );
+ if (dup_mapping) close_handle( dup_mapping );
return status;
}
@@ -2663,7 +2663,7 @@ NTSTATUS WINAPI SYSCALL(NtMapViewOfSection)( HANDLE handle, HANDLE process, PVOI
res = map_image( handle, unix_handle, base, size, mask, header_size,
shared_fd, dup_mapping, map_vprot, addr_ptr );
if (shared_needs_close) close( shared_fd );
- NtClose( shared_file );
+ close_handle( shared_file );
}
else
{
@@ -2731,7 +2731,7 @@ NTSTATUS WINAPI SYSCALL(NtMapViewOfSection)( HANDLE handle, HANDLE process, PVOI
server_leave_uninterrupted_section( &csVirtual, &sigset );
done:
- if (dup_mapping) NtClose( dup_mapping );
+ if (dup_mapping) close_handle( dup_mapping );
if (needs_close) close( unix_handle );
return res;
}
--
2.6.1

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "f34fd257c6c83804075914ee2b82cc42eadc683f"
echo "f820c0942854c14fcd063c83225af03e73286334"
}
# Show version information
@ -133,7 +133,6 @@ patch_enable_all ()
enable_ddraw_Rendering_Targets="$1"
enable_ddraw_Write_Vtable="$1"
enable_ddraw_d3d_execute_buffer="$1"
enable_dinput_DIPROP_USERNAME="$1"
enable_dinput_Initialize="$1"
enable_dsound_DSCAPS_CERTIFIED="$1"
enable_dsound_EAX="$1"
@ -165,14 +164,11 @@ patch_enable_all ()
enable_iphlpapi_TCP_Table="$1"
enable_kernel32_COMSPEC="$1"
enable_kernel32_CopyFileEx="$1"
enable_kernel32_CreateFileA="$1"
enable_kernel32_Cwd_Startup_Info="$1"
enable_kernel32_ERROR_DLL_NOT_FOUND="$1"
enable_kernel32_FindFirstFile="$1"
enable_kernel32_FreeUserPhysicalPages="$1"
enable_kernel32_GetCurrentPackageFamilyName="$1"
enable_kernel32_GetFinalPathNameByHandle="$1"
enable_kernel32_GetOverlappedResult="$1"
enable_kernel32_LocaleNameToLCID="$1"
enable_kernel32_Named_Pipe="$1"
enable_kernel32_NeedCurrentDirectoryForExePath="$1"
@ -294,7 +290,6 @@ patch_enable_all ()
enable_setupapi_DiskSpaceList="$1"
enable_setupapi_Display_Device="$1"
enable_setupapi_HSPFILEQ_Check_Type="$1"
enable_setupapi_SetupDiSetDeviceInstallParamsW="$1"
enable_setupapi_SetupPromptForDisk="$1"
enable_sfc_SfcGetNextProtectedFile="$1"
enable_shdocvw_ParseURLFromOutsideSource_Tests="$1"
@ -330,7 +325,6 @@ patch_enable_all ()
enable_user32_Dialog_Owner="$1"
enable_user32_Dialog_Paint_Event="$1"
enable_user32_DrawTextExW="$1"
enable_user32_EnumDisplayMonitors="$1"
enable_user32_FlashWindowEx="$1"
enable_user32_GetSystemMetrics="$1"
enable_user32_Invalidate_Key_State="$1"
@ -579,9 +573,6 @@ patch_enable ()
ddraw-d3d_execute_buffer)
enable_ddraw_d3d_execute_buffer="$2"
;;
dinput-DIPROP_USERNAME)
enable_dinput_DIPROP_USERNAME="$2"
;;
dinput-Initialize)
enable_dinput_Initialize="$2"
;;
@ -675,15 +666,9 @@ patch_enable ()
kernel32-CopyFileEx)
enable_kernel32_CopyFileEx="$2"
;;
kernel32-CreateFileA)
enable_kernel32_CreateFileA="$2"
;;
kernel32-Cwd_Startup_Info)
enable_kernel32_Cwd_Startup_Info="$2"
;;
kernel32-ERROR_DLL_NOT_FOUND)
enable_kernel32_ERROR_DLL_NOT_FOUND="$2"
;;
kernel32-FindFirstFile)
enable_kernel32_FindFirstFile="$2"
;;
@ -696,9 +681,6 @@ patch_enable ()
kernel32-GetFinalPathNameByHandle)
enable_kernel32_GetFinalPathNameByHandle="$2"
;;
kernel32-GetOverlappedResult)
enable_kernel32_GetOverlappedResult="$2"
;;
kernel32-LocaleNameToLCID)
enable_kernel32_LocaleNameToLCID="$2"
;;
@ -1062,9 +1044,6 @@ patch_enable ()
setupapi-HSPFILEQ_Check_Type)
enable_setupapi_HSPFILEQ_Check_Type="$2"
;;
setupapi-SetupDiSetDeviceInstallParamsW)
enable_setupapi_SetupDiSetDeviceInstallParamsW="$2"
;;
setupapi-SetupPromptForDisk)
enable_setupapi_SetupPromptForDisk="$2"
;;
@ -1170,9 +1149,6 @@ patch_enable ()
user32-DrawTextExW)
enable_user32_DrawTextExW="$2"
;;
user32-EnumDisplayMonitors)
enable_user32_EnumDisplayMonitors="$2"
;;
user32-FlashWindowEx)
enable_user32_FlashWindowEx="$2"
;;
@ -1880,9 +1856,6 @@ if test "$enable_category_stable" -eq 1; then
if test "$enable_server_CreateProcess_ACLs" -gt 1; then
abort "Patchset server-CreateProcess_ACLs disabled, but category-stable depends on that."
fi
if test "$enable_setupapi_SetupDiSetDeviceInstallParamsW" -gt 1; then
abort "Patchset setupapi-SetupDiSetDeviceInstallParamsW disabled, but category-stable depends on that."
fi
if test "$enable_shell32_RunDLL_CallEntry16" -gt 1; then
abort "Patchset shell32-RunDLL_CallEntry16 disabled, but category-stable depends on that."
fi
@ -1980,7 +1953,6 @@ if test "$enable_category_stable" -eq 1; then
enable_opengl32_Revert_Disable_Ext=1
enable_server_ClipCursor=1
enable_server_CreateProcess_ACLs=1
enable_setupapi_SetupDiSetDeviceInstallParamsW=1
enable_shell32_RunDLL_CallEntry16=1
enable_shell32_SHFileOperation_Win9x=1
enable_user32_DrawTextExW=1
@ -3448,21 +3420,6 @@ if test "$enable_ddraw_d3d_execute_buffer" -eq 1; then
) >> "$patchlist"
fi
# Patchset dinput-DIPROP_USERNAME
# |
# | This patchset fixes the following Wine bugs:
# | * [#39667] Implement dinput device property DIPROP_USERNAME
# |
# | Modified files:
# | * dlls/dinput/device.c, dlls/dinput/device_private.h, dlls/dinput8/tests/device.c
# |
if test "$enable_dinput_DIPROP_USERNAME" -eq 1; then
patch_apply dinput-DIPROP_USERNAME/0001-dinput-Implement-device-property-DIPROP_USERNAME.patch
(
echo '+ { "Bernhard Übelacker", "dinput: Implement device property DIPROP_USERNAME.", 1 },';
) >> "$patchlist"
fi
# Patchset dinput-Initialize
# |
# | This patchset fixes the following Wine bugs:
@ -4074,18 +4031,6 @@ if test "$enable_kernel32_CopyFileEx" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-CreateFileA
# |
# | Modified files:
# | * dlls/kernel32/file.c
# |
if test "$enable_kernel32_CreateFileA" -eq 1; then
patch_apply kernel32-CreateFileA/0001-kernel32-Check-for-invalid-filename-pointers-in-Crea.patch
(
echo '+ { "Michael Müller", "kernel32: Check for invalid filename pointers in CreateFileA in Win 9X mode.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-Cwd_Startup_Info
# |
# | Modified files:
@ -4098,18 +4043,6 @@ if test "$enable_kernel32_Cwd_Startup_Info" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-ERROR_DLL_NOT_FOUND
# |
# | Modified files:
# | * dlls/kernel32/module.c
# |
if test "$enable_kernel32_ERROR_DLL_NOT_FOUND" -eq 1; then
patch_apply kernel32-ERROR_DLL_NOT_FOUND/0001-kernel32-Set-ERROR_DLL_NOT_FOUND-as-error-code-for-W.patch
(
echo '+ { "Michael Müller", "kernel32: Set ERROR_DLL_NOT_FOUND as error code for Win 9X instead of ERROR_MOD_NOT_FOUND.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-FindFirstFile
# |
# | This patchset fixes the following Wine bugs:
@ -4127,18 +4060,6 @@ if test "$enable_kernel32_FindFirstFile" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-GetOverlappedResult
# |
# | Modified files:
# | * dlls/kernel32/file.c, dlls/kernel32/tests/file.c
# |
if test "$enable_kernel32_GetOverlappedResult" -eq 1; then
patch_apply kernel32-GetOverlappedResult/0001-kernel32-Fix-handling-of-GetOverlappedResult-when-st.patch
(
echo '+ { "Sebastian Lackner", "kernel32: Fix handling of GetOverlappedResult when status remains STATUS_PENDING.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-LocaleNameToLCID
# |
# | This patchset fixes the following Wine bugs:
@ -4742,14 +4663,12 @@ if test "$enable_ntdll_Syscall_Wrappers" -eq 1; then
patch_apply ntdll-Syscall_Wrappers/0003-ntdll-APCs-should-call-the-implementation-instead-of.patch
patch_apply ntdll-Syscall_Wrappers/0004-ntdll-Syscalls-should-not-call-Nt-Ex-thunk-wrappers.patch
patch_apply ntdll-Syscall_Wrappers/0005-ntdll-Run-directory-initialization-function-early-du.patch
patch_apply ntdll-Syscall_Wrappers/0006-ntdll-Use-close_handle-instead-of-NtClose-for-intern.patch
(
echo '+ { "Sebastian Lackner", "winegcc: Pass '\''-read_only_relocs suppress'\'' to the linker on OSX.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Use wrapper functions for syscalls.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: APCs should call the implementation instead of the syscall thunk.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Syscalls should not call Nt*Ex thunk wrappers.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Run directory initialization function early during the process startup.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Use close_handle instead of NtClose for internal memory management functions.", 1 },';
) >> "$patchlist"
fi
@ -6193,21 +6112,6 @@ if test "$enable_setupapi_HSPFILEQ_Check_Type" -eq 1; then
) >> "$patchlist"
fi
# Patchset setupapi-SetupDiSetDeviceInstallParamsW
# |
# | This patchset fixes the following Wine bugs:
# | * [#29903] Add stub for setupapi.SetupDiSetDeviceInstallParamsW
# |
# | Modified files:
# | * dlls/setupapi/devinst.c, dlls/setupapi/setupapi.spec
# |
if test "$enable_setupapi_SetupDiSetDeviceInstallParamsW" -eq 1; then
patch_apply setupapi-SetupDiSetDeviceInstallParamsW/0001-setupapi-add-SetupDiSetDeviceInstallParamsW-stub.patch
(
echo '+ { "Austin English", "setupapi: Add SetupDiSetDeviceInstallParamsW stub.", 1 },';
) >> "$patchlist"
fi
# Patchset setupapi-SetupPromptForDisk
# |
# | This patchset fixes the following Wine bugs:
@ -6795,21 +6699,6 @@ if test "$enable_user32_DrawTextExW" -eq 1; then
) >> "$patchlist"
fi
# Patchset user32-EnumDisplayMonitors
# |
# | This patchset fixes the following Wine bugs:
# | * [#24421] Set %ecx to address of rect in EnumDisplayMonitors callback
# |
# | Modified files:
# | * dlls/user32/misc.c
# |
if test "$enable_user32_EnumDisplayMonitors" -eq 1; then
patch_apply user32-EnumDisplayMonitors/0001-user32-Set-ecx-to-address-of-rect-in-EnumDisplayMoni.patch
(
echo '+ { "Sebastian Lackner", "user32: Set %ecx to address of rect in EnumDisplayMonitors callback.", 1 },';
) >> "$patchlist"
fi
# Patchset user32-FlashWindowEx
# |
# | Modified files:

View File

@ -1,51 +0,0 @@
From b56da992c9fe09059e922603182063bbb21ccbd1 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Fri, 3 Apr 2015 17:06:51 -0500
Subject: setupapi: add SetupDiSetDeviceInstallParamsW stub.
Fixes https://bugs.winehq.org/show_bug.cgi?id=38347
---
dlls/setupapi/devinst.c | 13 +++++++++++++
dlls/setupapi/setupapi.spec | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 966af75..eaaa40e 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -3710,6 +3710,19 @@ BOOL WINAPI SetupDiSetDeviceInstallParamsA(
return TRUE;
}
+/***********************************************************************
+ * SetupDiSetDeviceInstallParamsW (SETUPAPI.@)
+ */
+BOOL WINAPI SetupDiSetDeviceInstallParamsW(
+ HDEVINFO DeviceInfoSet,
+ PSP_DEVINFO_DATA DeviceInfoData,
+ PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
+{
+ FIXME("(%p, %p, %p) stub\n", DeviceInfoSet, DeviceInfoData, DeviceInstallParams);
+
+ return TRUE;
+}
+
static HKEY SETUPDI_OpenDevKey(struct DeviceInfo *devInfo, REGSAM samDesired)
{
HKEY enumKey, key = INVALID_HANDLE_VALUE;
diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec
index c1dbed5..c8e7677 100644
--- a/dlls/setupapi/setupapi.spec
+++ b/dlls/setupapi/setupapi.spec
@@ -386,7 +386,7 @@
@ stdcall SetupDiSetClassInstallParamsA(ptr ptr ptr long)
@ stdcall SetupDiSetClassInstallParamsW(ptr ptr ptr long)
@ stdcall SetupDiSetDeviceInstallParamsA(ptr ptr ptr)
-@ stub SetupDiSetDeviceInstallParamsW
+@ stdcall SetupDiSetDeviceInstallParamsW(ptr ptr ptr)
@ stdcall SetupDiSetDeviceRegistryPropertyA(ptr ptr long ptr ptr)
@ stdcall SetupDiSetDeviceRegistryPropertyW(ptr ptr long ptr ptr)
@ stub SetupDiSetDriverInstallParamsA
--
2.3.5

View File

@ -1,2 +0,0 @@
Fixes: [29903] Add stub for setupapi.SetupDiSetDeviceInstallParamsW
Category: stable

View File

@ -1,32 +0,0 @@
From 3c1402c7476be339a313f7603439b42f471a4b12 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 25 Mar 2016 22:46:15 +0100
Subject: user32: Set %ecx to address of rect in EnumDisplayMonitors callback.
---
dlls/user32/misc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index 109809f..54be9c9 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -471,6 +471,7 @@ BOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo)
#ifdef __i386__
/* Some apps pass a non-stdcall callback to EnumDisplayMonitors,
* so we need a small assembly wrapper to call it.
+ * MJ's Help Diagnostic expects that %ecx contains the address to rect.
*/
struct enumdisplaymonitors_lparam
{
@@ -491,6 +492,7 @@ __ASM_STDCALL_FUNC( enumdisplaymonitors_callback_wrapper, 16,
"pushl 16(%ebp)\n\t"
"pushl 12(%ebp)\n\t"
"pushl 8(%ebp)\n\t"
+ "movl 16(%ebp),%ecx\n\t"
"call *(%eax)\n\t" /* call orig->proc */
"leave\n\t"
__ASM_CFI(".cfi_def_cfa %esp,4\n\t")
--
2.7.1

View File

@ -1 +0,0 @@
Fixes: [24421] Set %ecx to address of rect in EnumDisplayMonitors callback

View File

@ -1,4 +1,4 @@
From 5163b8b210cd569b06937be135140e393faa4661 Mon Sep 17 00:00:00 2001
From 0c9c1b424f62d37107a26397a0c8a29cf985abac Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 4 Nov 2015 19:31:30 +0100
Subject: wined3d: Rename wined3d_resource_(un)map to
@ -227,10 +227,10 @@ index 83457fc..7f51a1d 100644
if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a9b9f0d..b772a9b 100644
index ef8095f..9539e9c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3561,7 +3561,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
@@ -3570,7 +3570,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
for (i = 0; i < level_count; ++i)
{
@ -239,16 +239,16 @@ index a9b9f0d..b772a9b 100644
src_level + i, &src, NULL, WINED3D_MAP_READONLY)))
goto done;
@@ -3570,7 +3570,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
@@ -3579,7 +3579,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
wined3d_volume_upload_data(dst_texture->sub_resources[i].u.volume, context, &data);
wined3d_volume_invalidate_location(dst_texture->sub_resources[i].u.volume, ~WINED3D_LOCATION_TEXTURE_RGB);
wined3d_texture_invalidate_location(dst_texture, i, ~WINED3D_LOCATION_TEXTURE_RGB);
- if (FAILED(hr = wined3d_resource_unmap(&src_texture->resource, src_level + i)))
+ if (FAILED(hr = wined3d_resource_sub_resource_unmap(&src_texture->resource, src_level + i)))
goto done;
}
@@ -4282,7 +4282,7 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined
@@ -4291,7 +4291,7 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined
struct wined3d_texture *texture;
HRESULT hr;
@ -257,7 +257,7 @@ index a9b9f0d..b772a9b 100644
{
ERR("Failed to map source texture.\n");
return NULL;
@@ -4305,7 +4305,7 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined
@@ -4314,7 +4314,7 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined
hr = wined3d_texture_create(device, &desc, 1, WINED3D_TEXTURE_CREATE_MAPPABLE,
&data, NULL, &wined3d_null_parent_ops, &texture);
@ -266,7 +266,7 @@ index a9b9f0d..b772a9b 100644
if (FAILED(hr))
{
ERR("Failed to create cursor texture.\n");
@@ -4386,7 +4386,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
@@ -4395,7 +4395,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
return E_OUTOFMEMORY;
memset(mask_bits, 0xff, mask_size);
@ -275,7 +275,7 @@ index a9b9f0d..b772a9b 100644
WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY);
cursor_info.fIcon = FALSE;
cursor_info.xHotspot = x_hotspot;
@@ -4395,7 +4395,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
@@ -4404,7 +4404,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
cursor_image->resource.height, 1, 1, mask_bits);
cursor_info.hbmColor = CreateBitmap(cursor_image->resource.width,
cursor_image->resource.height, 1, 32, map_desc.data);
@ -307,10 +307,10 @@ index 423d162..0821fde 100644
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index abbab26..4b17d32 100644
index 6d0e147..8b13a2f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1759,25 +1759,25 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
@@ -1760,25 +1760,25 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
memset(&src_map, 0, sizeof(src_map));
memset(&dst_map, 0, sizeof(dst_map));
@ -341,7 +341,7 @@ index abbab26..4b17d32 100644
return dst_texture;
}
@@ -3683,7 +3683,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
@@ -3669,7 +3669,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
if (src_texture == dst_texture && src_sub_resource_idx == dst_sub_resource_idx)
{
same_sub_resource = TRUE;
@ -350,7 +350,7 @@ index abbab26..4b17d32 100644
src_map = dst_map;
src_format = dst_texture->resource.format;
dst_format = src_format;
@@ -3708,7 +3708,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
@@ -3694,7 +3694,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
src_texture = converted_texture;
src_sub_resource_idx = 0;
}
@ -359,7 +359,7 @@ index abbab26..4b17d32 100644
src_format = src_texture->resource.format;
src_fmt_flags = src_texture->resource.format_flags;
}
@@ -3718,7 +3718,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
@@ -3704,7 +3704,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
src_fmt_flags = dst_fmt_flags;
}
@ -368,7 +368,7 @@ index abbab26..4b17d32 100644
}
bpp = dst_format->byte_count;
@@ -4134,9 +4134,9 @@ error:
@@ -4120,9 +4120,9 @@ error:
FIXME(" Unsupported flags %#x.\n", flags);
release:
@ -398,10 +398,10 @@ index 21cb0db..cfdc1c6 100644
@ cdecl wined3d_rendertarget_view_create(ptr ptr ptr ptr ptr)
@ cdecl wined3d_rendertarget_view_create_from_sub_resource(ptr long ptr ptr ptr)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index cb057ab..cc35a2a 100644
index 9bdd16d..88cddc2 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2348,11 +2348,11 @@ void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource,
@@ -2360,11 +2360,11 @@ void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource,
struct wined3d_resource_desc *desc);
void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resource);
DWORD __cdecl wined3d_resource_get_priority(const struct wined3d_resource *resource);