Rebase against b479382737f9ee110bc61b1dd765c5b81d56c900.

This commit is contained in:
Zebediah Figura 2019-05-03 23:09:43 -05:00
parent dc2e2153f3
commit 8cbbf850d1
9 changed files with 43 additions and 635 deletions

View File

@ -1,141 +0,0 @@
From 23ce6bcd9ebd67d6b5ed991bad555ecbc014a08d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 8 Feb 2016 04:55:07 +0100
Subject: avifil32: Correctly handle compressed frames when desired format is
specified.
---
dlls/avifil32/getframe.c | 102 +++++++++++++++++++++++------------------------
1 file changed, 50 insertions(+), 52 deletions(-)
diff --git a/dlls/avifil32/getframe.c b/dlls/avifil32/getframe.c
index 46b1683..7d98d2e 100644
--- a/dlls/avifil32/getframe.c
+++ b/dlls/avifil32/getframe.c
@@ -406,8 +406,6 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
lpbi->biSize + lpbi->biClrUsed * sizeof(RGBQUAD));
if (lpbi->biBitCount <= 8)
ICDecompressGetPalette(This->hic, This->lpInFormat, This->lpOutFormat);
-
- return AVIERR_OK;
} else {
if (bBestDisplay) {
ICGetDisplayFormat(This->hic, This->lpInFormat,
@@ -417,64 +415,64 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
AVIFILE_CloseCompressor(This);
return AVIERR_NOCOMPRESSOR;
}
+ }
- /* check output format */
- if (This->lpOutFormat->biClrUsed == 0 &&
- This->lpOutFormat->biBitCount <= 8)
- This->lpOutFormat->biClrUsed = 1u << This->lpOutFormat->biBitCount;
- if (This->lpOutFormat->biSizeImage == 0 &&
- This->lpOutFormat->biCompression == BI_RGB) {
- This->lpOutFormat->biSizeImage =
- DIBWIDTHBYTES(*This->lpOutFormat) * This->lpOutFormat->biHeight;
- }
+ /* check output format */
+ if (This->lpOutFormat->biClrUsed == 0 &&
+ This->lpOutFormat->biBitCount <= 8)
+ This->lpOutFormat->biClrUsed = 1u << This->lpOutFormat->biBitCount;
+ if (This->lpOutFormat->biSizeImage == 0 &&
+ This->lpOutFormat->biCompression == BI_RGB) {
+ This->lpOutFormat->biSizeImage =
+ DIBWIDTHBYTES(*This->lpOutFormat) * This->lpOutFormat->biHeight;
+ }
- if (lpBits == NULL) {
- DWORD size = This->lpOutFormat->biClrUsed * sizeof(RGBQUAD);
+ if (lpBits == NULL) {
+ DWORD size = This->lpOutFormat->biClrUsed * sizeof(RGBQUAD);
- size += This->lpOutFormat->biSize + This->lpOutFormat->biSizeImage;
- This->lpOutFormat = HeapReAlloc(GetProcessHeap(), 0, This->lpOutFormat, size);
- if (This->lpOutFormat == NULL) {
- AVIFILE_CloseCompressor(This);
- return AVIERR_MEMORY;
- }
- This->lpOutBuffer = DIBPTR(This->lpOutFormat);
- } else
- This->lpOutBuffer = lpBits;
-
- /* for user size was irrelevant */
- if (dx == -1)
- dx = This->lpOutFormat->biWidth;
- if (dy == -1)
- dy = This->lpOutFormat->biHeight;
-
- /* need to resize? */
- if (x != 0 || y != 0) {
- if (dy == This->lpOutFormat->biHeight &&
- dx == This->lpOutFormat->biWidth)
- This->bResize = FALSE;
- else
- This->bResize = TRUE;
+ size += This->lpOutFormat->biSize + This->lpOutFormat->biSizeImage;
+ This->lpOutFormat = HeapReAlloc(GetProcessHeap(), 0, This->lpOutFormat, size);
+ if (This->lpOutFormat == NULL) {
+ AVIFILE_CloseCompressor(This);
+ return AVIERR_MEMORY;
}
+ This->lpOutBuffer = DIBPTR(This->lpOutFormat);
+ } else
+ This->lpOutBuffer = lpBits;
+
+ /* for user size was irrelevant */
+ if (dx == -1)
+ dx = This->lpOutFormat->biWidth;
+ if (dy == -1)
+ dy = This->lpOutFormat->biHeight;
+
+ /* need to resize? */
+ if (x != 0 || y != 0) {
+ if (dy == This->lpOutFormat->biHeight &&
+ dx == This->lpOutFormat->biWidth)
+ This->bResize = FALSE;
+ else
+ This->bResize = TRUE;
+ }
- if (This->bResize) {
- This->x = x;
- This->y = y;
- This->dx = dx;
- This->dy = dy;
-
- if (ICDecompressExBegin(This->hic,0,This->lpInFormat,This->lpInBuffer,0,
- 0,This->lpInFormat->biWidth,
- This->lpInFormat->biHeight,This->lpOutFormat,
- This->lpOutBuffer, x, y, dx, dy) == ICERR_OK)
- return AVIERR_OK;
- } else if (ICDecompressBegin(This->hic, This->lpInFormat,
- This->lpOutFormat) == ICERR_OK)
+ if (This->bResize) {
+ This->x = x;
+ This->y = y;
+ This->dx = dx;
+ This->dy = dy;
+
+ if (ICDecompressExBegin(This->hic,0,This->lpInFormat,This->lpInBuffer,0,
+ 0,This->lpInFormat->biWidth,
+ This->lpInFormat->biHeight,This->lpOutFormat,
+ This->lpOutBuffer, x, y, dx, dy) == ICERR_OK)
return AVIERR_OK;
+ } else if (ICDecompressBegin(This->hic, This->lpInFormat,
+ This->lpOutFormat) == ICERR_OK)
+ return AVIERR_OK;
- AVIFILE_CloseCompressor(This);
+ AVIFILE_CloseCompressor(This);
- return AVIERR_COMPRESSOR;
- }
+ return AVIERR_COMPRESSOR;
}
static const struct IGetFrameVtbl igetframeVtbl = {
--
2.7.0

View File

@ -1 +0,0 @@
Fixes: Correctly handle compressed frames when desired format is specified

View File

@ -1,183 +0,0 @@
From 767f65c97a00ea8418f0c8309c0759a16b8b5e88 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 28 Apr 2019 10:24:07 +0000
Subject: [PATCH 2/7] dinput: Don't return unsupported interfaces.
Supersedes 163790.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/dinput/dinput_main.c | 50 ++++++++++++++++-----------------------------
dlls/dinput/tests/dinput.c | 21 ++++---------------
dlls/dinput8/tests/dinput.c | 28 ++++++++-----------------
3 files changed, 30 insertions(+), 69 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index 9e837bd..7bf067f 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -566,53 +566,39 @@ static HRESULT WINAPI IDirectInputAImpl_QueryInterface(LPDIRECTINPUT7A iface, RE
if (!riid || !ppobj)
return E_POINTER;
+ *ppobj = NULL;
+
+#if DIRECTINPUT_VERSION == 0x0700
if (IsEqualGUID( &IID_IUnknown, riid ) ||
- IsEqualGUID( &IID_IDirectInputA, riid ) ||
- IsEqualGUID( &IID_IDirectInput2A, riid ) ||
- IsEqualGUID( &IID_IDirectInput7A, riid ))
- {
+ IsEqualGUID( &IID_IDirectInputA, riid ) ||
+ IsEqualGUID( &IID_IDirectInput2A, riid ) ||
+ IsEqualGUID( &IID_IDirectInput7A, riid ))
*ppobj = &This->IDirectInput7A_iface;
- IUnknown_AddRef( (IUnknown*)*ppobj );
-
- return DI_OK;
- }
-
- if (IsEqualGUID( &IID_IDirectInputW, riid ) ||
- IsEqualGUID( &IID_IDirectInput2W, riid ) ||
- IsEqualGUID( &IID_IDirectInput7W, riid ))
- {
+ else if (IsEqualGUID( &IID_IDirectInputW, riid ) ||
+ IsEqualGUID( &IID_IDirectInput2W, riid ) ||
+ IsEqualGUID( &IID_IDirectInput7W, riid ))
*ppobj = &This->IDirectInput7W_iface;
- IUnknown_AddRef( (IUnknown*)*ppobj );
- return DI_OK;
- }
-
- if (IsEqualGUID( &IID_IDirectInput8A, riid ))
- {
+#else
+ if (IsEqualGUID( &IID_IUnknown, riid ) ||
+ IsEqualGUID( &IID_IDirectInput8A, riid ))
*ppobj = &This->IDirectInput8A_iface;
- IUnknown_AddRef( (IUnknown*)*ppobj );
-
- return DI_OK;
- }
- if (IsEqualGUID( &IID_IDirectInput8W, riid ))
- {
+ else if (IsEqualGUID( &IID_IDirectInput8W, riid ))
*ppobj = &This->IDirectInput8W_iface;
- IUnknown_AddRef( (IUnknown*)*ppobj );
- return DI_OK;
- }
+#endif
if (IsEqualGUID( &IID_IDirectInputJoyConfig8, riid ))
- {
*ppobj = &This->IDirectInputJoyConfig8_iface;
- IUnknown_AddRef( (IUnknown*)*ppobj );
+ if(*ppobj)
+ {
+ IUnknown_AddRef( (IUnknown*)*ppobj );
return DI_OK;
}
- FIXME( "Unsupported interface: %s\n", debugstr_guid(riid));
- *ppobj = NULL;
+ WARN( "Unsupported interface: %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
diff --git a/dlls/dinput/tests/dinput.c b/dlls/dinput/tests/dinput.c
index 23b20d2..6451241 100644
--- a/dlls/dinput/tests/dinput.c
+++ b/dlls/dinput/tests/dinput.c
@@ -272,11 +272,10 @@ static void test_QueryInterface(void)
static const struct
{
REFIID riid;
- int test_todo;
} no_interface_list[] =
{
- {&IID_IDirectInput8A, 1},
- {&IID_IDirectInput8W, 1},
+ {&IID_IDirectInput8A},
+ {&IID_IDirectInput8W},
{&IID_IDirectInputDeviceA},
{&IID_IDirectInputDeviceW},
{&IID_IDirectInputDevice2A},
@@ -324,20 +323,8 @@ static void test_QueryInterface(void)
{
pUnk = (void *)0xdeadbeef;
hr = IDirectInput_QueryInterface(pDI, no_interface_list[i].riid, (void **)&pUnk);
- if (no_interface_list[i].test_todo)
- {
- todo_wine
- ok(hr == E_NOINTERFACE, "[%d] IDirectInput_QueryInterface returned 0x%08x\n", i, hr);
- todo_wine
- ok(pUnk == NULL, "[%d] Output interface pointer is %p\n", i, pUnk);
-
- if (pUnk) IUnknown_Release(pUnk);
- }
- else
- {
- ok(hr == E_NOINTERFACE, "[%d] IDirectInput_QueryInterface returned 0x%08x\n", i, hr);
- ok(pUnk == NULL, "[%d] Output interface pointer is %p\n", i, pUnk);
- }
+ ok(hr == E_NOINTERFACE, "[%d] IDirectInput_QueryInterface returned 0x%08x\n", i, hr);
+ ok(pUnk == NULL, "[%d] Output interface pointer is %p\n", i, pUnk);
}
IDirectInput_Release(pDI);
diff --git a/dlls/dinput8/tests/dinput.c b/dlls/dinput8/tests/dinput.c
index 28b1bd5..d87f997 100644
--- a/dlls/dinput8/tests/dinput.c
+++ b/dlls/dinput8/tests/dinput.c
@@ -225,15 +225,14 @@ static void test_QueryInterface(void)
static const struct
{
REFIID riid;
- int test_todo;
} no_interface_list[] =
{
- {&IID_IDirectInputA, 1},
- {&IID_IDirectInputW, 1},
- {&IID_IDirectInput2A, 1},
- {&IID_IDirectInput2W, 1},
- {&IID_IDirectInput7A, 1},
- {&IID_IDirectInput7W, 1},
+ {&IID_IDirectInputA},
+ {&IID_IDirectInputW},
+ {&IID_IDirectInput2A},
+ {&IID_IDirectInput2W},
+ {&IID_IDirectInput7A},
+ {&IID_IDirectInput7W},
{&IID_IDirectInputDeviceA},
{&IID_IDirectInputDeviceW},
{&IID_IDirectInputDevice2A},
@@ -293,20 +292,9 @@ static void test_QueryInterface(void)
{
pUnk = (void *)0xdeadbeef;
hr = IDirectInput8_QueryInterface(pDI, no_interface_list[i].riid, (void **)&pUnk);
- if (no_interface_list[i].test_todo)
- {
- todo_wine
- ok(hr == E_NOINTERFACE, "[%d] IDirectInput8_QueryInterface returned 0x%08x\n", i, hr);
- todo_wine
- ok(pUnk == NULL, "[%d] Output interface pointer is %p\n", i, pUnk);
- if (pUnk) IUnknown_Release(pUnk);
- }
- else
- {
- ok(hr == E_NOINTERFACE, "[%d] IDirectInput8_QueryInterface returned 0x%08x\n", i, hr);
- ok(pUnk == NULL, "[%d] Output interface pointer is %p\n", i, pUnk);
- }
+ ok(hr == E_NOINTERFACE, "[%d] IDirectInput8_QueryInterface returned 0x%08x\n", i, hr);
+ ok(pUnk == NULL, "[%d] Output interface pointer is %p\n", i, pUnk);
}
IDirectInput8_Release(pDI);
--
1.9.1

View File

@ -1,9 +1,7 @@
From 4a846857e57963ceac9eb7302da17060facb12e3 Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Subject: [PATCH 2/2] dwampi: add initial tests
Message-Id: <20181205121826.2124-2-xerox.xerox2000x@gmail.com>
Date: Wed, 5 Dec 2018 13:18:26 +0100
In-Reply-To: <20181205121826.2124-1-xerox.xerox2000x@gmail.com>
References: <20181205121826.2124-1-xerox.xerox2000x@gmail.com>
Date: Wed, 5 Dec 2018 13:18:26 +0100
Subject: [PATCH] dwmapi: add initial tests
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
---
@ -11,16 +9,15 @@ Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
configure.ac | 1 +
dlls/dwmapi/tests/Makefile.in | 5 ++
dlls/dwmapi/tests/dwmapi.c | 108 ++++++++++++++++++++++++++++++++++
include/dwmapi.h | 3 +
5 files changed, 118 insertions(+)
4 files changed, 115 insertions(+)
create mode 100644 dlls/dwmapi/tests/Makefile.in
create mode 100644 dlls/dwmapi/tests/dwmapi.c
diff --git a/configure b/configure
index d00057ba2f..e1dde1813b 100755
index 588364f8e..ba145e3f4 100755
--- a/configure
+++ b/configure
@@ -19392,6 +19392,7 @@ wine_fn_config_makefile dlls/dssenh/tests enable_tests
@@ -20310,6 +20310,7 @@ wine_fn_config_makefile dlls/dssenh/tests enable_tests
wine_fn_config_makefile dlls/dswave enable_dswave
wine_fn_config_makefile dlls/dswave/tests enable_tests
wine_fn_config_makefile dlls/dwmapi enable_dwmapi
@ -29,10 +26,10 @@ index d00057ba2f..e1dde1813b 100755
wine_fn_config_makefile dlls/dwrite/tests enable_tests
wine_fn_config_makefile dlls/dx8vb enable_dx8vb
diff --git a/configure.ac b/configure.ac
index 50cf9a0bd0..607a46f5a9 100644
index 0ad841773..0eb2ebbe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3255,6 +3255,7 @@ WINE_CONFIG_MAKEFILE(dlls/dssenh/tests)
@@ -3267,6 +3267,7 @@ WINE_CONFIG_MAKEFILE(dlls/dssenh/tests)
WINE_CONFIG_MAKEFILE(dlls/dswave)
WINE_CONFIG_MAKEFILE(dlls/dswave/tests)
WINE_CONFIG_MAKEFILE(dlls/dwmapi)
@ -42,7 +39,7 @@ index 50cf9a0bd0..607a46f5a9 100644
WINE_CONFIG_MAKEFILE(dlls/dx8vb)
diff --git a/dlls/dwmapi/tests/Makefile.in b/dlls/dwmapi/tests/Makefile.in
new file mode 100644
index 0000000000..f365f96c72
index 000000000..f365f96c7
--- /dev/null
+++ b/dlls/dwmapi/tests/Makefile.in
@@ -0,0 +1,5 @@
@ -53,7 +50,7 @@ index 0000000000..f365f96c72
+ dwmapi.c
diff --git a/dlls/dwmapi/tests/dwmapi.c b/dlls/dwmapi/tests/dwmapi.c
new file mode 100644
index 0000000000..fe5ee33996
index 000000000..7c51e77c4
--- /dev/null
+++ b/dlls/dwmapi/tests/dwmapi.c
@@ -0,0 +1,108 @@
@ -125,7 +122,7 @@ index 0000000000..fe5ee33996
+ if (winetest_debug > 1)
+ trace("returning %x\n", res);
+
+ ret = -1;
+ ret = -1;
+ res = pDwmIsCompositionEnabled(&ret);
+ ok(res == S_OK && ret == FALSE, "got %x and %d\n", res, ret);
+ }
@ -165,21 +162,6 @@ index 0000000000..fe5ee33996
+ test_isdwmenabled();
+ test_dwm_get_transport_attributes();
+}
diff --git a/include/dwmapi.h b/include/dwmapi.h
index b2f39deae5..12527aee62 100644
--- a/include/dwmapi.h
+++ b/include/dwmapi.h
@@ -101,6 +101,9 @@ typedef struct _MilMatrix3x2D
DOUBLE DY;
} MilMatrix3x2D;
+#define DWM_EC_DISABLECOMPOSITION 0
+#define DWM_EC_ENABLECOMPOSITION 1
+
#define DWM_BB_ENABLE 0x00000001
#define DWM_BB_BLURREGION 0x00000002
#define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004
--
2.17.1
2.21.0

View File

@ -1,7 +1,7 @@
From 2887a75d89ec2552abb472603f8db70a6e70c1f8 Mon Sep 17 00:00:00 2001
From 5eddf968dfe301274c53a11f1f4d28e8b77fdb87 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sat, 9 Jun 2018 15:39:37 -0500
Subject: [PATCH 25/83] server: Create eventfd descriptors for device manager
Subject: [PATCH] server: Create eventfd descriptors for device manager
objects.
We don't have to worry about synchronization here because
@ -15,7 +15,7 @@ Drives tab.
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/server/device.c b/server/device.c
index 67505d99c..aaec23495 100644
index a6bfa06eb..5f82daa73 100644
--- a/server/device.c
+++ b/server/device.c
@@ -39,6 +39,7 @@
@ -26,9 +26,9 @@ index 67505d99c..aaec23495 100644
/* IRP object */
@@ -91,10 +92,12 @@ struct device_manager
struct list devices; /* list of devices */
@@ -92,10 +93,12 @@ struct device_manager
struct list requests; /* list of pending irps across all devices */
struct irp_call *current_call; /* call currently executed on client side */
struct wine_rb_tree kernel_objects; /* map of objects that have client side pointer associated */
+ int esync_fd; /* esync file descriptor */
};
@ -39,7 +39,7 @@ index 67505d99c..aaec23495 100644
static void device_manager_destroy( struct object *obj );
static const struct object_ops device_manager_ops =
@@ -105,7 +108,7 @@ static const struct object_ops device_manager_ops =
@@ -106,7 +109,7 @@ static const struct object_ops device_manager_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
device_manager_signaled, /* signaled */
@ -48,7 +48,7 @@ index 67505d99c..aaec23495 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -659,6 +662,9 @@ static void delete_file( struct device_file *file )
@@ -694,6 +697,9 @@ static void delete_file( struct device_file *file )
/* terminate all pending requests */
LIST_FOR_EACH_ENTRY_SAFE( irp, next, &file->requests, struct irp_call, dev_entry )
{
@ -58,7 +58,7 @@ index 67505d99c..aaec23495 100644
list_remove( &irp->mgr_entry );
set_irp_result( irp, STATUS_FILE_DELETED, NULL, 0, 0 );
}
@@ -695,6 +701,13 @@ static int device_manager_signaled( struct object *obj, struct wait_queue_entry
@@ -726,6 +732,13 @@ static int device_manager_signaled( struct object *obj, struct wait_queue_entry
return !list_empty( &manager->requests );
}
@ -72,7 +72,7 @@ index 67505d99c..aaec23495 100644
static void device_manager_destroy( struct object *obj )
{
struct device_manager *manager = (struct device_manager *)obj;
@@ -725,6 +738,9 @@ static void device_manager_destroy( struct object *obj )
@@ -760,6 +773,9 @@ static void device_manager_destroy( struct object *obj )
assert( !irp->file && !irp->async );
release_object( irp );
}
@ -82,7 +82,7 @@ index 67505d99c..aaec23495 100644
}
static struct device_manager *create_device_manager(void)
@@ -736,6 +752,9 @@ static struct device_manager *create_device_manager(void)
@@ -772,6 +788,9 @@ static struct device_manager *create_device_manager(void)
list_init( &manager->devices );
list_init( &manager->requests );
wine_rb_init( &manager->kernel_objects, compare_kernel_object );
@ -92,16 +92,16 @@ index 67505d99c..aaec23495 100644
}
return manager;
}
@@ -874,6 +893,9 @@ DECL_HANDLER(get_next_device_request)
list_remove( &irp->mgr_entry );
list_init( &irp->mgr_entry );
if (!irp->file) release_object( irp ); /* no longer on manager queue */
@@ -930,6 +949,9 @@ DECL_HANDLER(get_next_device_request)
/* we already own the object if it's only on manager queue */
if (irp->file) grab_object( irp );
manager->current_call = irp;
+
+ if (do_esync() && list_empty( &manager->requests ))
+ esync_clear( manager->esync_fd );
+ if (do_esync() && list_empty( &manager->requests ))
+ esync_clear( manager->esync_fd );
}
else close_handle( current->process, reply->next );
}
}
else set_error( STATUS_PENDING );
--
2.20.1
2.21.0

View File

@ -1,4 +1,4 @@
From cccf1b75e810985c817d34329878f497d853d3ac Mon Sep 17 00:00:00 2001
From ac9e5c8733b503db651b358c78aef60294a70aff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 9 Jan 2016 16:57:49 +0100
Subject: explorer: Create CurrentControlSet\Control\Video registry key as
@ -14,10 +14,10 @@ Signed-off-by: Michael Müller <michael@fds-team.de>
2 files changed, 16 insertions(+)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index ef5d989..6387697 100644
index d1fe3f05f..011c2fcea 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -1340,6 +1340,13 @@ static void test_reg_create_key(void)
@@ -1345,6 +1345,13 @@ static void test_reg_create_key(void)
RegDeleteKeyA(hkey1, "");
RegCloseKey(hkey1);
@ -32,10 +32,10 @@ index ef5d989..6387697 100644
hkey1 = NULL;
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL);
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c
index 2b8502b..85cb4bc 100644
index 2857fcfca..bfe3bec18 100644
--- a/programs/explorer/desktop.c
+++ b/programs/explorer/desktop.c
@@ -775,6 +775,11 @@ static BOOL get_default_enable_shell( const WCHAR *name )
@@ -754,6 +754,11 @@ static BOOL get_default_enable_shell( const WCHAR *name )
static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
{
@ -47,7 +47,7 @@ index 2b8502b..85cb4bc 100644
static const WCHAR device_keyW[] = {
'S','y','s','t','e','m','\\',
'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
@@ -838,6 +843,10 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
@@ -817,6 +822,10 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
TRACE( "display %s driver %s\n", debugstr_guid(guid), debugstr_w(buffer) );
}
@ -55,9 +55,9 @@ index 2b8502b..85cb4bc 100644
+ if (!RegCreateKeyExW( HKEY_LOCAL_MACHINE, video_keyW, 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey, NULL ))
+ RegCloseKey( hkey );
+
sprintfW( key, device_keyW, guid->Data1, guid->Data2, guid->Data3,
swprintf( key, ARRAY_SIZE(key), device_keyW, guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
--
2.6.4
2.21.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "0ece679210897774b3b43e483658fe6511a84676"
echo "b479382737f9ee110bc61b1dd765c5b81d56c900"
}
# Show version information
@ -92,7 +92,6 @@ patch_enable_all ()
enable_advapi32_Token_Integrity_Level="$1"
enable_api_ms_win_Stub_DLLs="$1"
enable_atl_AtlAxDialogBox="$1"
enable_avifil32_IGetFrame_fnSetFormat="$1"
enable_bcrypt_BCryptSecretAgreement="$1"
enable_combase_GetRestrictedErrorInfo="$1"
enable_comctl32_Listview_DrawItem="$1"
@ -263,7 +262,6 @@ patch_enable_all ()
enable_server_device_manager_destroy="$1"
enable_setupapi_DiskSpaceList="$1"
enable_setupapi_Display_Device="$1"
enable_setupapi_HSPFILEQ_Check_Type="$1"
enable_setupapi_SPFILENOTIFY_FILEINCABINET="$1"
enable_setupapi_SP_COPY_IN_USE_NEEDS_REBOOT="$1"
enable_setupapi_SetupPromptForDisk="$1"
@ -410,9 +408,6 @@ patch_enable ()
atl-AtlAxDialogBox)
enable_atl_AtlAxDialogBox="$2"
;;
avifil32-IGetFrame_fnSetFormat)
enable_avifil32_IGetFrame_fnSetFormat="$2"
;;
bcrypt-BCryptSecretAgreement)
enable_bcrypt_BCryptSecretAgreement="$2"
;;
@ -923,9 +918,6 @@ patch_enable ()
setupapi-Display_Device)
enable_setupapi_Display_Device="$2"
;;
setupapi-HSPFILEQ_Check_Type)
enable_setupapi_HSPFILEQ_Check_Type="$2"
;;
setupapi-SPFILENOTIFY_FILEINCABINET)
enable_setupapi_SPFILENOTIFY_FILEINCABINET="$2"
;;
@ -2263,18 +2255,6 @@ if test "$enable_atl_AtlAxDialogBox" -eq 1; then
) >> "$patchlist"
fi
# Patchset avifil32-IGetFrame_fnSetFormat
# |
# | Modified files:
# | * dlls/avifil32/getframe.c
# |
if test "$enable_avifil32_IGetFrame_fnSetFormat" -eq 1; then
patch_apply avifil32-IGetFrame_fnSetFormat/0001-avifil32-Correctly-handle-compressed-frames-when-des.patch
(
printf '%s\n' '+ { "Michael Müller", "avifil32: Correctly handle compressed frames when desired format is specified.", 1 },';
) >> "$patchlist"
fi
# Patchset bcrypt-BCryptSecretAgreement
# |
# | This patchset fixes the following Wine bugs:
@ -3090,19 +3070,16 @@ fi
# |
# | Modified files:
# | * dlls/dinput/device.c, dlls/dinput/dinput_main.c, dlls/dinput/joystick_linux.c, dlls/dinput/joystick_linuxinput.c,
# | dlls/dinput/joystick_osx.c, dlls/dinput/mouse.c, dlls/dinput/tests/dinput.c, dlls/dinput/tests/joystick.c,
# | dlls/dinput/tests/mouse.c, dlls/dinput8/tests/dinput.c
# | dlls/dinput/joystick_osx.c, dlls/dinput/mouse.c, dlls/dinput/tests/joystick.c, dlls/dinput/tests/mouse.c
# |
if test "$enable_dinput_joy_directX3" -eq 1; then
patch_apply dinput-joy-directX3/0001-dinput-Allow-Enumeration-of-joysticks-with-DirectX-3.patch
patch_apply dinput-joy-directX3/0002-dinput-Don-t-return-unsupported-interfaces.patch
patch_apply dinput-joy-directX3/0003-dinput-Return-E_NOINTERFACE-from-IDirectInputDevice2.patch
patch_apply dinput-joy-directX3/0004-dinput-Dont-report-we-cannot-open-a-device.patch
patch_apply dinput-joy-directX3/0005-dinput-Improve-EnumDevice-tracing.patch
patch_apply dinput-joy-directX3/0006-dinput-Support-DIDEVICEINSTANCE_DX3-for-Mouse-GetDev.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dinput: Allow Enumeration of joysticks with DirectX 3.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dinput: Don'\''t return unsupported interfaces.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dinput: Return E_NOINTERFACE from IDirectInputDevice2 QueryInterface.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dinput: Dont report we cannot open a device.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dinput: Improve EnumDevice tracing.", 1 },';
@ -3239,12 +3216,12 @@ fi
# | Vista/Win7 mode)
# |
# | Modified files:
# | * configure, configure.ac, dlls/dwmapi/tests/Makefile.in, dlls/dwmapi/tests/dwmapi.c, include/dwmapi.h
# | * configure, configure.ac, dlls/dwmapi/tests/Makefile.in, dlls/dwmapi/tests/dwmapi.c
# |
if test "$enable_dwmapi_DwmGetTransportAttributes" -eq 1; then
patch_apply dwmapi-DwmGetTransportAttributes/0002-dwmapi-add-initial-tests.patch
(
printf '%s\n' '+ { "Louis Lenders", "dwampi: Add initial tests.", 1 },';
printf '%s\n' '+ { "Louis Lenders", "dwmapi: Add initial tests.", 1 },';
) >> "$patchlist"
fi
@ -5655,21 +5632,6 @@ if test "$enable_setupapi_Display_Device" -eq 1; then
) >> "$patchlist"
fi
# Patchset setupapi-HSPFILEQ_Check_Type
# |
# | This patchset fixes the following Wine bugs:
# | * [#12332] Check handle type for HSPFILEQ handles
# |
# | Modified files:
# | * dlls/setupapi/queue.c
# |
if test "$enable_setupapi_HSPFILEQ_Check_Type" -eq 1; then
patch_apply setupapi-HSPFILEQ_Check_Type/0001-setupapi-Check-handle-type-for-HSPFILEQ-handles.patch
(
printf '%s\n' '+ { "Michael Müller", "setupapi: Check handle type for HSPFILEQ handles.", 1 },';
) >> "$patchlist"
fi
# Patchset setupapi-SPFILENOTIFY_FILEINCABINET
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,210 +0,0 @@
From d666027358311859a5d245893840a5b752f2e2cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 27 Nov 2015 21:28:50 +0100
Subject: [PATCH] setupapi: Check handle type for HSPFILEQ handles.
---
dlls/setupapi/queue.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)
diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c
index c065c6e..e0d3dc5 100644
--- a/dlls/setupapi/queue.c
+++ b/dlls/setupapi/queue.c
@@ -77,8 +77,11 @@ struct file_op_queue
unsigned int count;
};
+#define SETUP_FILE_QUEUE_MAGIC 0x51465053 /* "SPFQ" */
+
struct file_queue
{
+ DWORD magic;
struct file_op_queue copy_queue;
struct file_op_queue delete_queue;
struct file_op_queue rename_queue;
@@ -434,6 +437,7 @@ HSPFILEQ WINAPI SetupOpenFileQueue(void)
if (!(queue = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*queue))))
return INVALID_HANDLE_VALUE;
+ queue->magic = SETUP_FILE_QUEUE_MAGIC;
return queue;
}
@@ -446,6 +450,13 @@ BOOL WINAPI SetupCloseFileQueue( HSPFILEQ handle )
struct file_queue *queue = handle;
unsigned int i;
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
+ queue->magic = 0;
free_file_op_queue( &queue->copy_queue );
free_file_op_queue( &queue->rename_queue );
free_file_op_queue( &queue->delete_queue );
@@ -535,6 +546,12 @@ BOOL WINAPI SetupQueueCopyIndirectW( PSP_FILE_COPY_PARAMS_W params )
struct file_queue *queue = params->QueueHandle;
struct file_op *op;
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
if (!(op = HeapAlloc( GetProcessHeap(), 0, sizeof(*op) ))) return FALSE;
op->style = params->CopyStyle;
op->src_path = strdupW( params->SourcePath );
@@ -681,6 +698,12 @@ BOOL WINAPI SetupQueueDeleteA( HSPFILEQ handle, PCSTR part1, PCSTR part2 )
struct file_queue *queue = handle;
struct file_op *op;
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
if (!(op = heap_alloc_zero( sizeof(*op) ))) return FALSE;
op->dst_path = strdupAtoW( part1 );
op->dst_file = strdupAtoW( part2 );
@@ -697,6 +720,12 @@ BOOL WINAPI SetupQueueDeleteW( HSPFILEQ handle, PCWSTR part1, PCWSTR part2 )
struct file_queue *queue = handle;
struct file_op *op;
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
if (!(op = heap_alloc_zero( sizeof(*op) ))) return FALSE;
op->dst_path = strdupW( part1 );
op->dst_file = strdupW( part2 );
@@ -714,6 +743,12 @@ BOOL WINAPI SetupQueueRenameA( HSPFILEQ handle, PCSTR SourcePath, PCSTR SourceFi
struct file_queue *queue = handle;
struct file_op *op;
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
if (!(op = heap_alloc_zero( sizeof(*op) ))) return FALSE;
op->src_path = strdupAtoW( SourcePath );
op->src_file = strdupAtoW( SourceFilename );
@@ -733,6 +768,12 @@ BOOL WINAPI SetupQueueRenameW( HSPFILEQ handle, PCWSTR SourcePath, PCWSTR Source
struct file_queue *queue = handle;
struct file_op *op;
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
if (!(op = heap_alloc_zero( sizeof(*op) ))) return FALSE;
op->src_path = strdupW( SourcePath );
op->src_file = strdupW( SourceFilename );
@@ -1310,6 +1351,12 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC
paths.Source = paths.Target = NULL;
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
if (!queue->copy_queue.count && !queue->delete_queue.count && !queue->rename_queue.count)
return TRUE; /* nothing to do */
@@ -1515,6 +1562,12 @@ BOOL WINAPI SetupScanFileQueueW( HSPFILEQ handle, DWORD flags, HWND window,
TRACE("%p %x %p %p %p %p\n", handle, flags, window, handler, context, result);
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
if (!queue->copy_queue.count) return TRUE;
if (flags & SPQ_SCAN_USE_CALLBACK) notification = SPFILENOTIFY_QUEUESCAN;
@@ -1561,6 +1614,12 @@ BOOL WINAPI SetupGetFileQueueCount( HSPFILEQ handle, UINT op, PUINT result )
{
struct file_queue *queue = handle;
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
switch(op)
{
case FILEOP_COPY:
@@ -1583,6 +1642,13 @@ BOOL WINAPI SetupGetFileQueueCount( HSPFILEQ handle, UINT op, PUINT result )
BOOL WINAPI SetupGetFileQueueFlags( HSPFILEQ handle, PDWORD flags )
{
struct file_queue *queue = handle;
+
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
*flags = queue->flags;
return TRUE;
}
@@ -1594,6 +1660,13 @@ BOOL WINAPI SetupGetFileQueueFlags( HSPFILEQ handle, PDWORD flags )
BOOL WINAPI SetupSetFileQueueFlags( HSPFILEQ handle, DWORD mask, DWORD flags )
{
struct file_queue *queue = handle;
+
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
queue->flags = (queue->flags & ~mask) | flags;
return TRUE;
}
@@ -1875,6 +1948,13 @@ UINT WINAPI SetupCopyErrorW( HWND parent, PCWSTR dialogTitle, PCWSTR diskname,
DWORD WINAPI pSetupGetQueueFlags( HSPFILEQ handle )
{
struct file_queue *queue = handle;
+
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
return queue->flags;
}
@@ -1884,6 +1964,13 @@ DWORD WINAPI pSetupGetQueueFlags( HSPFILEQ handle )
BOOL WINAPI pSetupSetQueueFlags( HSPFILEQ handle, DWORD flags )
{
struct file_queue *queue = handle;
+
+ if (!queue || queue->magic != SETUP_FILE_QUEUE_MAGIC)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
queue->flags = flags;
return TRUE;
}
--
1.9.1

View File

@ -1 +0,0 @@
Fixes: [12332] Check handle type for HSPFILEQ handles