mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Removed patch to only zero the buffer up 32767 bytes in GetTempPathW (accepted upstream).
This commit is contained in:
parent
6308175bc4
commit
1c4a8d2f9a
@ -38,7 +38,7 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
===================================
|
||||
|
||||
**Bugfixes and features included in the next upcoming release [11]:**
|
||||
**Bugfixes and features included in the next upcoming release [10]:**
|
||||
|
||||
* Add stub for PowerCreateRequest
|
||||
* Fix caps lock state issues with multiple processes ([Wine Bug #35907](https://bugs.winehq.org/show_bug.cgi?id=35907))
|
||||
@ -49,7 +49,6 @@ Included bug fixes and improvements
|
||||
* Implement locking and synchronization of key states ([Wine Bug #31899](https://bugs.winehq.org/show_bug.cgi?id=31899))
|
||||
* Improve stub for ID3DXEffectImpl_CloneEffect
|
||||
* Invalidate key state cache globally after calling LL hooks ([Wine Bug #29871](https://bugs.winehq.org/show_bug.cgi?id=29871))
|
||||
* Only zero the buffer up 32767 bytes in GetTempPathW ([Wine Bug #38220](https://bugs.winehq.org/show_bug.cgi?id=38220))
|
||||
* Python PIP needs better NtQueryInformationJobObject stub
|
||||
|
||||
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -26,6 +26,7 @@ wine-staging (1.7.39) UNRELEASED; urgency=low
|
||||
* Removed patches for _ismbckata and _mbctohira (fixed upstream).
|
||||
* Removed patches to fix wrong return values of RtlFindActivationContextSectionString for NULL data (accepted upstream).
|
||||
* Removed patch for server-PeekMessage tests (accepted upstream).
|
||||
* Removed patch to only zero the buffer up 32767 bytes in GetTempPathW (accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 09 Mar 2015 16:52:35 +0100
|
||||
|
||||
wine-staging (1.7.38) unstable; urgency=low
|
||||
|
@ -1,82 +0,0 @@
|
||||
From 65735c0fb4ee92078f0a368e5892455b32bccdd9 Mon Sep 17 00:00:00 2001
|
||||
From: Bruno Jesus <00cpxxx@gmail.com>
|
||||
Date: Sat, 14 Mar 2015 01:27:27 -0300
|
||||
Subject: kernel32: Only zero the buffer up 32767 bytes in GetTempPathW
|
||||
|
||||
Bogus app passes the buffer size instead of WCHAR count, fortunately
|
||||
it works in windows because it will only fill up to 32767 bytes with
|
||||
zero. So do the same in wine.
|
||||
|
||||
Fixes https://bugs.winehq.org/show_bug.cgi?id=38220
|
||||
---
|
||||
dlls/kernel32/path.c | 5 +++--
|
||||
dlls/kernel32/tests/path.c | 30 +++++++++++++++++++++++++++++-
|
||||
2 files changed, 32 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index 7fe229f..c2833b1 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -622,8 +622,9 @@ DWORD WINAPI GetTempPathW( DWORD count, LPWSTR path )
|
||||
if (count >= ret)
|
||||
{
|
||||
lstrcpynW(path, tmp_path, count);
|
||||
- /* the remaining buffer must be zeroed */
|
||||
- memset(path + ret, 0, (count - ret) * sizeof(WCHAR));
|
||||
+ /* the remaining buffer must be zeroed up to 32766 bytes in XP or 32767
|
||||
+ * bytes after it, we will assume the > XP behavior for now */
|
||||
+ memset(path + ret, 0, (min(count, 32767) - ret) * sizeof(WCHAR));
|
||||
ret--; /* return length without 0 */
|
||||
}
|
||||
else if (count)
|
||||
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
|
||||
index e97c50c..cdb565a 100644
|
||||
--- a/dlls/kernel32/tests/path.c
|
||||
+++ b/dlls/kernel32/tests/path.c
|
||||
@@ -975,7 +975,7 @@ static void test_GetTempPathA(char* tmp_dir)
|
||||
static void test_GetTempPathW(char* tmp_dir)
|
||||
{
|
||||
DWORD len, slen, len_with_null;
|
||||
- WCHAR buf[MAX_PATH];
|
||||
+ WCHAR buf[MAX_PATH], *long_buf;
|
||||
WCHAR tmp_dirW[MAX_PATH];
|
||||
static const WCHAR fooW[] = {'f','o','o',0};
|
||||
|
||||
@@ -1048,6 +1048,34 @@ static void test_GetTempPathW(char* tmp_dir)
|
||||
ok(buf[len] == '\0', "expected NULL at [%d], got 0x%x\n", len, buf[len]);
|
||||
for(; len < sizeof(buf) / sizeof(buf[0]); len++)
|
||||
ok(buf[len] == 'a', "expected 'a' at [%d], got 0x%x\n", len, buf[len]);
|
||||
+
|
||||
+ /* bogus application from bug 38220 passes the count value in sizeof(buffer)
|
||||
+ * instead the correct count of WCHAR, this test catches this case. */
|
||||
+ slen = 65534;
|
||||
+ long_buf = HeapAlloc(GetProcessHeap(), 0, slen * sizeof(WCHAR));
|
||||
+ if (!long_buf)
|
||||
+ {
|
||||
+ skip("Could not allocate memory for the test\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ for(len = 0; len < slen; len++)
|
||||
+ long_buf[len] = 0xCC;
|
||||
+ len = GetTempPathW(slen, long_buf);
|
||||
+ ok(lstrcmpiW(long_buf, tmp_dirW) == 0, "GetTempPathW returned an incorrect temporary path\n");
|
||||
+ ok(len == lstrlenW(long_buf), "returned length should be equal to the length of string\n");
|
||||
+ /* the remaining buffer must be zeroed up to different values in different OS versions.
|
||||
+ * <= XP - 32766
|
||||
+ * > XP - 32767
|
||||
+ * to simplify testing we will test only until XP.
|
||||
+ */
|
||||
+ for(; len < 32767; len++)
|
||||
+ ok(long_buf[len] == '\0', "expected NULL at [%d], got 0x%x\n", len, long_buf[len]);
|
||||
+ /* we will know skip the test that is in the middle of the OS difference by
|
||||
+ * incrementing len and then resume the test for the untouched part. */
|
||||
+ for(len++; len < slen; len++)
|
||||
+ ok(long_buf[len] == 0xcc, "expected 0xcc at [%d], got 0x%x\n", len, long_buf[len]);
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, long_buf);
|
||||
}
|
||||
|
||||
static void test_GetTempPath(void)
|
||||
--
|
||||
2.3.2
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [38220] Only zero the buffer up 32767 bytes in GetTempPathW
|
@ -111,7 +111,6 @@ patch_enable_all ()
|
||||
enable_kernel32_GetNumaProcessorNode="$1"
|
||||
enable_kernel32_GetStringTypeW="$1"
|
||||
enable_kernel32_GetSystemTimes="$1"
|
||||
enable_kernel32_GetTempPathW="$1"
|
||||
enable_kernel32_GetVolumePathName="$1"
|
||||
enable_kernel32_Named_Pipe="$1"
|
||||
enable_kernel32_NeedCurrentDirectoryForExePath="$1"
|
||||
@ -386,9 +385,6 @@ patch_enable ()
|
||||
kernel32-GetSystemTimes)
|
||||
enable_kernel32_GetSystemTimes="$2"
|
||||
;;
|
||||
kernel32-GetTempPathW)
|
||||
enable_kernel32_GetTempPathW="$2"
|
||||
;;
|
||||
kernel32-GetVolumePathName)
|
||||
enable_kernel32_GetVolumePathName="$2"
|
||||
;;
|
||||
@ -2544,21 +2540,6 @@ if test "$enable_kernel32_GetSystemTimes" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-GetTempPathW
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#38220] Only zero the buffer up 32767 bytes in GetTempPathW
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/path.c, dlls/kernel32/tests/path.c
|
||||
# |
|
||||
if test "$enable_kernel32_GetTempPathW" -eq 1; then
|
||||
patch_apply kernel32-GetTempPathW/0001-kernel32-Only-zero-the-buffer-up-32767-bytes-in-GetT.patch
|
||||
(
|
||||
echo '+ { "Bruno Jesus", "kernel32: Only zero the buffer up 32767 bytes in GetTempPathW.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-GetVolumePathName
|
||||
# |
|
||||
# | Modified files:
|
||||
|
@ -1,17 +1,17 @@
|
||||
From fa6437785e10e647df1af29b1ac544d2d1f3466f Mon Sep 17 00:00:00 2001
|
||||
From 10e5f290ec6e90c6a53df8b0e60fe69e6bbee6aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 24 Sep 2013 00:31:39 +0200
|
||||
Subject: wined3d: Don't call the public map function in surface_cpu_blt.
|
||||
|
||||
---
|
||||
dlls/wined3d/surface.c | 111 ++++++++++++++++++++++++++++++++-----------------
|
||||
1 file changed, 74 insertions(+), 37 deletions(-)
|
||||
dlls/wined3d/surface.c | 107 +++++++++++++++++++++++++++++++++----------------
|
||||
1 file changed, 72 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 045ede5..3702866 100644
|
||||
index 50faee0..9647c2a 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4359,21 +4359,36 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4489,21 +4489,36 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
int bpp, srcheight, srcwidth, dstheight, dstwidth, width;
|
||||
const struct wined3d_format *src_format, *dst_format;
|
||||
struct wined3d_texture *src_texture = NULL;
|
||||
@ -51,7 +51,7 @@ index 045ede5..3702866 100644
|
||||
src_format = dst_surface->resource.format;
|
||||
dst_format = src_format;
|
||||
}
|
||||
@@ -4382,6 +4397,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4512,6 +4527,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
dst_format = dst_surface->resource.format;
|
||||
if (src_surface)
|
||||
{
|
||||
@ -64,7 +64,7 @@ index 045ede5..3702866 100644
|
||||
if (dst_surface->resource.format->id != src_surface->resource.format->id)
|
||||
{
|
||||
if (!(src_texture = surface_convert_format(src_surface, dst_format->id)))
|
||||
@@ -4392,7 +4413,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4522,7 +4543,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
}
|
||||
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0));
|
||||
}
|
||||
@ -75,7 +75,7 @@ index 045ede5..3702866 100644
|
||||
src_format = src_surface->resource.format;
|
||||
}
|
||||
else
|
||||
@@ -4400,7 +4423,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4530,7 +4553,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
src_format = dst_format;
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ index 045ede5..3702866 100644
|
||||
}
|
||||
|
||||
bpp = dst_surface->resource.format->byte_count;
|
||||
@@ -4411,15 +4435,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4541,15 +4565,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
width = (dst_rect->right - dst_rect->left) * bpp;
|
||||
|
||||
if (src_surface)
|
||||
@ -106,7 +106,7 @@ index 045ede5..3702866 100644
|
||||
|
||||
if (src_format->flags & dst_format->flags & WINED3DFMT_FLAG_BLOCKS)
|
||||
{
|
||||
@@ -4454,7 +4475,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4584,7 +4605,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
}
|
||||
|
||||
hr = surface_cpu_blt_compressed(sbase, dbuf,
|
||||
@ -115,7 +115,7 @@ index 045ede5..3702866 100644
|
||||
src_format, flags, fx);
|
||||
goto release;
|
||||
}
|
||||
@@ -4462,7 +4483,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4592,7 +4613,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
/* First, all the 'source-less' blits */
|
||||
if (flags & WINEDDBLT_COLORFILL)
|
||||
{
|
||||
@ -124,22 +124,7 @@ index 045ede5..3702866 100644
|
||||
flags &= ~WINEDDBLT_COLORFILL;
|
||||
}
|
||||
|
||||
@@ -4476,12 +4497,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
switch (fx->dwROP)
|
||||
{
|
||||
case BLACKNESS:
|
||||
- hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_map.row_pitch, 0);
|
||||
+ hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_row_pitch, 0);
|
||||
break;
|
||||
case 0xaa0029: /* No-op */
|
||||
break;
|
||||
case WHITENESS:
|
||||
- hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_map.row_pitch, ~0U);
|
||||
+ hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_row_pitch, ~0U);
|
||||
break;
|
||||
case SRCCOPY: /* Well, we do that below? */
|
||||
break;
|
||||
@@ -4532,19 +4553,19 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4641,19 +4662,19 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
for (y = 0; y < dstheight; ++y)
|
||||
{
|
||||
memcpy(dbuf, sbuf, width);
|
||||
@ -165,7 +150,7 @@ index 045ede5..3702866 100644
|
||||
memcpy(dbuf, sbuf, width);
|
||||
}
|
||||
}
|
||||
@@ -4554,8 +4575,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4663,8 +4684,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
for (y = 0; y < dstheight; ++y)
|
||||
{
|
||||
memmove(dbuf, sbuf, width);
|
||||
@ -176,7 +161,7 @@ index 045ede5..3702866 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4564,9 +4585,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4673,9 +4694,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
/* Stretching in y direction only. */
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -188,7 +173,7 @@ index 045ede5..3702866 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4576,13 +4597,13 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4685,13 +4706,13 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
int last_sy = -1;
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -204,7 +189,7 @@ index 045ede5..3702866 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4629,14 +4650,14 @@ do { \
|
||||
@@ -4738,14 +4759,14 @@ do { \
|
||||
}
|
||||
#undef STRETCH_ROW
|
||||
}
|
||||
@ -221,7 +206,7 @@ index 045ede5..3702866 100644
|
||||
DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff;
|
||||
DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff;
|
||||
if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE))
|
||||
@@ -4686,7 +4707,7 @@ do { \
|
||||
@@ -4795,7 +4816,7 @@ do { \
|
||||
LONG tmpxy;
|
||||
dTopLeft = dbuf;
|
||||
dTopRight = dbuf + ((dstwidth - 1) * bpp);
|
||||
@ -230,7 +215,7 @@ index 045ede5..3702866 100644
|
||||
dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp);
|
||||
|
||||
if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY)
|
||||
@@ -4769,7 +4790,7 @@ do { \
|
||||
@@ -4878,7 +4899,7 @@ do { \
|
||||
type *d = (type *)dbuf, *dx, tmp; \
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc) \
|
||||
{ \
|
||||
@ -239,7 +224,7 @@ index 045ede5..3702866 100644
|
||||
dx = d; \
|
||||
for (x = sx = 0; x < dstwidth; ++x, sx += xinc) \
|
||||
{ \
|
||||
@@ -4802,7 +4823,7 @@ do { \
|
||||
@@ -4911,7 +4932,7 @@ do { \
|
||||
BYTE *d = dbuf, *dx;
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -248,7 +233,7 @@ index 045ede5..3702866 100644
|
||||
dx = d;
|
||||
for (x = sx = 0; x < dstwidth; ++x, sx+= xinc)
|
||||
{
|
||||
@@ -4833,6 +4854,10 @@ do { \
|
||||
@@ -4942,6 +4963,10 @@ do { \
|
||||
}
|
||||
}
|
||||
|
||||
@ -259,7 +244,7 @@ index 045ede5..3702866 100644
|
||||
error:
|
||||
if (flags && FIXME_ON(d3d_surface))
|
||||
{
|
||||
@@ -4840,12 +4865,24 @@ error:
|
||||
@@ -4949,12 +4974,24 @@ error:
|
||||
}
|
||||
|
||||
release:
|
||||
@ -288,5 +273,5 @@ index 045ede5..3702866 100644
|
||||
return hr;
|
||||
}
|
||||
--
|
||||
2.1.3
|
||||
2.3.2
|
||||
|
||||
|
@ -1525,7 +1525,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
unsigned int i, j;
|
||||
WORD map;
|
||||
|
||||
@@ -3068,12 +3156,17 @@
|
||||
@@ -3073,12 +3161,17 @@
|
||||
for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i)
|
||||
{
|
||||
if (map & 1)
|
||||
@ -1543,7 +1543,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
if (state->index_buffer)
|
||||
{
|
||||
@@ -3176,7 +3269,11 @@
|
||||
@@ -3181,7 +3274,11 @@
|
||||
if (texture->texture_srgb.name)
|
||||
wined3d_texture_load(texture, context, TRUE);
|
||||
wined3d_texture_load(texture, context, FALSE);
|
||||
@ -1678,7 +1678,7 @@ diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -16365,7 +16365,11 @@
|
||||
@@ -16503,7 +16503,11 @@
|
||||
fill_surface(surface_managed, 0x0000ff00, D3DLOCK_NO_DIRTY_UPDATE);
|
||||
add_dirty_rect_test_draw(device);
|
||||
color = getPixelColor(device, 320, 240);
|
||||
@ -8140,11 +8140,17 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
&& surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
|
||||
{
|
||||
surface_load_ds_location(surface, context, location);
|
||||
@@ -4132,11 +5266,53 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (!surface->resource.locations)
|
||||
@@ -4127,16 +5261,58 @@
|
||||
else
|
||||
{
|
||||
FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n",
|
||||
- wined3d_debug_location(surface->resource.locations), wined3d_debug_location(location));
|
||||
- return;
|
||||
+ wined3d_debug_location(surface->resource.locations), wined3d_debug_location(location));
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!surface->resource.locations)
|
||||
+ {
|
||||
+ ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
@ -8169,9 +8175,10 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
+ FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n",
|
||||
+ wined3d_debug_location(surface->locations), wined3d_debug_location(location));
|
||||
+ return WINED3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
}
|
||||
}
|
||||
|
||||
- if (!surface->resource.locations)
|
||||
+ if (surface->locations & location)
|
||||
+ {
|
||||
+ TRACE("Location already up to date.\n");
|
||||
@ -8433,29 +8440,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
flags &= ~WINEDDBLT_COLORFILL;
|
||||
}
|
||||
|
||||
@@ -4606,12 +5889,21 @@
|
||||
switch (fx->dwROP)
|
||||
{
|
||||
case BLACKNESS:
|
||||
+#if defined(STAGING_CSMT)
|
||||
hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_row_pitch, 0);
|
||||
break;
|
||||
case 0xaa0029: /* No-op */
|
||||
break;
|
||||
case WHITENESS:
|
||||
hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_row_pitch, ~0U);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_map.row_pitch, 0);
|
||||
+ break;
|
||||
+ case 0xaa0029: /* No-op */
|
||||
+ break;
|
||||
+ case WHITENESS:
|
||||
+ hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_map.row_pitch, ~0U);
|
||||
+#endif /* STAGING_CSMT */
|
||||
break;
|
||||
case SRCCOPY: /* Well, we do that below? */
|
||||
break;
|
||||
@@ -4662,6 +5954,7 @@
|
||||
@@ -4641,6 +5924,7 @@
|
||||
for (y = 0; y < dstheight; ++y)
|
||||
{
|
||||
memcpy(dbuf, sbuf, width);
|
||||
@ -8463,7 +8448,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
sbuf += src_row_pitch;
|
||||
dbuf += dst_row_pitch;
|
||||
}
|
||||
@@ -4675,6 +5968,21 @@
|
||||
@@ -4654,6 +5938,21 @@
|
||||
{
|
||||
sbuf -= src_row_pitch;
|
||||
dbuf -= dst_row_pitch;
|
||||
@ -8485,7 +8470,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
memcpy(dbuf, sbuf, width);
|
||||
}
|
||||
}
|
||||
@@ -4684,8 +5992,13 @@
|
||||
@@ -4663,8 +5962,13 @@
|
||||
for (y = 0; y < dstheight; ++y)
|
||||
{
|
||||
memmove(dbuf, sbuf, width);
|
||||
@ -8499,7 +8484,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4694,9 +6007,15 @@
|
||||
@@ -4673,9 +5977,15 @@
|
||||
/* Stretching in y direction only. */
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -8515,7 +8500,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4706,6 +6025,7 @@
|
||||
@@ -4685,6 +5995,7 @@
|
||||
int last_sy = -1;
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -8523,7 +8508,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
sbuf = sbase + (sy >> 16) * src_row_pitch;
|
||||
|
||||
if ((sy >> 16) == (last_sy >> 16))
|
||||
@@ -4713,6 +6033,15 @@
|
||||
@@ -4692,6 +6003,15 @@
|
||||
/* This source row is the same as last source row -
|
||||
* Copy the already stretched row. */
|
||||
memcpy(dbuf, dbuf - dst_row_pitch, width);
|
||||
@ -8539,7 +8524,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4759,6 +6088,7 @@
|
||||
@@ -4738,6 +6058,7 @@
|
||||
}
|
||||
#undef STRETCH_ROW
|
||||
}
|
||||
@ -8547,7 +8532,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
dbuf += dst_row_pitch;
|
||||
last_sy = sy;
|
||||
}
|
||||
@@ -4767,6 +6097,16 @@
|
||||
@@ -4746,6 +6067,16 @@
|
||||
else
|
||||
{
|
||||
LONG dstyinc = dst_row_pitch, dstxinc = bpp;
|
||||
@ -8564,7 +8549,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff;
|
||||
DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff;
|
||||
if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE))
|
||||
@@ -4816,7 +6156,11 @@
|
||||
@@ -4795,7 +6126,11 @@
|
||||
LONG tmpxy;
|
||||
dTopLeft = dbuf;
|
||||
dTopRight = dbuf + ((dstwidth - 1) * bpp);
|
||||
@ -8576,7 +8561,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp);
|
||||
|
||||
if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY)
|
||||
@@ -4893,6 +6237,7 @@
|
||||
@@ -4872,6 +6207,7 @@
|
||||
flags &= ~(WINEDDBLT_DDFX);
|
||||
}
|
||||
|
||||
@ -8584,7 +8569,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
#define COPY_COLORKEY_FX(type) \
|
||||
do { \
|
||||
const type *s; \
|
||||
@@ -4914,6 +6259,29 @@
|
||||
@@ -4893,6 +6229,29 @@
|
||||
d = (type *)(((BYTE *)d) + dstyinc); \
|
||||
} \
|
||||
} while(0)
|
||||
@ -8614,7 +8599,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
switch (bpp)
|
||||
{
|
||||
@@ -4932,7 +6300,11 @@
|
||||
@@ -4911,7 +6270,11 @@
|
||||
BYTE *d = dbuf, *dx;
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -8626,7 +8611,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
dx = d;
|
||||
for (x = sx = 0; x < dstwidth; ++x, sx+= xinc)
|
||||
{
|
||||
@@ -4963,10 +6335,12 @@
|
||||
@@ -4942,10 +6305,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -8639,7 +8624,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
error:
|
||||
if (flags && FIXME_ON(d3d_surface))
|
||||
{
|
||||
@@ -4974,6 +6348,7 @@
|
||||
@@ -4953,6 +6318,7 @@
|
||||
}
|
||||
|
||||
release:
|
||||
@ -8647,7 +8632,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (dst_data)
|
||||
{
|
||||
wined3d_resource_release_map_ptr(&dst_surface->resource, context);
|
||||
@@ -4992,6 +6367,14 @@
|
||||
@@ -4971,6 +6337,14 @@
|
||||
wined3d_texture_decref(src_texture);
|
||||
if (context)
|
||||
context_release(context);
|
||||
@ -8662,7 +8647,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -5026,6 +6409,7 @@
|
||||
@@ -5005,6 +6379,7 @@
|
||||
cpu_blit_depth_fill,
|
||||
};
|
||||
|
||||
@ -8670,7 +8655,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
|
||||
@@ -5033,6 +6417,16 @@
|
||||
@@ -5012,6 +6387,16 @@
|
||||
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
|
||||
struct wined3d_device *device = dst_surface->resource.device;
|
||||
DWORD src_ds_flags, dst_ds_flags;
|
||||
@ -8687,7 +8672,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
BOOL scale, convert;
|
||||
|
||||
static const DWORD simple_blit = WINEDDBLT_ASYNC
|
||||
@@ -5041,6 +6435,106 @@
|
||||
@@ -5020,6 +6405,106 @@
|
||||
| WINEDDBLT_DEPTHFILL
|
||||
| WINEDDBLT_DONOTWAIT;
|
||||
|
||||
@ -8794,7 +8779,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (!device->d3d_initialized)
|
||||
{
|
||||
WARN("D3D not initialized, using fallback.\n");
|
||||
@@ -5083,8 +6577,13 @@
|
||||
@@ -5062,8 +6547,13 @@
|
||||
}
|
||||
|
||||
scale = src_surface
|
||||
@ -8808,7 +8793,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
|
||||
|
||||
dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
|
||||
@@ -5102,6 +6601,7 @@
|
||||
@@ -5081,6 +6571,7 @@
|
||||
TRACE("Depth fill.\n");
|
||||
|
||||
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
|
||||
@ -8816,7 +8801,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
return;
|
||||
|
||||
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, depth)))
|
||||
@@ -5120,6 +6620,32 @@
|
||||
@@ -5099,6 +6590,32 @@
|
||||
* implement those in the CPU blitter at the moment. */
|
||||
if ((dst_surface->resource.locations & dst_surface->resource.map_binding)
|
||||
&& (!src_surface || (src_surface->resource.locations & src_surface->resource.map_binding)))
|
||||
@ -8849,7 +8834,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
{
|
||||
if (scale)
|
||||
TRACE("Not doing sysmem blit because of scaling.\n");
|
||||
@@ -5138,6 +6664,7 @@
|
||||
@@ -5117,6 +6634,7 @@
|
||||
if (!surface_convert_color_to_float(dst_surface, fx->u5.dwFillColor, &color))
|
||||
goto fallback;
|
||||
|
||||
@ -8857,7 +8842,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
|
||||
return;
|
||||
}
|
||||
@@ -5148,6 +6675,18 @@
|
||||
@@ -5127,6 +6645,18 @@
|
||||
/* Upload */
|
||||
if ((src_surface->resource.locations & WINED3D_LOCATION_SYSMEM)
|
||||
&& !(dst_surface->resource.locations & WINED3D_LOCATION_SYSMEM))
|
||||
@ -8876,7 +8861,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
{
|
||||
if (scale)
|
||||
TRACE("Not doing upload because of scaling.\n");
|
||||
@@ -5155,6 +6694,7 @@
|
||||
@@ -5134,6 +6664,7 @@
|
||||
TRACE("Not doing upload because of format conversion.\n");
|
||||
else
|
||||
{
|
||||
@ -8884,7 +8869,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
POINT dst_point = {dst_rect->left, dst_rect->top};
|
||||
|
||||
if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, src_rect)))
|
||||
@@ -5167,6 +6707,15 @@
|
||||
@@ -5146,6 +6677,15 @@
|
||||
context_release(context);
|
||||
}
|
||||
return;
|
||||
@ -8900,7 +8885,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5191,6 +6740,7 @@
|
||||
@@ -5170,6 +6710,7 @@
|
||||
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
|
||||
dst_swapchain->desc.swap_effect = swap_effect;
|
||||
|
||||
@ -8908,7 +8893,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5387,6 +6937,50 @@
|
||||
@@ -5366,6 +6907,50 @@
|
||||
wined3d_surface_location_invalidated,
|
||||
wined3d_surface_load_location,
|
||||
};
|
||||
@ -8959,7 +8944,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_texture *container,
|
||||
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
|
||||
@@ -5454,7 +7048,11 @@
|
||||
@@ -5433,7 +7018,11 @@
|
||||
}
|
||||
|
||||
surface->container = container;
|
||||
@ -8971,7 +8956,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
list_init(&surface->renderbuffers);
|
||||
list_init(&surface->overlays);
|
||||
|
||||
@@ -5486,9 +7084,14 @@
|
||||
@@ -5465,9 +7054,14 @@
|
||||
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
|
||||
{
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
@ -8986,7 +8971,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
return hr;
|
||||
@@ -5515,7 +7118,11 @@
|
||||
@@ -5494,7 +7088,11 @@
|
||||
if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
|
||||
{
|
||||
WARN("Failed to initialize surface, returning %#x.\n", hr);
|
||||
|
@ -1,30 +1,32 @@
|
||||
From c6b3ebf94a0713ab7c5cd10ca0021d9f1359a62a Mon Sep 17 00:00:00 2001
|
||||
From 191d506cfbc49ad6a43632609e1f396ae10a6ca7 Mon Sep 17 00:00:00 2001
|
||||
From: Maarten Lankhorst <m.b.lankhorst@gmail.com>
|
||||
Date: Mon, 14 Jul 2014 09:50:02 +0200
|
||||
Subject: [PATCH 09/42] winepulse: Add initial stub for pulseaudio support
|
||||
Subject: winepulse: Add initial stub for pulseaudio support
|
||||
|
||||
---
|
||||
configure.ac | 31 +++-
|
||||
dlls/mmdevapi/main.c | 2 +-
|
||||
dlls/winepulse.drv/Makefile.in | 7 +
|
||||
dlls/winepulse.drv/mmdevdrv.c | 290 +++++++++++++++++++++++++++++++++
|
||||
dlls/winepulse.drv/winepulse.drv.spec | 5 +
|
||||
configure.ac | 31 +++-
|
||||
dlls/mmdevapi/main.c | 2 +-
|
||||
dlls/winepulse.drv/Makefile.in | 7 +
|
||||
dlls/winepulse.drv/mmdevdrv.c | 290 ++++++++++++++++++++++++++++++++++
|
||||
dlls/winepulse.drv/winepulse.drv.spec | 5 +
|
||||
5 files changed, 332 insertions(+), 3 deletions(-)
|
||||
create mode 100644 dlls/winepulse.drv/Makefile.in
|
||||
create mode 100644 dlls/winepulse.drv/mmdevdrv.c
|
||||
create mode 100644 dlls/winepulse.drv/winepulse.drv.spec
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7de7a87..84ec52f 100644
|
||||
index d23227a..76aed78 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -73,4 +73,5 @@ AC_ARG_WITH(png, AS_HELP_STRING([--without-png],[do not use PNG]))
|
||||
@@ -72,6 +72,7 @@ AC_ARG_WITH(pcap, AS_HELP_STRING([--without-pcap],[do not use the Packet Ca
|
||||
AC_ARG_WITH(png, AS_HELP_STRING([--without-png],[do not use PNG]))
|
||||
AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
|
||||
[if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
|
||||
+AC_ARG_WITH(pulse, AC_HELP_STRING([--without-pulse],[do not use PulseAudio sound support]))
|
||||
AC_ARG_WITH(sane, AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)]))
|
||||
AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]))
|
||||
@@ -1537,6 +1538,30 @@ then
|
||||
AC_ARG_WITH(v4l, AS_HELP_STRING([--without-v4l],[do not use v4l1 (v4l support)]))
|
||||
@@ -1548,6 +1549,30 @@ then
|
||||
[GetText ${notice_platform}development files not found (or too old), po files can't be rebuilt.])
|
||||
fi
|
||||
|
||||
@ -55,13 +57,13 @@ index 7de7a87..84ec52f 100644
|
||||
dnl **** Check for gstreamer ****
|
||||
if test "x$with_gstreamer" != "xno"
|
||||
then
|
||||
@@ -1755,13 +1780,14 @@ fi
|
||||
@@ -1766,13 +1791,14 @@ fi
|
||||
dnl **** Disable unsupported winmm drivers ****
|
||||
test -n "$ALSA_LIBS" || enable_winealsa_drv=${enable_winealsa_drv:-no}
|
||||
test -n "$COREAUDIO_LIBS" || enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
|
||||
+test -n "$PULSELIBS" || enable_winepulse_drv=${enable_winepulse_drv:-no}
|
||||
test "x$ac_cv_member_oss_sysinfo_numaudioengines" = xyes || enable_wineoss_drv=${enable_wineoss_drv:-no}
|
||||
test "$ac_cv_header_linux_joystick_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no}
|
||||
test "$ac_cv_header_linux_joystick_h" = "yes" -o "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no}
|
||||
|
||||
dnl **** Check for any sound system ****
|
||||
-if test "x$ALSA_LIBS$COREAUDIO_LIBS" = "x" -a \
|
||||
@ -72,7 +74,7 @@ index 7de7a87..84ec52f 100644
|
||||
then
|
||||
WINE_WARNING([No sound system was found. Windows applications will be silent.])
|
||||
fi
|
||||
@@ -3258,6 +3284,7 @@ WINE_CONFIG_DLL(winemp3.acm)
|
||||
@@ -3339,6 +3365,7 @@ WINE_CONFIG_DLL(winemp3.acm)
|
||||
WINE_CONFIG_DLL(wineoss.drv)
|
||||
WINE_CONFIG_DLL(wineps.drv,,[clean,po])
|
||||
WINE_CONFIG_DLL(wineps16.drv16,enable_win16)
|
||||
@ -81,10 +83,10 @@ index 7de7a87..84ec52f 100644
|
||||
WINE_CONFIG_DLL(winex11.drv)
|
||||
WINE_CONFIG_DLL(wing.dll16,enable_win16)
|
||||
diff --git a/dlls/mmdevapi/main.c b/dlls/mmdevapi/main.c
|
||||
index 447813f..b9ae99e 100644
|
||||
index 52cf6f1..aa4baa5 100644
|
||||
--- a/dlls/mmdevapi/main.c
|
||||
+++ b/dlls/mmdevapi/main.c
|
||||
@@ -110,7 +110,7 @@ static BOOL init_driver(void)
|
||||
@@ -113,7 +113,7 @@ static BOOL init_driver(void)
|
||||
{
|
||||
static const WCHAR drv_value[] = {'A','u','d','i','o',0};
|
||||
|
||||
@ -414,5 +416,5 @@ index 0000000..a089166
|
||||
+@ stdcall -private GetAudioEndpoint(ptr ptr long ptr) AUDDRV_GetAudioEndpoint
|
||||
+@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager
|
||||
--
|
||||
1.7.9.5
|
||||
2.3.2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user