Rebase against 5ec6b8f807f61ee77b9a96d94798c8e3f3db7af4

This commit is contained in:
Zebediah Figura 2018-02-21 21:27:12 -06:00
parent 7332557b2a
commit cf19a5d6d6
11 changed files with 107 additions and 451 deletions

View File

@ -1,90 +0,0 @@
From 6a2ce8e894076cbc50ec1cda81fd00ad6d7ea68c Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 14 Jan 2016 17:56:00 +1100
Subject: comctl32/tooltip: Protect TTM_ADDTOOLW from invalid text pointers
Fixes https://bugs.winehq.org/show_bug.cgi?id=10347
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/comctl32/tests/tooltips.c | 27 +++++++++++++++++++++++++++
dlls/comctl32/tooltips.c | 18 ++++++++++++++----
2 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c
index 3382fce..2a0f855 100644
--- a/dlls/comctl32/tests/tooltips.c
+++ b/dlls/comctl32/tests/tooltips.c
@@ -446,6 +446,33 @@ static void test_gettext(void)
r = SendMessageW(hwnd, TTM_ADDTOOLW, 0, (LPARAM)&toolinfoW);
ok(!r, "Adding the tool to the tooltip succeeded!\n");
+ /* lpszText with an invalid address */
+ toolinfoW.cbSize = sizeof(TTTOOLINFOW);
+ toolinfoW.hwnd = notify;
+ toolinfoW.hinst = GetModuleHandleA(NULL);
+ toolinfoW.uFlags = 0;
+ toolinfoW.uId = 0;
+ toolinfoW.lpszText = (LPWSTR)0xdeadbeef;
+ toolinfoW.lParam = 0;
+ GetClientRect(hwnd, &toolinfoW.rect);
+ r = SendMessageA(hwnd, TTM_ADDTOOLW, 0, (LPARAM)&toolinfoW);
+ ok(!r, "Adding the tool to the tooltip succeeded!\n");
+
+ /* lpszText with an invalid address. Crashes using TTTOOLINFOA message */
+ if(0)
+ {
+ toolinfoA.cbSize = sizeof(TTTOOLINFOA);
+ toolinfoA.hwnd = notify;
+ toolinfoA.hinst = GetModuleHandleA(NULL);
+ toolinfoA.uFlags = 0;
+ toolinfoA.uId = 0;
+ toolinfoA.lpszText = (LPSTR)0xdeadbeef;
+ toolinfoA.lParam = 0;
+ GetClientRect(hwnd, &toolinfoA.rect);
+ r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA);
+ ok(!r, "Adding the tool to the tooltip succeeded!\n");
+ }
+
if (0) /* crashes on NT4 */
{
toolinfoW.hwnd = NULL;
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 8bf6919..eea1d2e 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -103,6 +103,7 @@
#include "commctrl.h"
#include "comctl32.h"
#include "wine/debug.h"
+#include "wine/exception.h"
WINE_DEFAULT_DEBUG_CHANNEL(tooltips);
@@ -1076,10 +1077,19 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
}
else if (isW) {
- INT len = lstrlenW (ti->lpszText);
- TRACE("add text %s\n", debugstr_w(ti->lpszText));
- toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR));
- strcpyW (toolPtr->lpszText, ti->lpszText);
+ __TRY
+ {
+ INT len = lstrlenW (ti->lpszText);
+ TRACE("add text %s\n", debugstr_w(ti->lpszText));
+ toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR));
+ strcpyW (toolPtr->lpszText, ti->lpszText);
+ }
+ __EXCEPT_PAGE_FAULT
+ {
+ WARN("Invalid lpszText.\n");
+ return FALSE;
+ }
+ __ENDTRY
}
else {
INT len = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, NULL, 0);
--
2.6.4

View File

@ -1 +0,0 @@
Fixes: [10347] Protect TTM_ADDTOOLW from invalid text pointers

View File

@ -1,7 +1,8 @@
From 63d0af4a9607ae31514604032a5504457ad84097 Mon Sep 17 00:00:00 2001
From 980d867a89c72225b595b6e2a7313c1ddd42c9ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 6 Feb 2016 01:15:07 +0100
Subject: ddraw: Don't set HWTRANSFORMANDLIGHT flag on d3d7 RGB device.
Subject: [PATCH 1/3] ddraw: Don't set HWTRANSFORMANDLIGHT flag on d3d7 RGB
device.
---
dlls/ddraw/ddraw.c | 9 +++++++++
@ -9,10 +10,10 @@ Subject: ddraw: Don't set HWTRANSFORMANDLIGHT flag on d3d7 RGB device.
2 files changed, 27 insertions(+)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 89ce07a..64548a0 100644
index 97a11ef..9a19536 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -48,6 +48,7 @@ static struct enum_device_entry
@@ -50,6 +50,7 @@ static struct enum_device_entry
char interface_name[100];
char device_name[100];
const GUID *device_guid;
@ -20,7 +21,7 @@ index 89ce07a..64548a0 100644
} device_list7[] =
{
/* T&L HAL device */
@@ -55,6 +56,7 @@ static struct enum_device_entry
@@ -57,6 +58,7 @@ static struct enum_device_entry
"WINE Direct3D7 Hardware Transform and Lighting acceleration using WineD3D",
"Wine D3D7 T&L HAL",
&IID_IDirect3DTnLHalDevice,
@ -28,7 +29,7 @@ index 89ce07a..64548a0 100644
},
/* HAL device */
@@ -62,6 +64,7 @@ static struct enum_device_entry
@@ -64,6 +66,7 @@ static struct enum_device_entry
"WINE Direct3D7 Hardware acceleration using WineD3D",
"Direct3D HAL",
&IID_IDirect3DHALDevice,
@ -36,7 +37,7 @@ index 89ce07a..64548a0 100644
},
/* RGB device */
@@ -69,6 +72,7 @@ static struct enum_device_entry
@@ -71,6 +74,7 @@ static struct enum_device_entry
"WINE Direct3D7 RGB Software Emulation using WineD3D",
"Wine D3D7 RGB",
&IID_IDirect3DRGBDevice,
@ -44,7 +45,7 @@ index 89ce07a..64548a0 100644
},
};
@@ -3565,6 +3569,7 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
@@ -3627,6 +3631,7 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
{
struct ddraw *ddraw = impl_from_IDirect3D7(iface);
D3DDEVICEDESC7 device_desc7;
@ -52,13 +53,13 @@ index 89ce07a..64548a0 100644
HRESULT hr;
size_t i;
@@ -3581,11 +3586,15 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
@@ -3643,11 +3648,15 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
return hr;
}
+ dev_caps = device_desc7.dwDevCaps;
+
for (i = 0; i < sizeof(device_list7)/sizeof(device_list7[0]); i++)
for (i = 0; i < ARRAY_SIZE(device_list7); i++)
{
HRESULT ret;
@ -69,10 +70,10 @@ index 89ce07a..64548a0 100644
if (ret != DDENUMRET_OK)
{
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 34167c1..76dabee 100644
index 3f433a6..aa7214a 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -230,6 +230,19 @@ static HRESULT WINAPI enum_devtype_cb(char *desc_str, char *name, D3DDEVICEDESC7
@@ -311,6 +311,19 @@ static HRESULT WINAPI enum_devtype_cb(char *desc_str, char *name, D3DDEVICEDESC7
return DDENUMRET_OK;
}
@ -92,7 +93,7 @@ index 34167c1..76dabee 100644
static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
{
IDirectDrawSurface7 *surface, *ds;
@@ -240,6 +253,7 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
@@ -321,6 +334,7 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
IDirect3D7 *d3d7;
HRESULT hr;
BOOL hal_ok = FALSE;
@ -100,7 +101,7 @@ index 34167c1..76dabee 100644
const GUID *devtype = &IID_IDirect3DHALDevice;
if (!(ddraw = create_ddraw()))
@@ -283,6 +297,10 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
@@ -364,6 +378,10 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr);
if (hal_ok) devtype = &IID_IDirect3DTnLHalDevice;
@ -112,5 +113,5 @@ index 34167c1..76dabee 100644
hr = IDirect3D7_EnumZBufferFormats(d3d7, devtype, enum_z_fmt, &z_fmt);
if (FAILED(hr) || !z_fmt.dwSize)
--
2.7.0
2.7.4

View File

@ -1,186 +0,0 @@
From d7f4b0f5977434617b89b513f3cfcc358c5584e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 1 Apr 2015 04:34:20 +0200
Subject: [PATCH] ntdll: Load CLI/.NET images in the same way as Windows XP and
above.
---
dlls/ntdll/loader.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 127 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 3fcbbf7..16d4426 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -104,11 +104,16 @@ struct builtin_load_info
static struct builtin_load_info default_load_info;
static struct builtin_load_info *builtin_load_info = &default_load_info;
+static CONTEXT start_context = { 0 };
static HANDLE main_exe_file;
static UINT tls_module_count; /* number of modules with TLS directory */
static IMAGE_TLS_DIRECTORY *tls_dirs; /* array of TLS directories */
LIST_ENTRY tls_links = { &tls_links, &tls_links };
+static HRESULT (WINAPI *p_CorValidateImage)(PVOID* ImageBase, LPCWSTR FileName);
+static __int32 (WINAPI *p_CorExeMain)(void);
+static BOOL (WINAPI *p_CorDllMain)(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved);
+
static RTL_CRITICAL_SECTION loader_section;
static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
@@ -341,6 +346,78 @@ static inline ULONG_PTR allocate_stub( const char *dll, const char *name ) { ret
/*************************************************************************
+ * is_cli_only_image
+ *
+ * Checks if an image is a CLI/.NET image which does not contain any
+ * native code.
+ */
+static BOOL is_cli_only_image( HMODULE image )
+{
+ IMAGE_COR20_HEADER *cliheader;
+ ULONG size;
+
+ cliheader = RtlImageDirectoryEntryToData( image, TRUE, IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR, &size );
+ if (!cliheader || size < sizeof(*cliheader))
+ return FALSE;
+
+ return (cliheader->Flags & COMIMAGE_FLAGS_ILONLY) != 0;
+}
+
+
+/*************************************************************************
+ * load_mscoree
+ *
+ * Load _CorValidateImage and the _Cor{Exe,Dll}Main functions from mscoree.
+ * The loader_section must be locked while calling this function.
+ */
+static BOOL load_mscoree( void )
+{
+ static const WCHAR mscoree_dllW[] = {'m','s','c','o','r','e','e','.','d','l','l',0};
+ UNICODE_STRING unicode_str;
+ ANSI_STRING ansi_str;
+ HMODULE module;
+
+ if (p_CorValidateImage)
+ return TRUE;
+
+ RtlInitUnicodeString( &unicode_str, mscoree_dllW );
+ if (LdrLoadDll( NULL, LOAD_LIBRARY_SEARCH_SYSTEM32, &unicode_str, &module ))
+ {
+ ERR( "Failed to load mscoree.dll\n" );
+ return FALSE;
+ }
+
+ /* Load _CorValidateImage */
+ RtlInitAnsiString( &ansi_str, "_CorValidateImage" );
+ if (LdrGetProcedureAddress( module, &ansi_str, 0, (void **)&p_CorValidateImage) )
+ {
+ ERR( "Failed to get import for _CorValidateImage\n" );
+ LdrUnloadDll( module );
+ return FALSE;
+ }
+
+ /* Load _CorExeMain */
+ RtlInitAnsiString( &ansi_str, "_CorExeMain" );
+ if (LdrGetProcedureAddress( module, &ansi_str, 0, (void **)&p_CorExeMain) )
+ {
+ ERR( "Failed to get import for _CorExeMain\n" );
+ p_CorExeMain = NULL;
+ }
+
+ /* Load _CorDllMain */
+ RtlInitAnsiString( &ansi_str, "_CorDllMain" );
+ if (LdrGetProcedureAddress( module, &ansi_str, 0, (void **)&p_CorDllMain) )
+ {
+ ERR( "Failed to get import for _CorDllMain\n" );
+ p_CorDllMain = NULL;
+ }
+
+ /* FIXME: Unload mscoree again when no longer needed */
+ return TRUE;
+}
+
+
+/*************************************************************************
* get_modref
*
* Looks for the referenced HMODULE in the current process
@@ -904,6 +981,10 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
if (!(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS)) return STATUS_SUCCESS; /* already done */
wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS;
+ /* For a CLI-only image there is nothing to do. Do not allocate a TLS slot
+ * and do not resolve any external dependencies. */
+ if (is_cli_only_image( wm->ldr.BaseAddress )) return STATUS_SUCCESS;
+
wm->ldr.TlsIndex = alloc_tls_slot( &wm->ldr );
if (!(imports = RtlImageDirectoryEntryToData( wm->ldr.BaseAddress, TRUE,
@@ -1094,8 +1175,47 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
BOOL retv = FALSE;
/* Skip calls for modules loaded with special load flags */
-
if (wm->ldr.Flags & LDR_DONT_RESOLVE_REFS) return STATUS_SUCCESS;
+
+ /* Yes, Windows also has hardcoded exceptions for mscoree in ntdll */
+ if (is_cli_only_image( module ))
+ {
+ #ifndef __x86_64__
+ IMAGE_NT_HEADERS *nt = RtlImageNtHeader( module );
+ #endif
+
+ if (reason == DLL_WINE_PREATTACH)
+ return STATUS_SUCCESS;
+
+ if (reason == DLL_PROCESS_ATTACH)
+ {
+ HRESULT hr;
+
+ if (!load_mscoree())
+ return STATUS_DLL_INIT_FAILED;
+
+ hr = p_CorValidateImage( &module, wm->ldr.FullDllName.Buffer );
+ if (hr)
+ {
+ ERR( "failed to validate CLI image, error 0x%x\n", hr );
+ wm->ldr.EntryPoint = NULL;
+ return STATUS_DLL_INIT_FAILED;
+ }
+
+ #ifdef __x86_64__
+ wm->ldr.EntryPoint = (wm->ldr.Flags & LDR_IMAGE_IS_DLL) ?
+ (void *)p_CorDllMain : (void *)p_CorExeMain;
+ #else
+ wm->ldr.EntryPoint = (char *)module + nt->OptionalHeader.AddressOfEntryPoint;
+ #endif
+
+ if (!(wm->ldr.Flags & LDR_IMAGE_IS_DLL))
+ start_context.ContextFlags = 0;
+
+ entry = wm->ldr.EntryPoint;
+ }
+ }
+
if (wm->ldr.TlsIndex != -1) call_tls_callbacks( wm->ldr.BaseAddress, reason );
if (!entry || !(wm->ldr.Flags & LDR_IMAGE_IS_DLL)) return STATUS_SUCCESS;
@@ -3154,6 +3274,12 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), status );
NtTerminateProcess( GetCurrentProcess(), status );
}
+ if ((status = server_init_process_done( &start_context )) != STATUS_SUCCESS)
+ {
+ ERR( "Main exe initialization for %s failed, status %x\n",
+ debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), status );
+ NtTerminateProcess( GetCurrentProcess(), status );
+ }
server_init_process_done();
}
--
2.7.4

View File

@ -1,2 +0,0 @@
Fixes: [38661] Implement proper handling of CLI .NET images in Wine library loader
Depends: mscoree-CorValidateImage

View File

@ -1,7 +1,8 @@
From d37699c2b0eb6e5e74b9b040ee6a5791f4c9112c Mon Sep 17 00:00:00 2001
From 8cd8b854400ea2eb725de23bbd5b510a278c9635 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Tue, 19 Aug 2014 22:10:49 -0600
Subject: ntdll: Implement retrieving DOS attributes in NtQueryInformationFile.
Subject: [PATCH 1/8] ntdll: Implement retrieving DOS attributes in
NtQueryInformationFile.
---
configure.ac | 12 ++++++++++++
@ -13,18 +14,18 @@ Subject: ntdll: Implement retrieving DOS attributes in NtQueryInformationFile.
create mode 100644 libs/port/xattr.c
diff --git a/configure.ac b/configure.ac
index 8007469..2d6bd77 100644
index 0fb6863..9b88dfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,6 +77,7 @@ AC_ARG_WITH(sane, AS_HELP_STRING([--without-sane],[do not use SANE (scanner
AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]))
@@ -81,6 +81,7 @@ AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]))
AC_ARG_WITH(udev, AS_HELP_STRING([--without-udev],[do not use udev (plug and play support)]))
AC_ARG_WITH(sdl, AS_HELP_STRING([--without-sdl],[do not use SDL]))
AC_ARG_WITH(v4l, AS_HELP_STRING([--without-v4l],[do not use v4l1 (v4l support)]))
+AC_ARG_WITH(xattr, AS_HELP_STRING([--without-xattr],[do not use xattr (security attributes support)]))
AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi])
AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]),
@@ -669,6 +670,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
@@ -698,6 +699,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
#include <sys/socket.h>
#endif])
@ -41,9 +42,9 @@ index 8007469..2d6bd77 100644
+
dnl **** Check for working dll ****
AC_SUBST(dlldir,"\${libdir}/wine")
AC_SUBST(DLLFLAGS,"-D_REENTRANT")
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 7fbde50..79fc363 100644
index b9d2425..dd03ae3 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -122,6 +122,22 @@ mode_t FILE_umask = 0;
@ -88,10 +89,10 @@ index 7fbde50..79fc363 100644
}
diff --git a/include/wine/port.h b/include/wine/port.h
index 2989b39..3219a8a 100644
index fb7251e..056c9ae 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -363,6 +363,14 @@ extern int mkstemps(char *template, int suffix_len);
@@ -391,6 +391,14 @@ extern int mkstemps(char *template, int suffix_len);
extern int _spawnvp(int mode, const char *cmdname, const char * const argv[]);
#endif
@ -107,10 +108,10 @@ index 2989b39..3219a8a 100644
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index 9d7e44f..8b41050 100644
index c87b99d..111807a 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -104,4 +104,5 @@ C_SRCS = \
@@ -106,4 +106,5 @@ C_SRCS = \
symlink.c \
usleep.c \
utf8.c \
@ -163,5 +164,5 @@ index 0000000..94b7713
+#endif
+}
--
2.9.0
2.7.4

View File

@ -1,3 +1,2 @@
Fixes: Implement and use hash links when looking up LDR module
Depends: ntdll-LDR_MODULE
Depends: ntdll-CLI_Images
Depends: ntdll-LDR_MODULE

View File

@ -1,4 +1,4 @@
From 6502de27751f8e34231d33694faa432f17f9d6bd Mon Sep 17 00:00:00 2001
From ad4c0998c958313b9ea367b0103fc4147013b5a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 22 Jul 2017 03:56:26 +0200
Subject: [PATCH] ntdll: Implement LdrRegisterDllNotification and
@ -12,7 +12,7 @@ Subject: [PATCH] ntdll: Implement LdrRegisterDllNotification and
4 files changed, 381 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 9451dfa520..d64433c58d 100644
index 0a9069f..627e0bb 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -40,6 +40,7 @@
@ -23,9 +23,9 @@ index 9451dfa520..d64433c58d 100644
#include "wine/server.h"
#include "ntdll_misc.h"
#include "ddk/wdm.h"
@@ -63,6 +64,15 @@ WINE_DECLARE_DEBUG_CHANNEL(imports);
typedef DWORD (CALLBACK *DLLENTRYPROC)(HMODULE,DWORD,LPVOID);
typedef void (CALLBACK *LDRENUMPROC)(LDR_MODULE *, void *, BOOLEAN *);
@@ -67,6 +68,15 @@ typedef void (CALLBACK *LDRENUMPROC)(LDR_MODULE *, void *, BOOLEAN *);
const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\',
's','y','s','t','e','m','3','2','\\',0};
+struct ldr_notification
+{
@ -39,7 +39,7 @@ index 9451dfa520..d64433c58d 100644
#define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */
@@ -348,6 +358,39 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name )
@@ -345,6 +355,39 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name )
static inline ULONG_PTR allocate_stub( const char *dll, const char *name ) { return 0xdeadbeef; }
#endif /* __i386__ */
@ -78,8 +78,8 @@ index 9451dfa520..d64433c58d 100644
+}
/*************************************************************************
* is_cli_only_image
@@ -1375,16 +1418,23 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved )
* hash_basename
@@ -1295,16 +1338,23 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved )
{
WINE_MODREF *prev = current_modref;
current_modref = wm;
@ -103,7 +103,7 @@ index 9451dfa520..d64433c58d 100644
current_modref = prev;
}
@@ -1453,6 +1503,7 @@ static void process_detach(void)
@@ -1373,6 +1423,7 @@ static void process_detach(void)
mod->Flags &= ~LDR_PROCESS_ATTACHED;
MODULE_InitDLL( CONTAINING_RECORD(mod, WINE_MODREF, ldr),
DLL_PROCESS_DETACH, ULongToPtr(process_detaching) );
@ -111,11 +111,10 @@ index 9451dfa520..d64433c58d 100644
/* Restart at head of WINE_MODREF list, as entries might have
been added and/or removed while performing the call ... */
@@ -1561,6 +1612,54 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback,
return STATUS_SUCCESS;
@@ -1482,6 +1533,54 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback,
}
+/******************************************************************
/******************************************************************
+ * LdrRegisterDllNotification (NTDLL.@)
+ */
+NTSTATUS WINAPI LdrRegisterDllNotification(ULONG flags, PLDR_DLL_NOTIFICATION_FUNCTION callback,
@ -163,10 +162,11 @@ index 9451dfa520..d64433c58d 100644
+ return STATUS_SUCCESS;
+}
+
/******************************************************************
+/******************************************************************
* LdrLockLoaderLock (NTDLL.@)
*
@@ -2147,6 +2246,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, LPCWSTR fakemo
* Note: some flags are not implemented.
@@ -2068,6 +2167,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file,
TRACE_(loaddll)( "Loaded %s at %p: native\n", debugstr_w(wm->ldr.FullDllName.Buffer), module );
wm->ldr.LoadCount = 1;
@ -175,10 +175,10 @@ index 9451dfa520..d64433c58d 100644
return STATUS_SUCCESS;
}
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 264ae0d5a9..0950f78a8a 100644
index 2257a93..4c34e10 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -84,6 +84,7 @@
@@ -83,6 +83,7 @@
@ stdcall LdrProcessRelocationBlock(ptr long ptr long)
@ stdcall LdrQueryImageFileExecutionOptions(ptr wstr long ptr long ptr)
@ stdcall LdrQueryProcessModuleInformation(ptr long ptr)
@ -186,7 +186,7 @@ index 264ae0d5a9..0950f78a8a 100644
@ stdcall LdrResolveDelayLoadedAPI(ptr ptr ptr ptr ptr long)
@ stub LdrSetAppCompatDllRedirectionCallback
@ stub LdrSetDllManifestProber
@@ -92,6 +93,7 @@
@@ -91,6 +92,7 @@
@ stub LdrUnloadAlternateResourceModule
@ stdcall LdrUnloadDll(ptr)
@ stdcall LdrUnlockLoaderLock(long long)
@ -195,7 +195,7 @@ index 264ae0d5a9..0950f78a8a 100644
@ extern NlsAnsiCodePage
@ extern NlsMbCodePageTag
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index 02ae1c1875..8358cd5430 100644
index 02ae1c1..8358cd5 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -105,6 +105,8 @@ static NTSTATUS (WINAPI *pLdrEnumerateLoadedModules)(void *, void *, void *);
@ -482,10 +482,10 @@ index 02ae1c1875..8358cd5430 100644
+ test_LdrRegisterDllNotification();
}
diff --git a/include/winternl.h b/include/winternl.h
index bc8b92798e..2d3350507d 100644
index 743f3d7..d24e3f9 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2162,6 +2162,32 @@ typedef struct _LDR_MODULE
@@ -2161,6 +2161,32 @@ typedef struct _LDR_MODULE
HANDLE SectionHandle;
} LDR_MODULE, *PLDR_MODULE;
@ -529,5 +529,5 @@ index bc8b92798e..2d3350507d 100644
{
PVOID Reserved1; /* 00/00 */
--
2.16.1
2.7.4

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "c3beca6c8fc8c07ecd992e64f8f8d0dda3a10ac8"
echo "5ec6b8f807f61ee77b9a96d94798c8e3f3db7af4"
}
# Show version information
@ -103,7 +103,6 @@ patch_enable_all ()
enable_browseui_Progress_Dialog="$1"
enable_combase_RoApi="$1"
enable_comctl32_Listview_DrawItem="$1"
enable_comctl32_TTM_ADDTOOLW="$1"
enable_comctl32_Tests="$1"
enable_comdlg32_lpstrFileTitle="$1"
enable_configure_Absolute_RPATH="$1"
@ -227,7 +226,6 @@ patch_enable_all ()
enable_ntdll_ApiSetMap="$1"
enable_ntdll_ApiSetQueryApiSetPresence="$1"
enable_ntdll_Builtin_Prot="$1"
enable_ntdll_CLI_Images="$1"
enable_ntdll_CriticalSection="$1"
enable_ntdll_DOS_Area="$1"
enable_ntdll_DOS_Attributes="$1"
@ -557,9 +555,6 @@ patch_enable ()
comctl32-Listview_DrawItem)
enable_comctl32_Listview_DrawItem="$2"
;;
comctl32-TTM_ADDTOOLW)
enable_comctl32_TTM_ADDTOOLW="$2"
;;
comctl32-Tests)
enable_comctl32_Tests="$2"
;;
@ -929,9 +924,6 @@ patch_enable ()
ntdll-Builtin_Prot)
enable_ntdll_Builtin_Prot="$2"
;;
ntdll-CLI_Images)
enable_ntdll_CLI_Images="$2"
;;
ntdll-CriticalSection)
enable_ntdll_CriticalSection="$2"
;;
@ -2498,13 +2490,9 @@ if test "$enable_ntdll_NtQueryEaFile" -eq 1; then
fi
if test "$enable_ntdll_HashLinks" -eq 1; then
if test "$enable_ntdll_CLI_Images" -gt 1; then
abort "Patchset ntdll-CLI_Images disabled, but ntdll-HashLinks depends on that."
fi
if test "$enable_ntdll_LDR_MODULE" -gt 1; then
abort "Patchset ntdll-LDR_MODULE disabled, but ntdll-HashLinks depends on that."
fi
enable_ntdll_CLI_Images=1
enable_ntdll_LDR_MODULE=1
fi
@ -2519,13 +2507,6 @@ if test "$enable_ntdll_DllRedirects" -eq 1; then
enable_ntdll_Loader_Machine_Type=1
fi
if test "$enable_ntdll_CLI_Images" -eq 1; then
if test "$enable_mscoree_CorValidateImage" -gt 1; then
abort "Patchset mscoree-CorValidateImage disabled, but ntdll-CLI_Images depends on that."
fi
enable_mscoree_CorValidateImage=1
fi
if test "$enable_ntdll_Builtin_Prot" -eq 1; then
if test "$enable_ntdll_User_Shared_Data" -gt 1; then
abort "Patchset ntdll-User_Shared_Data disabled, but ntdll-Builtin_Prot depends on that."
@ -3314,21 +3295,6 @@ if test "$enable_comctl32_Listview_DrawItem" -eq 1; then
) >> "$patchlist"
fi
# Patchset comctl32-TTM_ADDTOOLW
# |
# | This patchset fixes the following Wine bugs:
# | * [#10347] Protect TTM_ADDTOOLW from invalid text pointers
# |
# | Modified files:
# | * dlls/comctl32/tests/tooltips.c, dlls/comctl32/tooltips.c
# |
if test "$enable_comctl32_TTM_ADDTOOLW" -eq 1; then
patch_apply comctl32-TTM_ADDTOOLW/0001-comctl32-tooltip-Protect-TTM_ADDTOOLW-from-invalid-t.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "comctl32/tooltip: Protect TTM_ADDTOOLW from invalid text pointers.", 1 },';
) >> "$patchlist"
fi
# Patchset comctl32-Tests
# |
# | Modified files:
@ -5638,24 +5604,6 @@ if test "$enable_ntdll_Builtin_Prot" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-CLI_Images
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * mscoree-CorValidateImage
# |
# | This patchset fixes the following Wine bugs:
# | * [#38661] Implement proper handling of CLI .NET images in Wine library loader
# |
# | Modified files:
# | * dlls/ntdll/loader.c
# |
if test "$enable_ntdll_CLI_Images" -eq 1; then
patch_apply ntdll-CLI_Images/0001-ntdll-Load-CLI-.NET-images-in-the-same-way-as-Window.patch
(
printf '%s\n' '+ { "Michael Müller", "ntdll: Load CLI/.NET images in the same way as Windows XP and above.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-CriticalSection
# |
# | Modified files:
@ -5865,7 +5813,7 @@ fi
# Patchset ntdll-HashLinks
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * mscoree-CorValidateImage, ntdll-CLI_Images, ntdll-LDR_MODULE
# | * ntdll-LDR_MODULE
# |
# | Modified files:
# | * dlls/kernel32/tests/loader.c, dlls/ntdll/loader.c, include/winternl.h
@ -5988,8 +5936,7 @@ fi
# Patchset ntdll-LdrRegisterDllNotification
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * mscoree-CorValidateImage, ntdll-CLI_Images, ntdll-LDR_MODULE, ntdll-HashLinks, ntdll-ThreadTime, ntdll-
# | Hide_Wine_Exports, ntdll-RtlQueryPackageIdentity
# | * ntdll-LDR_MODULE, ntdll-HashLinks, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-RtlQueryPackageIdentity
# |
# | Modified files:
# | * dlls/ntdll/loader.c, dlls/ntdll/ntdll.spec, dlls/ntdll/tests/rtl.c, include/winternl.h
@ -7672,7 +7619,7 @@ fi
# |
# | Modified files:
# | * dlls/shell32/Makefile.in, dlls/shell32/shell32_classes.idl, dlls/shell32/shell32_main.h, dlls/shell32/shellnew.c,
# | dlls/shell32/shellole.c, include/shlguid.h
# | dlls/shell32/shellole.c
# |
if test "$enable_shell32_NewMenu_Interface" -eq 1; then
patch_apply shell32-NewMenu_Interface/0001-shell32-Implement-NewMenu-with-new-folder-item.patch

View File

@ -1,7 +1,7 @@
From e412429964c86aabcea561e5eca9b625fe2e094b Mon Sep 17 00:00:00 2001
From d723f08398d372ad918147ea75207de29f59484e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 16 Aug 2015 17:34:22 +0200
Subject: shell32: Implement NewMenu with new folder item.
Subject: [PATCH] shell32: Implement NewMenu with new folder item.
---
dlls/shell32/Makefile.in | 1 +
@ -9,12 +9,11 @@ Subject: shell32: Implement NewMenu with new folder item.
dlls/shell32/shell32_main.h | 1 +
dlls/shell32/shellnew.c | 558 +++++++++++++++++++++++++++++++++++++++
dlls/shell32/shellole.c | 1 +
include/shlguid.h | 2 +
6 files changed, 568 insertions(+)
5 files changed, 566 insertions(+)
create mode 100644 dlls/shell32/shellnew.c
diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in
index 970ecba4f65..25d9ebd541b 100644
index 970ecba..25d9ebd 100644
--- a/dlls/shell32/Makefile.in
+++ b/dlls/shell32/Makefile.in
@@ -32,6 +32,7 @@ C_SRCS = \
@ -26,10 +25,10 @@ index 970ecba4f65..25d9ebd541b 100644
shellord.c \
shellpath.c \
diff --git a/dlls/shell32/shell32_classes.idl b/dlls/shell32/shell32_classes.idl
index cc57b2bab57..e8476a03cb3 100644
index 6ed497f..60de627 100644
--- a/dlls/shell32/shell32_classes.idl
+++ b/dlls/shell32/shell32_classes.idl
@@ -76,6 +76,11 @@ coclass KnownFolderManager { interface IKnownFolderManager; }
@@ -82,6 +82,11 @@ coclass KnownFolderManager { interface IKnownFolderManager; }
[
threading(apartment),
@ -42,10 +41,10 @@ index cc57b2bab57..e8476a03cb3 100644
] coclass AutoComplete { interface IAutoComplete2; }
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
index bdebcba0e39..ececaa77ef8 100644
index b65141f..cf6a256 100644
--- a/dlls/shell32/shell32_main.h
+++ b/dlls/shell32/shell32_main.h
@@ -101,6 +101,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID
@@ -102,6 +102,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID
HRESULT WINAPI QueryAssociations_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput) DECLSPEC_HIDDEN;
HRESULT WINAPI ExplorerBrowser_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
HRESULT WINAPI KnownFolderManager_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
@ -55,7 +54,7 @@ index bdebcba0e39..ececaa77ef8 100644
HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) DECLSPEC_HIDDEN;
diff --git a/dlls/shell32/shellnew.c b/dlls/shell32/shellnew.c
new file mode 100644
index 00000000000..59e18d6d228
index 0000000..59e18d6
--- /dev/null
+++ b/dlls/shell32/shellnew.c
@@ -0,0 +1,558 @@
@ -618,10 +617,10 @@ index 00000000000..59e18d6d228
+ return hr;
+}
diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c
index d3d972b96d1..88dfdeca461 100644
index 7b6ee92..e6ff1e9 100644
--- a/dlls/shell32/shellole.c
+++ b/dlls/shell32/shellole.c
@@ -88,6 +88,7 @@ static const struct {
@@ -89,6 +89,7 @@ static const struct {
{&CLSID_Shell, IShellDispatch_Constructor},
{&CLSID_DestinationList, CustomDestinationList_Constructor},
{&CLSID_ShellImageDataFactory, ShellImageDataFactory_Constructor},
@ -629,19 +628,6 @@ index d3d972b96d1..88dfdeca461 100644
{NULL, NULL}
};
diff --git a/include/shlguid.h b/include/shlguid.h
index 2279defb1db..09aacc58e66 100644
--- a/include/shlguid.h
+++ b/include/shlguid.h
@@ -146,6 +146,8 @@ DEFINE_GUID(CLSID_ProgressDialog, 0xf8383852, 0xfcd3, 0x11d1, 0xa6, 0xb9, 0x0, 0
DEFINE_GUID(CLSID_ShellItem, 0x2fe352ea, 0xfd1f, 0x11d2, 0xb1, 0xf4, 0x00, 0xc0, 0x4f, 0x8e, 0xeb, 0x3e);
+DEFINE_GUID(CLSID_NewMenu, 0xd969a300, 0xe7ff, 0x11d0, 0xa9, 0x3b, 0x0, 0xa0, 0xc9, 0xf, 0x27, 0x19);
+
#define PSGUID_SHELLDETAILS {0x28636aa6, 0x953d, 0x11d2, 0xb5, 0xd6, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0}
DEFINE_GUID(FMTID_ShellDetails, 0x28636aa6, 0x953d, 0x11d2, 0xb5, 0xd6, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0);
#define PID_FINDDATA 0
--
2.11.0
2.7.4

View File

@ -1,24 +1,24 @@
From d76e9bb4c57cb75a29a0a59bc9ce64fa4da85626 Mon Sep 17 00:00:00 2001
From 09257c42ac366ba4a26878ad52781b3b4e7a5637 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 1 Oct 2017 01:44:57 +0200
Subject: wined3d: Implement updating swap interval through
Subject: [PATCH] wined3d: Implement updating swap interval through
wined3d_swapchain_present.
---
dlls/d3d8/swapchain.c | 2 +-
dlls/d3d9/device.c | 4 ++--
dlls/d3d9/swapchain.c | 2 +-
dlls/dxgi/swapchain.c | 15 +++++++++++++--
dlls/dxgi/swapchain.c | 16 +++++++++++++---
dlls/wined3d/cs.c | 11 ++++++++++-
dlls/wined3d/surface.c | 2 +-
dlls/wined3d/swapchain.c | 5 +++--
dlls/wined3d/wined3d.spec | 2 +-
dlls/wined3d/wined3d_private.h | 4 ++--
include/wine/wined3d.h | 2 +-
10 files changed, 35 insertions(+), 14 deletions(-)
10 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/dlls/d3d8/swapchain.c b/dlls/d3d8/swapchain.c
index 6fd30e5ba47..7e9e2c2bcd2 100644
index 7003aa3..3a588b5 100644
--- a/dlls/d3d8/swapchain.c
+++ b/dlls/d3d8/swapchain.c
@@ -105,7 +105,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d8_swapchain_Present(IDirect3DSwapChai
@ -31,10 +31,10 @@ index 6fd30e5ba47..7e9e2c2bcd2 100644
return hr;
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index cd42cbccb37..994f85b714a 100644
index 5e0f558..d7f4a25 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -911,7 +911,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_Present(IDirect3DDevice9Ex *
@@ -992,7 +992,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_Present(IDirect3DDevice9Ex *
for (i = 0; i < device->implicit_swapchain_count; ++i)
{
if (FAILED(hr = wined3d_swapchain_present(device->implicit_swapchains[i]->wined3d_swapchain,
@ -43,7 +43,7 @@ index cd42cbccb37..994f85b714a 100644
{
wined3d_mutex_unlock();
return hr;
@@ -3505,7 +3505,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_PresentEx(IDirect3DDevice9Ex
@@ -3667,7 +3667,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_PresentEx(IDirect3DDevice9Ex
for (i = 0; i < device->implicit_swapchain_count; ++i)
{
if (FAILED(hr = wined3d_swapchain_present(device->implicit_swapchains[i]->wined3d_swapchain,
@ -53,7 +53,7 @@ index cd42cbccb37..994f85b714a 100644
wined3d_mutex_unlock();
return hr;
diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c
index 8f3803ae823..c9e4fa3d6d8 100644
index 411040a..dbb3f45 100644
--- a/dlls/d3d9/swapchain.c
+++ b/dlls/d3d9/swapchain.c
@@ -137,7 +137,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_swapchain_Present(IDirect3DSwapChai
@ -66,19 +66,23 @@ index 8f3803ae823..c9e4fa3d6d8 100644
return hr;
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c
index 90c8ab55094..263415f728e 100644
index 1f88d71..70fb460 100644
--- a/dlls/dxgi/swapchain.c
+++ b/dlls/dxgi/swapchain.c
@@ -166,11 +166,22 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDevice(IDXGISwapChain *iface,
static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present(IDXGISwapChain *iface, UINT sync_interval, UINT flags)
@@ -528,6 +528,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present1(IDXGISwapChain1 *iface,
UINT sync_interval, UINT flags, const DXGI_PRESENT_PARAMETERS *present_parameters)
{
struct dxgi_swapchain *This = impl_from_IDXGISwapChain(iface);
struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain1(iface);
+ DWORD swap_interval = 0;
HRESULT hr;
TRACE("iface %p, sync_interval %u, flags %#x\n", iface, sync_interval, flags);
TRACE("iface %p, sync_interval %u, flags %#x, present_parameters %p.\n",
@@ -541,13 +542,22 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present1(IDXGISwapChain1 *iface,
return S_OK;
}
- if (sync_interval) FIXME("Unimplemented sync interval %u\n", sync_interval);
- if (sync_interval)
- FIXME("Unimplemented sync interval %u.\n", sync_interval);
+ switch (sync_interval)
+ {
+ case 0:
@ -90,20 +94,17 @@ index 90c8ab55094..263415f728e 100644
+ default:
+ FIXME("Unimplemented sync interval %u.\n", sync_interval);
+ }
if (flags == DXGI_PRESENT_TEST)
{
@@ -181,7 +192,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present(IDXGISwapChain *iface, U
if (flags) FIXME("Unimplemented flags %#x\n", flags);
if (present_parameters)
FIXME("Ignored present parameters %p.\n", present_parameters);
wined3d_mutex_lock();
- hr = wined3d_swapchain_present(This->wined3d_swapchain, NULL, NULL, NULL, 0);
+ hr = wined3d_swapchain_present(This->wined3d_swapchain, NULL, NULL, NULL, swap_interval, 0);
- hr = wined3d_swapchain_present(swapchain->wined3d_swapchain, NULL, NULL, NULL, 0);
+ hr = wined3d_swapchain_present(swapchain->wined3d_swapchain, NULL, NULL, NULL, swap_interval, 0);
wined3d_mutex_unlock();
return hr;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 3a5ad441e14..1ec53fbba76 100644
index 2f77c7b..2356bce 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -94,6 +94,7 @@ struct wined3d_cs_present
@ -114,7 +115,7 @@ index 3a5ad441e14..1ec53fbba76 100644
DWORD flags;
};
@@ -461,6 +462,12 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
@@ -453,6 +454,12 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
swapchain = op->swapchain;
wined3d_swapchain_set_window(swapchain, op->dst_window_override);
@ -127,7 +128,7 @@ index 3a5ad441e14..1ec53fbba76 100644
swapchain->swapchain_ops->swapchain_present(swapchain, &op->src_rect, &op->dst_rect, op->flags);
wined3d_resource_release(&swapchain->front_buffer->resource);
@@ -473,7 +480,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
@@ -465,7 +472,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
}
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
@ -137,7 +138,7 @@ index 3a5ad441e14..1ec53fbba76 100644
{
struct wined3d_cs_present *op;
unsigned int i;
@@ -485,6 +493,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -477,6 +485,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
op->swapchain = swapchain;
op->src_rect = *src_rect;
op->dst_rect = *dst_rect;
@ -146,10 +147,10 @@ index 3a5ad441e14..1ec53fbba76 100644
pending = InterlockedIncrement(&cs->pending_presents);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9d48ad8fe2d..73fa9356cfb 100644
index 387326b..9432a4d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3920,7 +3920,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -3961,7 +3961,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
/* Set the swap effect to COPY, we don't want the backbuffer to become
* undefined. */
dst_swapchain->desc.swap_effect = WINED3D_SWAP_EFFECT_COPY;
@ -159,7 +160,7 @@ index 9d48ad8fe2d..73fa9356cfb 100644
return WINED3D_OK;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index e3940ae4cfb..7a2e877c8e1 100644
index 26cd61e..9b3962f 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -146,7 +146,8 @@ void CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWN
@ -182,10 +183,10 @@ index e3940ae4cfb..7a2e877c8e1 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 22c76a49281..d537ea6f659 100644
index d2b6bef..16d22f5 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -279,7 +279,7 @@
@@ -281,7 +281,7 @@
@ cdecl wined3d_swapchain_get_desc(ptr ptr)
@ cdecl wined3d_swapchain_get_raster_status(ptr ptr)
@ cdecl wined3d_swapchain_incref(ptr)
@ -195,12 +196,12 @@ index 22c76a49281..d537ea6f659 100644
@ cdecl wined3d_swapchain_resize_target(ptr ptr)
@ cdecl wined3d_swapchain_set_fullscreen(ptr ptr ptr)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index abef3ff2479..38cbfbe1c25 100644
index 021c274..de1a6b5 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3544,8 +3544,8 @@ void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, GLenum primitive_type,
struct wined3d_buffer *buffer, unsigned int offset, BOOL indexed) DECLSPEC_HIDDEN;
@@ -3553,8 +3553,8 @@ void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, GLenum primitive_type,
void wined3d_cs_emit_flush(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_generate_mipmaps(struct wined3d_cs *cs, struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN;
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
-void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
- const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
@ -208,12 +209,12 @@ index abef3ff2479..38cbfbe1c25 100644
+ const RECT *dst_rect, HWND dst_window_override, DWORD swap_interval, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
void wined3d_cs_emit_set_blend_state(struct wined3d_cs *cs, struct wined3d_blend_state *state) DECLSPEC_HIDDEN;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 5d9ff1a2812..52cd2a92495 100644
index b6a2ec3..96c1c25 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2668,7 +2668,7 @@ HRESULT __cdecl wined3d_swapchain_get_raster_status(const struct wined3d_swapcha
@@ -2656,7 +2656,7 @@ HRESULT __cdecl wined3d_swapchain_get_raster_status(const struct wined3d_swapcha
struct wined3d_raster_status *raster_status);
ULONG __cdecl wined3d_swapchain_incref(struct wined3d_swapchain *swapchain);
HRESULT __cdecl wined3d_swapchain_present(struct wined3d_swapchain *swapchain,
@ -223,5 +224,5 @@ index 5d9ff1a2812..52cd2a92495 100644
unsigned int width, unsigned int height, enum wined3d_format_id format_id,
enum wined3d_multisample_type multisample_type, unsigned int multisample_quality);
--
2.14.1
2.7.4