Compare commits

..

25 Commits

Author SHA1 Message Date
Sebastian Lackner
9d13bfd569 Release 1.8.3. 2016-07-10 07:01:18 +02:00
Sebastian Lackner
739a308958 Rebase against 205228eb80089c38b25e7249073021e7806d2bfa.
[dinput-DIPROP_USERNAME]
Removed patch to implement dinput device property DIPROP_USERNAME (accepted
upstream).

[kernel32-GetFinalPathNameByHandle]
Removed patch to add support for GetFinalPathNameByHandle (accepted upstream).

[ntoskrnl-Stubs]
Removed patches for KeDelayExecutionThread and PsRemoveLoadImageNotifyRoutine
stubs (accepted upstream).

[server-Parent_Process]
Removed patch to avoid holding reference on parent process in wineserver
(accepted upstream).

[wined3d-Geforce_425M]
Removed patch to add wined3d detection for GeForce GT 425M (accepted upstream).

[winscard-SCardListReaders]
Removed patch to add stub for winscard.SCardListReadersA/W (accepted upstream).
2016-06-25 19:50:04 +02:00
Sebastian Lackner
35b9051d1c Release 1.8.2. 2016-04-19 06:34:52 +02:00
Sebastian Lackner
7e776b7a90 Rebase against 24a730187e08699b51c698d4fed58ba2947f0c5d.
[kernel32-CompareString_Length]
Removed patch to make sure CompareString aborts on first non-matching character
(accepted upstream).

[kernel32-GetLogicalProcessorInformationEx]
Removed patch to return TRUE from GetLogicalProcessorInformationEx stub
(accepted upstream).

[user32-WM_CAPTURECHANGE]
Removed patch to send WM_CAPTURECHANGE also when capture has not changed
(accepted upstream).

[wined3d-Multisampling]
Removed patch to allow to override number of quality levels for
D3DMULTISAMPLE_NONMASKABLE (fixed upstream).
2016-04-13 18:08:17 +02:00
Sebastian Lackner
24dcca66e3 Release 1.8.1. 2016-03-27 06:51:29 +02:00
Sebastian Lackner
9118e47cd3 kernel32-CompareString_Length: Update patchset to correctly handle comparison of strings ending with multiple \0 characters.
(cherry picked from commit d924f74e90)
2016-03-27 06:01:53 +02:00
Sebastian Lackner
8ae4e4601d Pipelight: Add a missing CDECL.
(cherry picked from commit 09612a2923)
2016-03-27 06:01:48 +02:00
Sebastian Lackner
21efb9c6f2 Added patch to avoid inheriting QT_* environment variables to Windows environment.
(cherry picked from commit 5e0122ae53)
2016-03-27 06:01:40 +02:00
Sebastian Lackner
4c11d0c812 ntdll-DOS_Attributes: Always store SAMBA_XATTR_DOS_ATTRIB when path could be interpreted as hidden.
(cherry picked from commit a560ca2cee)
2016-03-27 06:01:29 +02:00
Sebastian Lackner
d7546964c7 patchupdate.py: Split logic to generate apply order / check patch dependencies into separate function.
(cherry picked from commit bca995cef8)
2016-03-27 06:01:16 +02:00
Sebastian Lackner
766590c481 patchupdate.py: Autodepends should ignore disabled patchsets.
(cherry picked from commit 72f80a6c3c)
2016-03-27 06:01:13 +02:00
Sebastian Lackner
5ed04faa06 gitapply.sh: Fix parsing of 'deleted file mode' git header.
(cherry picked from commit 4ffcf184bb)
2016-03-27 06:01:04 +02:00
Sebastian Lackner
dbaf56b01c patchupdate.py: Store last 10 hashes per file.
(cherry picked from commit 72ddac6f01)
2016-03-27 05:37:47 +02:00
Sebastian Lackner
7145f11c99 patchinstall.sh: Sort list of commands in help.
(cherry picked from commit 90dc2c0daa)
2016-03-27 05:35:21 +02:00
Sebastian Lackner
819a64744e README.md: Update readme.
(cherry picked from commit f1a2b30343)
2016-03-27 05:35:11 +02:00
Sebastian Lackner
5bcbac4982 patchinstall.sh: Remove comment about Makefiles.
(cherry picked from commit 74cffcfdb6)
2016-03-27 05:34:49 +02:00
Sebastian Lackner
ed7fe13391 patchutils.py: Fix a bug in preprocessor when parsing specific strings.
(cherry picked from commit ff0e7cc638)
2016-03-27 05:33:16 +02:00
Sebastian Lackner
740b727a94 patchupdate.py: Generate #ifdef patches in alphabetical order.
(cherry picked from commit 0a5887e483)
2016-03-27 05:32:53 +02:00
Sebastian Lackner
33c9d17dee patchupdate.py: Several style improvements and cleanup.
(cherry picked from commit 67c348107c)
2016-03-27 05:30:23 +02:00
Sebastian Lackner
5d4124c92b patchupdate.py: Remove unused optional revision argument from read_patchset function.
(cherry picked from commit 33a4d4c90e)
2016-03-27 05:29:37 +02:00
Sebastian Lackner
02d83cab14 patchinstall.sh: No longer depend on debian changelog file.
The repository no longer contains packaging files for debian.
This information will be provided on a separate website soon.

(cherry picked from commit e4321c5093)
2016-03-27 05:29:05 +02:00
Sebastian Lackner
7fc4595aaa README.md: Remove autogenerated list of fixed bugs.
This information will be provided on a separate website soon.

(cherry picked from commit e4d488316c)
2016-03-27 05:27:24 +02:00
Sebastian Lackner
364cd111e2 patchutils.py: Fix a bug related to #ifdef patch generator.
(cherry picked from commit f2fccc7342)
2016-03-27 05:23:00 +02:00
Sebastian Lackner
e9f11bd51b Rebase against 84cae8c3ea2614fce65d5d499159de9d530444ef.
[ntdll-x86_64_set_cpu_context]
Removed patch to allow to set debug registers separately in NtSetContextThread
(accepted upstream).
2016-03-27 05:20:50 +02:00
Sebastian Lackner
15f62469af patchupdate.py: Track the stable branch of Wine. 2016-03-27 04:07:21 +02:00
270 changed files with 3209 additions and 5592 deletions

View File

@@ -1,12 +1,12 @@
From 7cb209e122fc503190dcad411483147ebc6d6cb4 Mon Sep 17 00:00:00 2001
From 940f22fae1e118faab3aa2926d050ad3c84a3e79 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 11 Nov 2014 03:11:33 +0100
Subject: ntdll: Implement emulation of SIDT instruction when using Exagear.
---
configure.ac | 8 ++
dlls/ntdll/signal_i386.c | 224 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 232 insertions(+)
dlls/ntdll/signal_i386.c | 223 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 231 insertions(+)
diff --git a/configure.ac b/configure.ac
index 92d78a2..c88a139 100644
@@ -20,7 +20,7 @@ index 92d78a2..c88a139 100644
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support]),
[if test "x$withval" = "xno"; then ac_cv_header_sys_asoundlib_h=no; ac_cv_header_alsa_asoundlib_h=no; fi])
@@ -367,6 +368,13 @@ fi
@@ -363,6 +364,13 @@ fi
WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false],
[gettext tools not found (or too old), translations won't be built.])
@@ -35,7 +35,7 @@ index 92d78a2..c88a139 100644
dnl Check for -li386 for NetBSD and OpenBSD
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 13df4bb..edf5ea8 100644
index 5708aae..f27ce56 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -96,6 +96,14 @@ typedef struct
@@ -53,11 +53,10 @@ index 13df4bb..edf5ea8 100644
/***********************************************************************
* signal context platform-specific definitions
*/
@@ -1573,6 +1581,214 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
}
@@ -1898,6 +1906,213 @@ static inline DWORD get_fpu_code( const CONTEXT *context )
}
+
+#ifdef EXAGEAR_COMPAT
+
+/***********************************************************************
@@ -265,10 +264,10 @@ index 13df4bb..edf5ea8 100644
+#endif /* EXAGEAR_COMPAT */
+
+
/***********************************************************************
* check_invalid_gs
*
@@ -1902,6 +2118,14 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context
/**********************************************************************
* raise_segv_exception
*/
@@ -1907,6 +2122,14 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context
switch(rec->ExceptionCode)
{
@@ -284,5 +283,5 @@ index 13df4bb..edf5ea8 100644
if (rec->NumberParameters == 2)
{
--
2.1.3
2.7.1

View File

@@ -29,7 +29,7 @@ index 758ba43..7ccd3a1 100644
wined3d_wndproc_mutex_unlock();
}
+void wined3d_strictdrawing_set(int value)
+void CDECL wined3d_strictdrawing_set(int value)
+{
+ wined3d_settings.strict_draw_ordering = value;
+}

View File

@@ -0,0 +1,64 @@
From a5cf87f611909a601fe00cbdd5235add43652c54 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Nov 2015 17:29:43 +0100
Subject: advapi32: Add stubs for RegCreateKeyTransacted[A/W] functions.
---
dlls/advapi32/advapi32.spec | 4 ++--
dlls/advapi32/registry.c | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index ff2b0de..36f176b 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -581,8 +581,8 @@
@ stdcall RegCreateKeyExA(long str long ptr long long ptr ptr ptr)
@ stdcall RegCreateKeyExW(long wstr long ptr long long ptr ptr ptr)
@ stdcall RegCreateKeyW(long wstr ptr)
-# @ stub RegCreateKeyTransactedA
-# @ stub RegCreateKeyTransactedW
+@ stdcall RegCreateKeyTransactedA(long str long ptr long long ptr ptr ptr long ptr)
+@ stdcall RegCreateKeyTransactedW(long wstr long ptr long long ptr ptr ptr long ptr)
@ stdcall RegDeleteKeyA(long str)
@ stdcall RegDeleteKeyExA(long str long long)
@ stdcall RegDeleteKeyExW(long wstr long long)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 798f93d..6b4c873 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -473,6 +473,31 @@ LSTATUS WINAPI RegCreateKeyA( HKEY hkey, LPCSTR lpSubKey, PHKEY phkResult )
}
+/******************************************************************************
+ * RegCreateKeyTransactedW [ADVAPI32.@]
+ */
+LSTATUS WINAPI RegCreateKeyTransactedW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR class,
+ DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
+ PHKEY retkey, LPDWORD dispos, HANDLE transaction, PVOID reserved2 )
+{
+ FIXME( "(%p,%s,%u,%s,%u,%u,%p,%p,%p,%p,%p): stub\n", hkey, debugstr_w(name), reserved,
+ debugstr_w(class), options, access, sa, retkey, dispos, transaction, reserved2 );
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/******************************************************************************
+ * RegCreateKeyTransactedA [ADVAPI32.@]
+ */
+LSTATUS WINAPI RegCreateKeyTransactedA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR class,
+ DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
+ PHKEY retkey, LPDWORD dispos, HANDLE transaction, PVOID reserved2 )
+{
+ FIXME( "(%p,%s,%u,%s,%u,%u,%p,%p,%p,%p,%p): stub\n", hkey, debugstr_a(name), reserved,
+ debugstr_a(class), options, access, sa, retkey, dispos, transaction, reserved2 );
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
/******************************************************************************
* RegOpenKeyExW [ADVAPI32.@]
--
2.6.2

View File

@@ -0,0 +1 @@
Fixes: Add stubs for advapi32.RegCreateKeyTransacted[A/W]

View File

@@ -1,4 +1,4 @@
From 5d2fa4b454acdbcecd8967ca885ae6a8e8557e5c Mon Sep 17 00:00:00 2001
From 9ec1a00c3d775cd5abd91ec88af216d669136152 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sat, 17 Jan 2015 23:54:14 +0100
Subject: d3dx9_36: Implement D3DXCreateAnimationController with a stubbed
@@ -13,7 +13,7 @@ Subject: d3dx9_36: Implement D3DXCreateAnimationController with a stubbed
create mode 100644 dlls/d3dx9_36/animation.c
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
index 5958c57..95e3045 100644
index aa387b5..fd710c2 100644
--- a/dlls/d3dx9_36/Makefile.in
+++ b/dlls/d3dx9_36/Makefile.in
@@ -3,6 +3,7 @@ IMPORTLIB = d3dx9
@@ -486,12 +486,12 @@ index 0000000..72f685f
+ return D3D_OK;
+}
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
index 5eda041..aa7c928 100644
index 13f0d99..4182f59 100644
--- a/dlls/d3dx9_36/d3dx9_36.spec
+++ b/dlls/d3dx9_36/d3dx9_36.spec
@@ -30,7 +30,7 @@
@ stub D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr)
@ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr)
@ stub D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr)
@ stub D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr)
-@ stub D3DXCreateAnimationController(long long long long ptr)
+@ stdcall D3DXCreateAnimationController(long long long long ptr)
@@ -532,5 +532,5 @@ index b5f2232..c4d4d64 100644
UINT max_num_tracks, UINT max_num_events, ID3DXAnimationController **anim_controller) PURE;
};
--
2.6.4
2.2.1

View File

@@ -1,32 +0,0 @@
From cfbee3f0f952769dbf663489c2a209493c7412d3 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 11 Jan 2015 16:18:03 +0100
Subject: d3dx9_36: Add support for FOURCC surface to
save_dds_surface_to_memory.
---
dlls/d3dx9_36/surface.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 4fa2a76..58b676d 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -311,6 +311,14 @@ static HRESULT d3dformat_to_dds_pixel_format(struct dds_pixel_format *pixel_form
}
}
+ /* Reuse dds_fourcc_to_d3dformat as D3DFORMAT and FOURCC are DWORD with same values */
+ if (dds_fourcc_to_d3dformat(d3dformat) != D3DFMT_UNKNOWN)
+ {
+ pixel_format->flags |= DDS_PF_FOURCC;
+ pixel_format->fourcc = d3dformat;
+ return D3D_OK;
+ }
+
WARN("Unknown pixel format %#x\n", d3dformat);
return E_NOTIMPL;
}
--
2.6.4

View File

@@ -0,0 +1,74 @@
From 68efe5449591b9b1366d66d87fff1a8c9f8002e5 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 16 Oct 2015 14:06:30 +1100
Subject: d3dx9_36/tests: Add D3DXSaveSurfaceToFileInMemory D3DXIFF_DDS tests
Also updates the structure dds_header to be the same as d3dx9_36/surface.c.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/d3dx9_36/tests/surface.c | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index 1697a03..77bd142 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -211,7 +211,9 @@ struct dds_header
struct dds_pixel_format pixel_format;
DWORD caps;
DWORD caps2;
- DWORD reserved2[3];
+ DWORD caps3;
+ DWORD caps4;
+ DWORD reserved2;
};
/* fills dds_header with reasonable default values */
@@ -1231,6 +1233,7 @@ static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device)
RECT rect;
ID3DXBuffer *buffer;
IDirect3DSurface9 *surface;
+ struct dds_header *header;
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 4, 4, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &surface, NULL);
if (FAILED(hr)) {
@@ -1248,6 +1251,35 @@ static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device)
ID3DXBuffer_Release(buffer);
}
+ SetRect(&rect, 0, 0, 0, 0);
+ hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_DDS, surface, NULL, &rect);
+ todo_wine ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK);
+ if (SUCCEEDED(hr)) {
+ header = ID3DXBuffer_GetBufferPointer(buffer);
+
+ ok(header->magic == MAKEFOURCC('D','D','S',' '), "Invalid DDS signature\n");
+ todo_wine ok(header->size == 124, "Invalid DDS size %d\n", header->size);
+ ok(header->height == 0, "Wrong height %d\n", header->height);
+ ok(header->width == 0, "Wrong width %d\n", header->width);
+ ok(header->flags == (DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PIXELFORMAT),
+ "Wrong flags %x\n", header->flags);
+ ID3DXBuffer_Release(buffer);
+ }
+
+ hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_DDS, surface, NULL, NULL);
+ ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK);
+ if (SUCCEEDED(hr)) {
+ header = ID3DXBuffer_GetBufferPointer(buffer);
+
+ ok(header->magic == MAKEFOURCC('D','D','S',' '), "Invalid DDS signature\n");
+ todo_wine ok(header->size == 124, "Invalid DDS size %d\n", header->size);
+ ok(header->height == 4, "Wrong height %d\n", header->height);
+ ok(header->width == 4, "Wrong width %d\n", header->width);
+ todo_wine ok(header->flags == (DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PIXELFORMAT),
+ "Wrong flags %x\n", header->flags);
+ ID3DXBuffer_Release(buffer);
+ }
+
IDirect3DSurface9_Release(surface);
}
--
2.6.2

View File

@@ -0,0 +1,52 @@
From 88f02c608de86c125cbddd543c34ea2bfce30993 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 11 Jan 2015 16:09:43 +0100
Subject: d3dx9_36: Fix several issues in save_dds_surface_to_memory.
The different fixes are:
- Fix header size of the DDS file
- Remove DDS_MIPMAPCOUNT as mipmap levels are not supported yet
- Fix DDS_WIDTH define to correct value 4
- Do not set depth and miplevels fields as their flags are not set (to match native)
---
dlls/d3dx9_36/surface.c | 7 +++----
dlls/d3dx9_36/tests/surface.c | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index b8bb710..6f6132c 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -487,13 +487,12 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
memset(header, 0, sizeof(*header));
header->signature = MAKEFOURCC('D','D','S',' ');
- header->size = sizeof(*header);
- header->flags = DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PITCH | DDS_PIXELFORMAT | DDS_MIPMAPCOUNT;
+ /* The signature is not really part of the DDS header */
+ header->size = sizeof(*header) - sizeof(header->signature);
+ header->flags = DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PITCH | DDS_PIXELFORMAT;
header->height = src_desc.Height;
header->width = src_desc.Width;
header->pitch_or_linear_size = dst_pitch;
- header->depth = 1;
- header->miplevels = 1;
header->caps = DDS_CAPS_TEXTURE;
hr = d3dformat_to_dds_pixel_format(&header->pixel_format, src_desc.Format);
if (FAILED(hr))
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index 77bd142..f04fa67 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -1272,7 +1272,7 @@ static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device)
header = ID3DXBuffer_GetBufferPointer(buffer);
ok(header->magic == MAKEFOURCC('D','D','S',' '), "Invalid DDS signature\n");
- todo_wine ok(header->size == 124, "Invalid DDS size %d\n", header->size);
+ ok(header->size == 124, "Invalid DDS size %d\n", header->size);
ok(header->height == 4, "Wrong height %d\n", header->height);
ok(header->width == 4, "Wrong width %d\n", header->width);
todo_wine ok(header->flags == (DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PIXELFORMAT),
--
2.6.2

View File

@@ -0,0 +1,43 @@
From 26c87c400c478b878b72b9cb7d216f89a9a58d1f Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 11 Jan 2015 16:18:03 +0100
Subject: d3dx9_36: Add support for FOURCC surface to
save_dds_surface_to_memory.
---
dlls/d3dx9_36/surface.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index ae10adc..629c94c 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -311,6 +311,14 @@ static HRESULT d3dformat_to_dds_pixel_format(struct dds_pixel_format *pixel_form
}
}
+ /* Reuse dds_fourcc_to_d3dformat as D3DFORMAT and FOURCC are DWORD with same values */
+ if (dds_fourcc_to_d3dformat(d3dformat) != D3DFMT_UNKNOWN)
+ {
+ pixel_format->flags |= DDS_PF_FOURCC;
+ pixel_format->fourcc = d3dformat;
+ return D3D_OK;
+ }
+
WARN("Unknown pixel format %#x\n", d3dformat);
return E_NOTIMPL;
}
@@ -489,7 +497,9 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
header->signature = MAKEFOURCC('D','D','S',' ');
/* The signature is not really part of the DDS header */
header->size = sizeof(*header) - sizeof(header->signature);
- header->flags = DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PITCH | DDS_PIXELFORMAT;
+ header->flags = DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PIXELFORMAT;
+ /* Note that native does not set DDS_LINEARSIZE flag nor pitch_or_linear_size field for DXTn */
+ header->flags |= (pixel_format->block_width != 1) || (pixel_format->block_height != 1) ? DDS_LINEARSIZE : DDS_PITCH;
header->height = src_desc.Height;
header->width = src_desc.Width;
header->pitch_or_linear_size = dst_pitch;
--
2.2.1

View File

@@ -1,4 +1,4 @@
From f9702dad952fdc873a72b4a2781bf2171ff3f814 Mon Sep 17 00:00:00 2001
From 560676d5a7e14b73de4a1be6e47ee37754c0c331 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 11 Jan 2015 16:29:30 +0100
Subject: d3dx9_36: Improve D3DXSaveTextureToFile to save simple texture to dds
@@ -24,10 +24,10 @@ index 79f3b76..41bed31 100644
unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN;
float float_16_to_32(const unsigned short in) DECLSPEC_HIDDEN;
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 58b676d..79e8d53 100644
index 629c94c..0a9c177 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -527,6 +527,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
@@ -530,6 +530,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
return D3D_OK;
}
@@ -97,7 +97,7 @@ index 58b676d..79e8d53 100644
const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key,
const D3DXIMAGE_INFO *src_info)
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
index 38349e2..5c06700 100644
index de42307..e062379 100644
--- a/dlls/d3dx9_36/texture.c
+++ b/dlls/d3dx9_36/texture.c
@@ -1873,10 +1873,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
@@ -113,5 +113,5 @@ index 38349e2..5c06700 100644
type = IDirect3DBaseTexture9_GetType(src_texture);
switch (type)
--
2.6.4
2.2.1

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,42 +0,0 @@
From 51d8680f294c62391912f9e7b47bdb794683e764 Mon Sep 17 00:00:00 2001
From: Michael Stefaniuc <mstefani@redhat.de>
Date: Sat, 9 Jan 2016 22:44:10 +0100
Subject: dmime: Do not pass both DSBCAPS_CTRLPAN and DSBCAPS_CTRL3D to dsound.
---
dlls/dmime/performance.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 38f68db..8b5d3e2 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -1035,7 +1035,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
memset(&desc, 0, sizeof(desc));
desc.dwSize = sizeof(desc);
- desc.dwFlags = DSBCAPS_CTRLFX | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_GLOBALFOCUS;
+ desc.dwFlags = DSBCAPS_CTRLFX | DSBCAPS_CTRLVOLUME | DSBCAPS_GLOBALFOCUS;
desc.dwBufferBytes = DSBSIZE_MIN;
desc.dwReserved = 0;
desc.lpwfxFormat = &format;
@@ -1046,14 +1046,14 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
desc.dwFlags |= DSBCAPS_CTRL3D | DSBCAPS_CTRLFREQUENCY | DSBCAPS_MUTE3DATMAXDISTANCE;
break;
case DMUS_APATH_DYNAMIC_MONO:
- desc.dwFlags |= DSBCAPS_CTRLFREQUENCY;
+ desc.dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY;
break;
case DMUS_APATH_SHARED_STEREOPLUSREVERB:
/* normally we have to create 2 buffers (one for music other for reverb)
* in this case. See msdn
*/
case DMUS_APATH_DYNAMIC_STEREO:
- desc.dwFlags |= DSBCAPS_CTRLFREQUENCY;
+ desc.dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY;
format.nChannels = 2;
format.nBlockAlign *= 2;
format.nAvgBytesPerSec *=2;
--
2.6.4

View File

@@ -1 +0,0 @@
Fixes: [39958] Fix regression caused by passing invalid flag combination to dsound8

View File

@@ -1,3 +1,2 @@
Fixes: Software support for Environmental Audio Extensions (EAX)
Depends: dsound-Fast_Mixer
Depends: dsound-Revert_Cleanup

View File

@@ -1,106 +0,0 @@
From 462599cf79d964c6add1a7250f654d2e3110c4d2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 23 Dec 2015 00:58:57 +0100
Subject: Revert "dsound: Use a better name for
IDirectSoundBufferImpl_Create()."
This reverts commit bb72548f3870b1df03ad9fe7ad2e543a69d5d574.
---
dlls/dsound/buffer.c | 24 +++++++++++++++---------
dlls/dsound/dsound.c | 7 +++++--
dlls/dsound/dsound_private.h | 6 ++++--
3 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 2a80c3f..d7717fd 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -983,15 +983,19 @@ static const IDirectSoundBuffer8Vtbl dsbvt =
IDirectSoundBufferImpl_GetObjectInPath
};
-HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *dsbd,
- IDirectSoundBuffer **buffer)
+HRESULT IDirectSoundBufferImpl_Create(
+ DirectSoundDevice * device,
+ IDirectSoundBufferImpl **pdsb,
+ LPCDSBUFFERDESC dsbd)
{
IDirectSoundBufferImpl *dsb;
LPWAVEFORMATEX wfex = dsbd->lpwfxFormat;
HRESULT err = DS_OK;
DWORD capf = 0;
- TRACE("(%p,%p,%p)\n", device, dsbd, buffer);
+ TRACE("(%p,%p,%p)\n",device,pdsb,dsbd);
+
+ *pdsb = NULL;
if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) {
WARN("invalid parameter: dsbd->dwBufferBytes = %d\n", dsbd->dwBufferBytes);
@@ -1103,12 +1107,14 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
RtlInitializeResource(&dsb->lock);
- /* register buffer */
- err = DirectSoundDevice_AddBuffer(device, dsb);
- if (err == DS_OK)
- *buffer = (IDirectSoundBuffer*)&dsb->IDirectSoundBuffer8_iface;
- else
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ /* register buffer if not primary */
+ if (!(dsbd->dwFlags & DSBCAPS_PRIMARYBUFFER)) {
+ err = DirectSoundDevice_AddBuffer(device, dsb);
+ if (err == DS_OK)
+ *pdsb = dsb;
+ else
+ IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ }
return err;
}
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index ccefd1f..e50ef58 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -469,6 +469,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
WARN("primarybuffer_create() failed\n");
}
} else {
+ IDirectSoundBufferImpl * dsb;
+
if (dsbd->lpwfxFormat == NULL) {
WARN("invalid parameter: dsbd->lpwfxFormat can't be NULL for "
"secondary buffer\n");
@@ -545,8 +547,9 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
return DSERR_INVALIDPARAM;
}
- hres = secondarybuffer_create(device, dsbd, ppdsb);
- if (SUCCEEDED(hres)) {
+ hres = IDirectSoundBufferImpl_Create(device, &dsb, dsbd);
+ if (dsb) {
+ *ppdsb = (IDirectSoundBuffer*)&dsb->IDirectSoundBuffer8_iface;
if (dsbd->dwFlags & DSBCAPS_LOCHARDWARE)
device->drvcaps.dwFreeHwMixingAllBuffers--;
} else
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 07bda48..9c001ed 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -182,8 +182,10 @@ void put_stereo2quad(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD channel
void put_mono2surround51(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD channel, float value) DECLSPEC_HIDDEN;
void put_stereo2surround51(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD channel, float value) DECLSPEC_HIDDEN;
-HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *dsbd,
- IDirectSoundBuffer **buffer) DECLSPEC_HIDDEN;
+HRESULT IDirectSoundBufferImpl_Create(
+ DirectSoundDevice *device,
+ IDirectSoundBufferImpl **ppdsb,
+ LPCDSBUFFERDESC dsbd) DECLSPEC_HIDDEN;
HRESULT IDirectSoundBufferImpl_Duplicate(
DirectSoundDevice *device,
IDirectSoundBufferImpl **ppdsb,
--
2.6.4

View File

@@ -1,116 +0,0 @@
From 974a901f92d5197d3db6356df454bdd47dea39da Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 23 Dec 2015 00:59:07 +0100
Subject: Revert "dsound: Simplify error handling when creating a sound
buffer."
This reverts commit d51d55bab8995f94dcc78ce8418a4149836c27b0.
---
dlls/dsound/buffer.c | 46 ++++++++++++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 16 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index d7717fd..5aa2834 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -992,28 +992,29 @@ HRESULT IDirectSoundBufferImpl_Create(
LPWAVEFORMATEX wfex = dsbd->lpwfxFormat;
HRESULT err = DS_OK;
DWORD capf = 0;
-
TRACE("(%p,%p,%p)\n",device,pdsb,dsbd);
- *pdsb = NULL;
-
if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) {
WARN("invalid parameter: dsbd->dwBufferBytes = %d\n", dsbd->dwBufferBytes);
+ *pdsb = NULL;
return DSERR_INVALIDPARAM; /* FIXME: which error? */
}
dsb = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*dsb));
- if (!dsb)
+ if (dsb == 0) {
+ WARN("out of memory\n");
+ *pdsb = NULL;
return DSERR_OUTOFMEMORY;
+ }
TRACE("Created buffer at %p\n", dsb);
- dsb->ref = 1;
+ dsb->ref = 0;
dsb->refn = 0;
dsb->ref3D = 0;
dsb->refiks = 0;
- dsb->numIfaces = 1;
+ dsb->numIfaces = 0;
dsb->device = device;
dsb->IDirectSoundBuffer8_iface.lpVtbl = &dsbvt;
dsb->IDirectSoundNotify_iface.lpVtbl = &dsnvt;
@@ -1024,8 +1025,9 @@ HRESULT IDirectSoundBufferImpl_Create(
CopyMemory(&dsb->dsbd, dsbd, dsbd->dwSize);
dsb->pwfx = DSOUND_CopyFormat(wfex);
- if (!dsb->pwfx) {
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ if (dsb->pwfx == NULL) {
+ HeapFree(GetProcessHeap(),0,dsb);
+ *pdsb = NULL;
return DSERR_OUTOFMEMORY;
}
@@ -1050,16 +1052,22 @@ HRESULT IDirectSoundBufferImpl_Create(
/* Allocate an empty buffer */
dsb->buffer = HeapAlloc(GetProcessHeap(),0,sizeof(*(dsb->buffer)));
- if (!dsb->buffer) {
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ if (dsb->buffer == NULL) {
+ WARN("out of memory\n");
+ HeapFree(GetProcessHeap(),0,dsb->pwfx);
+ HeapFree(GetProcessHeap(),0,dsb);
+ *pdsb = NULL;
return DSERR_OUTOFMEMORY;
}
/* Allocate system memory for buffer */
dsb->buffer->memory = HeapAlloc(GetProcessHeap(),0,dsb->buflen);
- if (!dsb->buffer->memory) {
+ if (dsb->buffer->memory == NULL) {
WARN("out of memory\n");
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ HeapFree(GetProcessHeap(),0,dsb->pwfx);
+ HeapFree(GetProcessHeap(),0,dsb->buffer);
+ HeapFree(GetProcessHeap(),0,dsb);
+ *pdsb = NULL;
return DSERR_OUTOFMEMORY;
}
@@ -1110,12 +1118,18 @@ HRESULT IDirectSoundBufferImpl_Create(
/* register buffer if not primary */
if (!(dsbd->dwFlags & DSBCAPS_PRIMARYBUFFER)) {
err = DirectSoundDevice_AddBuffer(device, dsb);
- if (err == DS_OK)
- *pdsb = dsb;
- else
- IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
+ if (err != DS_OK) {
+ HeapFree(GetProcessHeap(),0,dsb->buffer->memory);
+ HeapFree(GetProcessHeap(),0,dsb->buffer);
+ RtlDeleteResource(&dsb->lock);
+ HeapFree(GetProcessHeap(),0,dsb->pwfx);
+ HeapFree(GetProcessHeap(),0,dsb);
+ dsb = NULL;
+ }
}
+ IDirectSoundBuffer8_AddRef(&dsb->IDirectSoundBuffer8_iface);
+ *pdsb = dsb;
return err;
}
--
2.6.4

View File

@@ -1,63 +0,0 @@
From cccf1b75e810985c817d34329878f497d853d3ac 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
non-volatile.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Michael MĂĽller <michael@fds-team.de>
---
dlls/advapi32/tests/registry.c | 7 +++++++
programs/explorer/desktop.c | 9 +++++++++
2 files changed, 16 insertions(+)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index ef5d989..6387697 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -1340,6 +1340,13 @@ static void test_reg_create_key(void)
RegDeleteKeyA(hkey1, "");
RegCloseKey(hkey1);
+ /* System\CurrentControlSet\Control\Video should be non-volatile */
+ ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Video\\Wine",
+ 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL);
+ ok(ret == ERROR_SUCCESS, "RegCreateKeyExA failed with error %d\n", ret);
+ RegDeleteKeyA(hkey1, "");
+ RegCloseKey(hkey1);
+
/* WOW64 flags - open an existing key */
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
--- a/programs/explorer/desktop.c
+++ b/programs/explorer/desktop.c
@@ -775,6 +775,11 @@ static BOOL get_default_enable_shell( const WCHAR *name )
static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
{
+ static const WCHAR video_keyW[] = {
+ 'S','y','s','t','e','m','\\',
+ 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
+ 'C','o','n','t','r','o','l','\\',
+ 'V','i','d','e','o',0};
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 )
TRACE( "display %s driver %s\n", debugstr_guid(guid), debugstr_w(buffer) );
}
+ /* create video key first without REG_OPTION_VOLATILE attribute */
+ 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,
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

View File

@@ -1 +0,0 @@
Fixes: Registry key System\CurrentControlSet\Control\Video should be non-volatile

View File

@@ -2,7 +2,7 @@
#
# Wrapper to apply binary patches without git.
#
# Copyright (C) 2014-2015 Sebastian Lackner
# Copyright (C) 2014-2016 Sebastian Lackner
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -237,7 +237,7 @@ awk_eof_header='
BEGIN{
ofs=1;
}
!/^(--- |\+\+\+ |old |new |copy |rename |similarity |index |GIT |literal |delta )/{
!/^(--- |\+\+\+ |old |deleted |new |copy |rename |similarity |index |GIT |literal |delta )/{
ofs=0; exit 0;
}
END{

Some files were not shown because too many files have changed in this diff Show More