You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
931daeffec | ||
|
d923cf9418 | ||
|
66c0fdc159 | ||
|
6f3825b11f | ||
|
8d34769ef1 | ||
|
5a5c5a5743 | ||
|
5c01355ada | ||
|
270f893aea | ||
|
dc0aa10ad7 | ||
|
d7b8304e38 | ||
|
b09fe464be |
@@ -0,0 +1,254 @@
|
||||
From 95708c8fdfcb45cfe667cc9a68ea774c2be52169 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 30 Jul 2021 15:57:29 +1000
|
||||
Subject: [PATCH] d3dx11_43: Implement D3DX11GetImageInfoFromMemory
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50210
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx11_42/Makefile.in | 1 +
|
||||
dlls/d3dx11_43/Makefile.in | 1 +
|
||||
dlls/d3dx11_43/main.c | 9 --
|
||||
dlls/d3dx11_43/texture.c | 176 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 178 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_42/Makefile.in b/dlls/d3dx11_42/Makefile.in
|
||||
index c34f53a930c..9e1379937a7 100644
|
||||
--- a/dlls/d3dx11_42/Makefile.in
|
||||
+++ b/dlls/d3dx11_42/Makefile.in
|
||||
@@ -2,6 +2,7 @@ EXTRADEFS = -DD3DX11_SDK_VERSION=42
|
||||
MODULE = d3dx11_42.dll
|
||||
IMPORTLIB = d3dx11_42
|
||||
IMPORTS = d3dcompiler
|
||||
+DELAYIMPORTS = windowscodecs
|
||||
PARENTSRC = ../d3dx11_43
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
|
||||
diff --git a/dlls/d3dx11_43/Makefile.in b/dlls/d3dx11_43/Makefile.in
|
||||
index b69f3f1ce02..ed23958a671 100644
|
||||
--- a/dlls/d3dx11_43/Makefile.in
|
||||
+++ b/dlls/d3dx11_43/Makefile.in
|
||||
@@ -2,6 +2,7 @@ EXTRADEFS = -DD3DX11_SDK_VERSION=43
|
||||
MODULE = d3dx11_43.dll
|
||||
IMPORTLIB = d3dx11
|
||||
IMPORTS = d3dcompiler
|
||||
+DELAYIMPORTS = windowscodecs
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/d3dx11_43/main.c b/dlls/d3dx11_43/main.c
|
||||
index 950f6d76f5c..00c1db35e42 100644
|
||||
--- a/dlls/d3dx11_43/main.c
|
||||
+++ b/dlls/d3dx11_43/main.c
|
||||
@@ -66,12 +66,3 @@ HRESULT WINAPI D3DX11GetImageInfoFromFileW(const WCHAR *filename, ID3DX11ThreadP
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
-
|
||||
-HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
- D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
-{
|
||||
- FIXME("src_data %p, src_data_size %lu, pump %p, img_info %p, hresult %p stub!\n",
|
||||
- src_data, src_data_size, pump, img_info, hresult);
|
||||
-
|
||||
- return E_NOTIMPL;
|
||||
-}
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index ee6808d76d6..8addf4f84d3 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -15,14 +15,190 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
+#define COBJMACROS
|
||||
|
||||
#include "d3dx11.h"
|
||||
#include "d3dcompiler.h"
|
||||
+#include "wincodec.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
+HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT sdk_version, IWICImagingFactory **imaging_factory);
|
||||
+
|
||||
+static const struct
|
||||
+{
|
||||
+ const GUID *wic_container_guid;
|
||||
+ D3DX11_IMAGE_FILE_FORMAT d3dx_file_format;
|
||||
+}
|
||||
+file_formats[] =
|
||||
+{
|
||||
+ { &GUID_ContainerFormatBmp, D3DX11_IFF_BMP },
|
||||
+ { &GUID_ContainerFormatJpeg, D3DX11_IFF_JPG },
|
||||
+ { &GUID_ContainerFormatPng, D3DX11_IFF_PNG },
|
||||
+ { &GUID_ContainerFormatDds, D3DX11_IFF_DDS },
|
||||
+ { &GUID_ContainerFormatTiff, D3DX11_IFF_TIFF },
|
||||
+ { &GUID_ContainerFormatGif, D3DX11_IFF_GIF },
|
||||
+ { &GUID_ContainerFormatWmp, D3DX11_IFF_WMP },
|
||||
+};
|
||||
+
|
||||
+static D3DX11_IMAGE_FILE_FORMAT wic_container_guid_to_file_format(GUID *container_format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(file_formats); ++i)
|
||||
+ {
|
||||
+ if (IsEqualGUID(file_formats[i].wic_container_guid, container_format))
|
||||
+ return file_formats[i].d3dx_file_format;
|
||||
+ }
|
||||
+ return D3DX11_IFF_FORCE_DWORD;
|
||||
+}
|
||||
+
|
||||
+static D3D11_RESOURCE_DIMENSION wic_dimension_to_d3dx11_dimension(WICDdsDimension wic_dimension)
|
||||
+{
|
||||
+ switch (wic_dimension)
|
||||
+ {
|
||||
+ case WICDdsTexture1D:
|
||||
+ return D3D11_RESOURCE_DIMENSION_TEXTURE1D;
|
||||
+ case WICDdsTexture2D:
|
||||
+ case WICDdsTextureCube:
|
||||
+ return D3D11_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
+ case WICDdsTexture3D:
|
||||
+ return D3D11_RESOURCE_DIMENSION_TEXTURE3D;
|
||||
+ default:
|
||||
+ return D3D11_RESOURCE_DIMENSION_UNKNOWN;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const DXGI_FORMAT to_be_converted_format[] =
|
||||
+{
|
||||
+ DXGI_FORMAT_UNKNOWN,
|
||||
+ DXGI_FORMAT_R8_UNORM,
|
||||
+ DXGI_FORMAT_R8G8_UNORM,
|
||||
+ DXGI_FORMAT_B5G6R5_UNORM,
|
||||
+ DXGI_FORMAT_B4G4R4A4_UNORM,
|
||||
+ DXGI_FORMAT_B5G5R5A1_UNORM,
|
||||
+ DXGI_FORMAT_B8G8R8X8_UNORM,
|
||||
+ DXGI_FORMAT_B8G8R8A8_UNORM
|
||||
+};
|
||||
+
|
||||
+static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(to_be_converted_format); ++i)
|
||||
+ {
|
||||
+ if (format == to_be_converted_format[i])
|
||||
+ return DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
+ }
|
||||
+ return format;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
+ D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
+{
|
||||
+ IWICBitmapFrameDecode *frame = NULL;
|
||||
+ IWICImagingFactory *factory = NULL;
|
||||
+ IWICDdsDecoder *dds_decoder = NULL;
|
||||
+ IWICBitmapDecoder *decoder = NULL;
|
||||
+ WICDdsParameters dds_params;
|
||||
+ IWICStream *stream = NULL;
|
||||
+ unsigned int frame_count;
|
||||
+ GUID container_format;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("src_data %p, src_data_size %lu, pump %p, img_info %p, hresult %p.\n",
|
||||
+ src_data, src_data_size, pump, img_info, hresult);
|
||||
+
|
||||
+ if (!src_data || !src_data_size || !img_info)
|
||||
+ return E_FAIL;
|
||||
+ if (pump)
|
||||
+ FIXME("Thread pump is not supported yet.\n");
|
||||
+
|
||||
+ WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory);
|
||||
+ IWICImagingFactory_CreateStream(factory, &stream);
|
||||
+ hr = IWICStream_InitializeFromMemory(stream, (BYTE *)src_data, src_data_size);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ WARN("Failed to initialize stream.\n");
|
||||
+ goto end;
|
||||
+ }
|
||||
+ hr = IWICImagingFactory_CreateDecoderFromStream(factory, (IStream *)stream, NULL, 0, &decoder);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+
|
||||
+ hr = IWICBitmapDecoder_GetContainerFormat(decoder, &container_format);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ img_info->ImageFileFormat = wic_container_guid_to_file_format(&container_format);
|
||||
+ if (img_info->ImageFileFormat == D3DX11_IFF_FORCE_DWORD)
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ WARN("Unsupported image file format %s.\n", debugstr_guid(&container_format));
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
|
||||
+ if (FAILED(hr) || !frame_count)
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapFrameDecode_GetSize(frame, &img_info->Width, &img_info->Height);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+
|
||||
+ if (img_info->ImageFileFormat == D3DX11_IFF_DDS)
|
||||
+ {
|
||||
+ hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICDdsDecoder, (void **)&dds_decoder);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ hr = IWICDdsDecoder_GetParameters(dds_decoder, &dds_params);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ img_info->ArraySize = dds_params.ArraySize;
|
||||
+ img_info->Depth = dds_params.Depth;
|
||||
+ img_info->MipLevels = dds_params.MipLevels;
|
||||
+ img_info->ResourceDimension = wic_dimension_to_d3dx11_dimension(dds_params.Dimension);
|
||||
+ img_info->Format = get_d3dx11_dds_format(dds_params.DxgiFormat);
|
||||
+ img_info->MiscFlags = 0;
|
||||
+ if (dds_params.Dimension == WICDdsTextureCube)
|
||||
+ {
|
||||
+ img_info->MiscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE;
|
||||
+ img_info->ArraySize *= 6;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ img_info->ArraySize = 1;
|
||||
+ img_info->Depth = 1;
|
||||
+ img_info->MipLevels = 1;
|
||||
+ img_info->ResourceDimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
+ img_info->Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
+ img_info->MiscFlags = 0;
|
||||
+ }
|
||||
+
|
||||
+end:
|
||||
+ if (dds_decoder)
|
||||
+ IWICDdsDecoder_Release(dds_decoder);
|
||||
+ if (frame)
|
||||
+ IWICBitmapFrameDecode_Release(frame);
|
||||
+ if (decoder)
|
||||
+ IWICBitmapDecoder_Release(decoder);
|
||||
+ if (stream)
|
||||
+ IWICStream_Release(stream);
|
||||
+ if (factory)
|
||||
+ IWICImagingFactory_Release(factory);
|
||||
+
|
||||
+ if (hr != S_OK)
|
||||
+ {
|
||||
+ WARN("Invalid or unsupported image file.\n");
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
HRESULT WINAPI D3DX11CreateShaderResourceViewFromMemory(ID3D11Device *device, const void *data,
|
||||
SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
|
||||
ID3D11ShaderResourceView **view, HRESULT *hresult)
|
||||
--
|
||||
2.32.0
|
||||
|
@@ -0,0 +1,395 @@
|
||||
From 2f65959901f62bfc6a48c683e6eaa5d6ed5f7416 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 3 Aug 2021 11:13:18 +1000
|
||||
Subject: [PATCH] d3dx11_42: Implement D3DX11CreateTextureFromMemory
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx11_43/texture.c | 347 ++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 342 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 8addf4f84d3..f47b8583c6c 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "wincodec.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
+#include "wine/heap.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
@@ -43,6 +44,32 @@ file_formats[] =
|
||||
{ &GUID_ContainerFormatWmp, D3DX11_IFF_WMP },
|
||||
};
|
||||
|
||||
+static const struct
|
||||
+{
|
||||
+ const GUID *wic_guid;
|
||||
+ DXGI_FORMAT dxgi_format;
|
||||
+}
|
||||
+wic_pixel_formats[] =
|
||||
+{
|
||||
+ { &GUID_WICPixelFormatBlackWhite, DXGI_FORMAT_R1_UNORM },
|
||||
+ { &GUID_WICPixelFormat8bppAlpha, DXGI_FORMAT_A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat8bppGray, DXGI_FORMAT_R8_UNORM },
|
||||
+ { &GUID_WICPixelFormat16bppGray, DXGI_FORMAT_R16_UNORM },
|
||||
+ { &GUID_WICPixelFormat16bppGrayHalf, DXGI_FORMAT_R16_FLOAT },
|
||||
+ { &GUID_WICPixelFormat32bppGrayFloat, DXGI_FORMAT_R32_FLOAT },
|
||||
+ { &GUID_WICPixelFormat16bppBGR565, DXGI_FORMAT_B5G6R5_UNORM },
|
||||
+ { &GUID_WICPixelFormat16bppBGRA5551, DXGI_FORMAT_B5G5R5A1_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppBGR, DXGI_FORMAT_B8G8R8X8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppBGRA, DXGI_FORMAT_B8G8R8A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA, DXGI_FORMAT_R8G8B8A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA1010102, DXGI_FORMAT_R10G10B10A2_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA1010102XR, DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM },
|
||||
+ { &GUID_WICPixelFormat64bppRGBA, DXGI_FORMAT_R16G16B16A16_UNORM },
|
||||
+ { &GUID_WICPixelFormat64bppRGBAHalf, DXGI_FORMAT_R16G16B16A16_FLOAT },
|
||||
+ { &GUID_WICPixelFormat96bppRGBFloat, DXGI_FORMAT_R32G32B32_FLOAT },
|
||||
+ { &GUID_WICPixelFormat128bppRGBAFloat, DXGI_FORMAT_R32G32B32A32_FLOAT }
|
||||
+};
|
||||
+
|
||||
static D3DX11_IMAGE_FILE_FORMAT wic_container_guid_to_file_format(GUID *container_format)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -95,6 +122,175 @@ static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
|
||||
return format;
|
||||
}
|
||||
|
||||
+static const DXGI_FORMAT block_compressed_formats[] =
|
||||
+{
|
||||
+ DXGI_FORMAT_BC1_TYPELESS, DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_BC1_UNORM_SRGB,
|
||||
+ DXGI_FORMAT_BC2_TYPELESS, DXGI_FORMAT_BC2_UNORM, DXGI_FORMAT_BC2_UNORM_SRGB,
|
||||
+ DXGI_FORMAT_BC3_TYPELESS, DXGI_FORMAT_BC3_UNORM, DXGI_FORMAT_BC3_UNORM_SRGB,
|
||||
+ DXGI_FORMAT_BC4_TYPELESS, DXGI_FORMAT_BC4_UNORM, DXGI_FORMAT_BC4_SNORM,
|
||||
+ DXGI_FORMAT_BC5_TYPELESS, DXGI_FORMAT_BC5_UNORM, DXGI_FORMAT_BC5_SNORM,
|
||||
+ DXGI_FORMAT_BC6H_TYPELESS, DXGI_FORMAT_BC6H_UF16, DXGI_FORMAT_BC6H_SF16,
|
||||
+ DXGI_FORMAT_BC7_TYPELESS, DXGI_FORMAT_BC7_UNORM, DXGI_FORMAT_BC7_UNORM_SRGB
|
||||
+};
|
||||
+
|
||||
+static BOOL is_block_compressed(DXGI_FORMAT format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(block_compressed_formats); ++i)
|
||||
+ if (format == block_compressed_formats[i])
|
||||
+ return TRUE;
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+static unsigned int get_bpp_from_format(DXGI_FORMAT format)
|
||||
+{
|
||||
+ switch (format)
|
||||
+ {
|
||||
+ case DXGI_FORMAT_R32G32B32A32_TYPELESS:
|
||||
+ case DXGI_FORMAT_R32G32B32A32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32G32B32A32_UINT:
|
||||
+ case DXGI_FORMAT_R32G32B32A32_SINT:
|
||||
+ return 128;
|
||||
+ case DXGI_FORMAT_R32G32B32_TYPELESS:
|
||||
+ case DXGI_FORMAT_R32G32B32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32G32B32_UINT:
|
||||
+ case DXGI_FORMAT_R32G32B32_SINT:
|
||||
+ return 96;
|
||||
+ case DXGI_FORMAT_R16G16B16A16_TYPELESS:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_FLOAT:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_UNORM:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_UINT:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_SNORM:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_SINT:
|
||||
+ case DXGI_FORMAT_R32G32_TYPELESS:
|
||||
+ case DXGI_FORMAT_R32G32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32G32_UINT:
|
||||
+ case DXGI_FORMAT_R32G32_SINT:
|
||||
+ case DXGI_FORMAT_R32G8X24_TYPELESS:
|
||||
+ case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:
|
||||
+ case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:
|
||||
+ case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:
|
||||
+ case DXGI_FORMAT_Y416:
|
||||
+ case DXGI_FORMAT_Y210:
|
||||
+ case DXGI_FORMAT_Y216:
|
||||
+ return 64;
|
||||
+ case DXGI_FORMAT_R10G10B10A2_TYPELESS:
|
||||
+ case DXGI_FORMAT_R10G10B10A2_UNORM:
|
||||
+ case DXGI_FORMAT_R10G10B10A2_UINT:
|
||||
+ case DXGI_FORMAT_R11G11B10_FLOAT:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_TYPELESS:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_UNORM:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_UINT:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_SNORM:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_SINT:
|
||||
+ case DXGI_FORMAT_R16G16_TYPELESS:
|
||||
+ case DXGI_FORMAT_R16G16_FLOAT:
|
||||
+ case DXGI_FORMAT_R16G16_UNORM:
|
||||
+ case DXGI_FORMAT_R16G16_UINT:
|
||||
+ case DXGI_FORMAT_R16G16_SNORM:
|
||||
+ case DXGI_FORMAT_R16G16_SINT:
|
||||
+ case DXGI_FORMAT_R32_TYPELESS:
|
||||
+ case DXGI_FORMAT_D32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32_UINT:
|
||||
+ case DXGI_FORMAT_R32_SINT:
|
||||
+ case DXGI_FORMAT_R24G8_TYPELESS:
|
||||
+ case DXGI_FORMAT_D24_UNORM_S8_UINT:
|
||||
+ case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:
|
||||
+ case DXGI_FORMAT_X24_TYPELESS_G8_UINT:
|
||||
+ case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:
|
||||
+ case DXGI_FORMAT_R8G8_B8G8_UNORM:
|
||||
+ case DXGI_FORMAT_G8R8_G8B8_UNORM:
|
||||
+ case DXGI_FORMAT_B8G8R8A8_UNORM:
|
||||
+ case DXGI_FORMAT_B8G8R8X8_UNORM:
|
||||
+ case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:
|
||||
+ case DXGI_FORMAT_B8G8R8A8_TYPELESS:
|
||||
+ case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_B8G8R8X8_TYPELESS:
|
||||
+ case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_AYUV:
|
||||
+ case DXGI_FORMAT_Y410:
|
||||
+ case DXGI_FORMAT_YUY2:
|
||||
+ return 32;
|
||||
+ case DXGI_FORMAT_P010:
|
||||
+ case DXGI_FORMAT_P016:
|
||||
+ return 24;
|
||||
+ case DXGI_FORMAT_R8G8_TYPELESS:
|
||||
+ case DXGI_FORMAT_R8G8_UNORM:
|
||||
+ case DXGI_FORMAT_R8G8_UINT:
|
||||
+ case DXGI_FORMAT_R8G8_SNORM:
|
||||
+ case DXGI_FORMAT_R8G8_SINT:
|
||||
+ case DXGI_FORMAT_R16_TYPELESS:
|
||||
+ case DXGI_FORMAT_R16_FLOAT:
|
||||
+ case DXGI_FORMAT_D16_UNORM:
|
||||
+ case DXGI_FORMAT_R16_UNORM:
|
||||
+ case DXGI_FORMAT_R16_UINT:
|
||||
+ case DXGI_FORMAT_R16_SNORM:
|
||||
+ case DXGI_FORMAT_R16_SINT:
|
||||
+ case DXGI_FORMAT_B5G6R5_UNORM:
|
||||
+ case DXGI_FORMAT_B5G5R5A1_UNORM:
|
||||
+ case DXGI_FORMAT_A8P8:
|
||||
+ case DXGI_FORMAT_B4G4R4A4_UNORM:
|
||||
+ return 16;
|
||||
+ case DXGI_FORMAT_NV12:
|
||||
+ case DXGI_FORMAT_420_OPAQUE:
|
||||
+ case DXGI_FORMAT_NV11:
|
||||
+ return 12;
|
||||
+ case DXGI_FORMAT_R8_TYPELESS:
|
||||
+ case DXGI_FORMAT_R8_UNORM:
|
||||
+ case DXGI_FORMAT_R8_UINT:
|
||||
+ case DXGI_FORMAT_R8_SNORM:
|
||||
+ case DXGI_FORMAT_R8_SINT:
|
||||
+ case DXGI_FORMAT_A8_UNORM:
|
||||
+ case DXGI_FORMAT_AI44:
|
||||
+ case DXGI_FORMAT_IA44:
|
||||
+ case DXGI_FORMAT_P8:
|
||||
+ case DXGI_FORMAT_BC2_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC2_UNORM:
|
||||
+ case DXGI_FORMAT_BC2_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_BC3_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC3_UNORM:
|
||||
+ case DXGI_FORMAT_BC3_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_BC5_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC5_UNORM:
|
||||
+ case DXGI_FORMAT_BC5_SNORM:
|
||||
+ case DXGI_FORMAT_BC6H_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC6H_UF16:
|
||||
+ case DXGI_FORMAT_BC6H_SF16:
|
||||
+ case DXGI_FORMAT_BC7_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC7_UNORM:
|
||||
+ case DXGI_FORMAT_BC7_UNORM_SRGB:
|
||||
+ return 8;
|
||||
+ case DXGI_FORMAT_BC1_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC1_UNORM:
|
||||
+ case DXGI_FORMAT_BC1_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_BC4_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC4_UNORM:
|
||||
+ case DXGI_FORMAT_BC4_SNORM:
|
||||
+ return 4;
|
||||
+ case DXGI_FORMAT_R1_UNORM:
|
||||
+ return 1;
|
||||
+ default:
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const GUID *dxgi_format_to_wic_guid(DXGI_FORMAT format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(wic_pixel_formats); ++i)
|
||||
+ {
|
||||
+ if (wic_pixel_formats[i].dxgi_format == format)
|
||||
+ return wic_pixel_formats[i].wic_guid;
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
{
|
||||
@@ -229,14 +425,155 @@ HRESULT WINAPI D3DX11CreateTextureFromFileW(ID3D11Device *device, const WCHAR *f
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
-HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *data,
|
||||
- SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
|
||||
+HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *src_data,
|
||||
+ SIZE_T src_data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
|
||||
ID3D11Resource **texture, HRESULT *hresult)
|
||||
{
|
||||
- FIXME("device %p, data %p, data_size %lu, load_info %p, pump %p, texture %p, hresult %p stub.\n",
|
||||
- device, data, data_size, load_info, pump, texture, hresult);
|
||||
+ unsigned int frame_count, width, height, stride, frame_size;
|
||||
+ IWICFormatConverter *converter = NULL;
|
||||
+ IWICDdsFrameDecode *dds_frame = NULL;
|
||||
+ D3D11_TEXTURE2D_DESC texture_2d_desc;
|
||||
+ D3D11_SUBRESOURCE_DATA resource_data;
|
||||
+ IWICBitmapFrameDecode *frame = NULL;
|
||||
+ IWICImagingFactory *factory = NULL;
|
||||
+ IWICBitmapDecoder *decoder = NULL;
|
||||
+ ID3D11Texture2D *texture_2d;
|
||||
+ D3DX11_IMAGE_INFO img_info;
|
||||
+ IWICStream *stream = NULL;
|
||||
+ const GUID *dst_format;
|
||||
+ BYTE *buffer = NULL;
|
||||
+ BOOL can_convert;
|
||||
+ GUID src_format;
|
||||
+ HRESULT hr;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("device %p, src_data %p, src_data_size %lu, load_info %p, pump %p, texture %p, hresult %p.\n",
|
||||
+ device, src_data, src_data_size, load_info, pump, texture, hresult);
|
||||
+
|
||||
+ if (!src_data || !src_data_size || !texture)
|
||||
+ return E_FAIL;
|
||||
+ if (load_info)
|
||||
+ FIXME("load_info is ignored.\n");
|
||||
+ if (pump)
|
||||
+ FIXME("Thread pump is not supported yet.\n");
|
||||
+
|
||||
+ if (FAILED(D3DX11GetImageInfoFromMemory(src_data, src_data_size, NULL, &img_info, NULL)))
|
||||
+ return E_FAIL;
|
||||
+ if (img_info.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
|
||||
+ {
|
||||
+ FIXME("Cube map is not supported.\n");
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr = WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICImagingFactory_CreateStream(factory, &stream)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICStream_InitializeFromMemory(stream, (BYTE *)src_data, src_data_size)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICImagingFactory_CreateDecoderFromStream(factory, (IStream *)stream, NULL, 0, &decoder)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count)) || !frame_count)
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &src_format)))
|
||||
+ goto end;
|
||||
+
|
||||
+ width = img_info.Width;
|
||||
+ height = img_info.Height;
|
||||
+ if (is_block_compressed(img_info.Format))
|
||||
+ {
|
||||
+ width = (width + 3) & ~3;
|
||||
+ height = (height + 3) & ~3;
|
||||
+ }
|
||||
+ stride = (width * get_bpp_from_format(img_info.Format) + 7) / 8;
|
||||
+ frame_size = stride * height;
|
||||
+
|
||||
+ if (!(buffer = heap_alloc(frame_size)))
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ if (is_block_compressed(img_info.Format))
|
||||
+ {
|
||||
+ if (FAILED(hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICDdsFrameDecode, (void **)&dds_frame)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, stride * 4, frame_size, buffer)))
|
||||
+ goto end;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (!(dst_format = dxgi_format_to_wic_guid(img_info.Format)))
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ FIXME("Unsupported DXGI format %#x.\n", img_info.Format);
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ if (IsEqualGUID(&src_format, dst_format))
|
||||
+ {
|
||||
+ if (FAILED(hr = IWICBitmapFrameDecode_CopyPixels(frame, NULL, stride, frame_size, buffer)))
|
||||
+ goto end;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (FAILED(hr = IWICImagingFactory_CreateFormatConverter(factory, &converter)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICFormatConverter_CanConvert(converter, &src_format, dst_format, &can_convert)))
|
||||
+ goto end;
|
||||
+ if (!can_convert)
|
||||
+ {
|
||||
+ WARN("Format converting %s to %s is not supported by WIC.\n",
|
||||
+ debugstr_guid(&src_format), debugstr_guid(dst_format));
|
||||
+ goto end;
|
||||
+ }
|
||||
+ if (FAILED(hr = IWICFormatConverter_Initialize(converter, (IWICBitmapSource *)frame, dst_format,
|
||||
+ WICBitmapDitherTypeErrorDiffusion, 0, 0, WICBitmapPaletteTypeCustom)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICFormatConverter_CopyPixels(converter, NULL, stride, frame_size, buffer)))
|
||||
+ goto end;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ memset(&texture_2d_desc, 0, sizeof(texture_2d_desc));
|
||||
+ texture_2d_desc.Width = width;
|
||||
+ texture_2d_desc.Height = height;
|
||||
+ texture_2d_desc.MipLevels = 1;
|
||||
+ texture_2d_desc.ArraySize = img_info.ArraySize;
|
||||
+ texture_2d_desc.Format = img_info.Format;
|
||||
+ texture_2d_desc.SampleDesc.Count = 1;
|
||||
+ texture_2d_desc.Usage = D3D11_USAGE_DEFAULT;
|
||||
+ texture_2d_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
|
||||
+ texture_2d_desc.MiscFlags = img_info.MiscFlags;
|
||||
+
|
||||
+ resource_data.pSysMem = buffer;
|
||||
+ resource_data.SysMemPitch = stride;
|
||||
+ resource_data.SysMemSlicePitch = frame_size;
|
||||
+
|
||||
+ if (FAILED(hr = ID3D11Device_CreateTexture2D(device, &texture_2d_desc, &resource_data, &texture_2d)))
|
||||
+ goto end;
|
||||
+
|
||||
+ *texture = (ID3D11Resource *)texture_2d;
|
||||
+ hr = S_OK;
|
||||
+
|
||||
+end:
|
||||
+ if (converter)
|
||||
+ IWICFormatConverter_Release(converter);
|
||||
+ if (dds_frame)
|
||||
+ IWICDdsFrameDecode_Release(dds_frame);
|
||||
+ if (buffer)
|
||||
+ heap_free(buffer);
|
||||
+ if (frame)
|
||||
+ IWICBitmapFrameDecode_Release(frame);
|
||||
+ if (decoder)
|
||||
+ IWICBitmapDecoder_Release(decoder);
|
||||
+ if (stream)
|
||||
+ IWICStream_Release(stream);
|
||||
+ if (factory)
|
||||
+ IWICImagingFactory_Release(factory);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DX11SaveTextureToFileW(ID3D11DeviceContext *context, ID3D11Resource *texture,
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -0,0 +1,4 @@
|
||||
Fixes: [50210] - Implement D3DX11GetImageInfoFromMemory
|
||||
Fixes: [45533] - Implement D3DX11CreateTextureFromMemory
|
||||
|
||||
# This patchset will need to wait until the new wined3dx dll implemented.
|
@@ -1,4 +1,4 @@
|
||||
From 27517cacf7df657e32e7ca7068c3e86723cb4a3c Mon Sep 17 00:00:00 2001
|
||||
From 6c3aa646aff81104eb7783138a71d4bb8cf192a7 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 13 Feb 2016 15:29:37 +0100
|
||||
Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
|
||||
@@ -6,11 +6,11 @@ Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
|
||||
Changes in v2 (by Christian Costa):
|
||||
* More generic code for D3DXDisassembleShader.
|
||||
---
|
||||
dlls/d3dx9_36/shader.c | 331 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 328 insertions(+), 3 deletions(-)
|
||||
dlls/d3dx9_36/shader.c | 332 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 327 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index c59fc791e..79d47b95c 100644
|
||||
index fe0f99180ac..54d0b158568 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,6 +1,7 @@
|
||||
@@ -30,11 +30,10 @@ index c59fc791e..79d47b95c 100644
|
||||
#include "d3dx9_private.h"
|
||||
#include "d3dcommon.h"
|
||||
#include "d3dcompiler.h"
|
||||
@@ -2138,10 +2139,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
@@ -2336,13 +2337,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
+
|
||||
+static const char *decl_usage[] = { "position", "blendweight", "blendindices", "normal", "psize", "texcoord",
|
||||
+ "tangent", "binormal", "tessfactor", "positiont", "color" };
|
||||
+
|
||||
@@ -299,10 +298,11 @@ index c59fc791e..79d47b95c 100644
|
||||
+ { D3DSIO_COMMENT, "", 0, instr_comment, 0x0100, 0xFFFF }
|
||||
+};
|
||||
+
|
||||
HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments, ID3DXBuffer **disassembly)
|
||||
HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments,
|
||||
- ID3DXBuffer **buffer)
|
||||
+ ID3DXBuffer **disassembly)
|
||||
{
|
||||
- FIXME("%p %d %s %p: stub\n", shader, colorcode, debugstr_a(comments), disassembly);
|
||||
- return E_OUTOFMEMORY;
|
||||
- TRACE("shader %p, colorcode %d, comments %s, buffer %p.\n", shader, colorcode, debugstr_a(comments), buffer);
|
||||
+ DWORD *ptr = (DWORD *)shader;
|
||||
+ char *buffer, *buf;
|
||||
+ UINT capacity = 4096;
|
||||
@@ -314,7 +314,9 @@ index c59fc791e..79d47b95c 100644
|
||||
+
|
||||
+ if (!shader || !disassembly)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
|
||||
- return D3DDisassemble(shader, D3DXGetShaderSize(shader), colorcode ? D3D_DISASM_ENABLE_COLOR_CODE : 0,
|
||||
- comments, (ID3DBlob **)buffer);
|
||||
+ buf = buffer = HeapAlloc(GetProcessHeap(), 0, capacity);
|
||||
+ if (!buffer)
|
||||
+ return E_OUTOFMEMORY;
|
||||
@@ -331,7 +333,7 @@ index c59fc791e..79d47b95c 100644
|
||||
+ if ((buf - buffer + 128) > capacity)
|
||||
+ {
|
||||
+ UINT count = buf - buffer;
|
||||
+ char *new_buffer = HeapReAlloc(GetProcessHeap(), 0, buffer, capacity * 2);
|
||||
+ char *new_buffer = HeapReAlloc(GetProcessHeap(), 0, buffer, capacity * 2);
|
||||
+ if (!new_buffer)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, buffer);
|
||||
@@ -368,5 +370,5 @@ index c59fc791e..79d47b95c 100644
|
||||
|
||||
struct d3dx9_texture_shader
|
||||
--
|
||||
2.21.0
|
||||
2.32.0
|
||||
|
||||
|
@@ -1,144 +0,0 @@
|
||||
From cca287da02e2946705ad89f6e8c052b68199ad31 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 1 Jun 2021 17:15:44 +1000
|
||||
Subject: [PATCH v3] dpnet: Implement IDirectPlay8Server EnumServiceProviders
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/dpnet/server.c | 14 ++++++-
|
||||
dlls/dpnet/tests/server.c | 86 +++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 98 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/dpnet/server.c b/dlls/dpnet/server.c
|
||||
index 977771697ac..26dd76388b1 100644
|
||||
--- a/dlls/dpnet/server.c
|
||||
+++ b/dlls/dpnet/server.c
|
||||
@@ -126,9 +126,19 @@ static HRESULT WINAPI IDirectPlay8ServerImpl_EnumServiceProviders(IDirectPlay8Se
|
||||
PDWORD pcReturned, DWORD dwFlags)
|
||||
{
|
||||
IDirectPlay8ServerImpl *This = impl_from_IDirectPlay8Server(iface);
|
||||
- FIXME("(%p)->(%s %s %p %p %p %d)\n", This, debugstr_guid(pguidServiceProvider), debugstr_guid(pguidApplication),
|
||||
+ TRACE("(%p)->(%s %s %p %p %p %d)\n", This, debugstr_guid(pguidServiceProvider), debugstr_guid(pguidApplication),
|
||||
pSPInfoBuffer, pcbEnumData, pcReturned, dwFlags);
|
||||
- return E_NOTIMPL;
|
||||
+
|
||||
+ if(!This->msghandler)
|
||||
+ return DPNERR_UNINITIALIZED;
|
||||
+
|
||||
+ if(dwFlags)
|
||||
+ FIXME("Unhandled flags %x\n", dwFlags);
|
||||
+
|
||||
+ if(pguidApplication)
|
||||
+ FIXME("Application guid %s is currently being ignored\n", debugstr_guid(pguidApplication));
|
||||
+
|
||||
+ return enum_services_providers(pguidServiceProvider, pSPInfoBuffer, pcbEnumData, pcReturned);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectPlay8ServerImpl_CancelAsyncOperation(IDirectPlay8Server *iface, DPNHANDLE hAsyncHandle, DWORD dwFlags)
|
||||
diff --git a/dlls/dpnet/tests/server.c b/dlls/dpnet/tests/server.c
|
||||
index 74a0e5adfcf..ae7e876522d 100644
|
||||
--- a/dlls/dpnet/tests/server.c
|
||||
+++ b/dlls/dpnet/tests/server.c
|
||||
@@ -184,6 +184,91 @@ static void test_server_info(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static void test_enum_service_providers(void)
|
||||
+{
|
||||
+ DPN_SERVICE_PROVIDER_INFO *serv_prov_info;
|
||||
+ IDirectPlay8Server *server = NULL;
|
||||
+ DWORD items, size;
|
||||
+ DWORD i;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ hr = CoCreateInstance( &CLSID_DirectPlay8Server, NULL, CLSCTX_ALL, &IID_IDirectPlay8Server, (LPVOID*)&server);
|
||||
+ ok(hr == S_OK, "Failed to create IDirectPlay8Server object\n");
|
||||
+ if (FAILED(hr))
|
||||
+ return;
|
||||
+
|
||||
+ size = 0;
|
||||
+ items = 0;
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, serv_prov_info, &size, &items, 0);
|
||||
+ ok(hr == DPNERR_UNINITIALIZED, "got %x\n", hr);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayMessageHandler, 0);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ IDirectPlay8Server_Release(server);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ size = 0;
|
||||
+ items = 0;
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, &size, NULL, 0);
|
||||
+ ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, NULL, &items, 0);
|
||||
+ ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, &size, &items, 0);
|
||||
+ ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(size != 0, "size is unexpectedly 0\n");
|
||||
+
|
||||
+ serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, serv_prov_info, &size, &items, 0);
|
||||
+ ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(items != 0, "Found unexpectedly no service providers\n");
|
||||
+
|
||||
+ trace("number of items found: %d\n", items);
|
||||
+
|
||||
+ for (i=0;i<items;i++)
|
||||
+ {
|
||||
+ trace("Found Service Provider: %s\n", wine_dbgstr_w(serv_prov_info[i].pwszName));
|
||||
+ trace("Found guid: %s\n", wine_dbgstr_guid(&serv_prov_info[i].guid));
|
||||
+ }
|
||||
+
|
||||
+ ok(HeapFree(GetProcessHeap(), 0, serv_prov_info), "Failed freeing server provider info\n");
|
||||
+
|
||||
+ size = 0;
|
||||
+ items = 0;
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, &CLSID_DP8SP_TCPIP, NULL, NULL, &size, &items, 0);
|
||||
+ ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(size != 0, "size is unexpectedly 0\n");
|
||||
+
|
||||
+ serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, &CLSID_DP8SP_TCPIP, NULL, serv_prov_info, &size, &items, 0);
|
||||
+ ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(items != 0, "Found unexpectedly no adapter\n");
|
||||
+
|
||||
+
|
||||
+ for (i=0;i<items;i++)
|
||||
+ {
|
||||
+ trace("Found adapter: %s\n", wine_dbgstr_w(serv_prov_info[i].pwszName));
|
||||
+ trace("Found adapter guid: %s\n", wine_dbgstr_guid(&serv_prov_info[i].guid));
|
||||
+ }
|
||||
+
|
||||
+ /* Invalid GUID */
|
||||
+ items = 88;
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, &appguid, NULL, serv_prov_info, &size, &items, 0);
|
||||
+ ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(items == 88, "Found adapter %d\n", items);
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, serv_prov_info);
|
||||
+ IDirectPlay8Server_Release(server);
|
||||
+}
|
||||
+
|
||||
BOOL is_process_elevated(void)
|
||||
{
|
||||
HANDLE token;
|
||||
@@ -398,6 +483,7 @@ START_TEST(server)
|
||||
|
||||
create_server();
|
||||
test_server_info();
|
||||
+ test_enum_service_providers();
|
||||
|
||||
CoUninitialize();
|
||||
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [51221] dpnet: Impelment IDirectPlay8Server EnumServiceProviders.
|
@@ -1,4 +1,4 @@
|
||||
From 723ccff12d0b9516490e34519e244a6486d11b8b Mon Sep 17 00:00:00 2001
|
||||
From f8f619802b42448514fdab786a2c593658c33625 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 13 Jun 2018 10:44:49 -0500
|
||||
Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open().
|
||||
@@ -13,10 +13,10 @@ Although perhaps we shouldn't since the server doesn't do this.
|
||||
3 files changed, 89 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 5672688a0d7..24ae489c3a9 100755
|
||||
index c9418c0f225..65a20ef25c8 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7467,6 +7467,7 @@ for ac_header in \
|
||||
@@ -7543,6 +7543,7 @@ for ac_header in \
|
||||
sys/cdio.h \
|
||||
sys/epoll.h \
|
||||
sys/event.h \
|
||||
@@ -24,15 +24,15 @@ index 5672688a0d7..24ae489c3a9 100755
|
||||
sys/filio.h \
|
||||
sys/ioctl.h \
|
||||
sys/ipc.h \
|
||||
@@ -17815,6 +17816,7 @@ for ac_func in \
|
||||
pipe2 \
|
||||
@@ -18011,6 +18012,7 @@ for ac_func in \
|
||||
poll \
|
||||
port_create \
|
||||
posix_fadvise \
|
||||
+ ppoll \
|
||||
prctl \
|
||||
pread \
|
||||
proc_pidinfo \
|
||||
@@ -18224,6 +18226,72 @@ fi
|
||||
@@ -18411,6 +18413,72 @@ fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -106,10 +106,10 @@ index 5672688a0d7..24ae489c3a9 100755
|
||||
then
|
||||
if ${LDAP_CFLAGS:+false} :; then :
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7a03cbc1cab..bfa64a8d68a 100644
|
||||
index a7c3be91b7e..0845cc83554 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -494,6 +494,7 @@ AC_CHECK_HEADERS(\
|
||||
@@ -512,6 +512,7 @@ AC_CHECK_HEADERS(\
|
||||
sys/cdio.h \
|
||||
sys/epoll.h \
|
||||
sys/event.h \
|
||||
@@ -117,15 +117,15 @@ index 7a03cbc1cab..bfa64a8d68a 100644
|
||||
sys/filio.h \
|
||||
sys/ioctl.h \
|
||||
sys/ipc.h \
|
||||
@@ -2207,6 +2208,7 @@ AC_CHECK_FUNCS(\
|
||||
pipe2 \
|
||||
@@ -2216,6 +2217,7 @@ AC_CHECK_FUNCS(\
|
||||
poll \
|
||||
port_create \
|
||||
posix_fadvise \
|
||||
+ ppoll \
|
||||
prctl \
|
||||
pread \
|
||||
proc_pidinfo \
|
||||
@@ -2271,6 +2273,16 @@ case $host_os in
|
||||
@@ -2272,6 +2274,16 @@ case $host_os in
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -143,12 +143,12 @@ index 7a03cbc1cab..bfa64a8d68a 100644
|
||||
if test "x$with_ldap" != "xno"
|
||||
then
|
||||
diff --git a/include/config.h.in b/include/config.h.in
|
||||
index 4adb6325e14..6f1323311d9 100644
|
||||
index 2b488894a49..1b3ab9f9580 100644
|
||||
--- a/include/config.h.in
|
||||
+++ b/include/config.h.in
|
||||
@@ -687,6 +687,9 @@
|
||||
/* Define to 1 if you have the <port.h> header file. */
|
||||
#undef HAVE_PORT_H
|
||||
@@ -516,6 +516,9 @@
|
||||
/* Define to 1 if you have the `posix_fadvise' function. */
|
||||
#undef HAVE_POSIX_FADVISE
|
||||
|
||||
+/* Define to 1 if you have the `ppoll' function. */
|
||||
+#undef HAVE_PPOLL
|
||||
@@ -156,7 +156,7 @@ index 4adb6325e14..6f1323311d9 100644
|
||||
/* Define to 1 if you have the `prctl' function. */
|
||||
#undef HAVE_PRCTL
|
||||
|
||||
@@ -804,6 +807,9 @@
|
||||
@@ -600,6 +603,9 @@
|
||||
/* Define to 1 if `interface_id' is a member of `sg_io_hdr_t'. */
|
||||
#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
|
||||
|
||||
@@ -166,7 +166,7 @@ index 4adb6325e14..6f1323311d9 100644
|
||||
/* Define if sigaddset is supported */
|
||||
#undef HAVE_SIGADDSET
|
||||
|
||||
@@ -1004,6 +1010,9 @@
|
||||
@@ -767,6 +773,9 @@
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
#undef HAVE_SYS_EPOLL_H
|
||||
|
||||
@@ -177,5 +177,5 @@ index 4adb6325e14..6f1323311d9 100644
|
||||
#undef HAVE_SYS_EVENT_H
|
||||
|
||||
--
|
||||
2.28.0
|
||||
2.32.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 1ecb2712f80d52480a8204824df6b56a88c062b8 Mon Sep 17 00:00:00 2001
|
||||
From 57742beb169682bcc0d4de196242ee0528e223df Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 18:51:40 -0500
|
||||
Subject: [PATCH] server: Add an object operation to grab the esync file
|
||||
@@ -42,7 +42,7 @@ Split off to decrease patch size.
|
||||
33 files changed, 67 insertions(+)
|
||||
|
||||
diff --git a/server/async.c b/server/async.c
|
||||
index 1ac5117edb9..e52707a4929 100644
|
||||
index 442d98d8c7a..0645cc5f7bb 100644
|
||||
--- a/server/async.c
|
||||
+++ b/server/async.c
|
||||
@@ -72,6 +72,7 @@ static const struct object_ops async_ops =
|
||||
@@ -53,7 +53,7 @@ index 1ac5117edb9..e52707a4929 100644
|
||||
async_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -499,6 +500,7 @@ static const struct object_ops iosb_ops =
|
||||
@@ -489,6 +490,7 @@ static const struct object_ops iosb_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -74,7 +74,7 @@ index 8d0ffbb05f3..ff0d8b5d87b 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/change.c b/server/change.c
|
||||
index ff8c3ad1037..30b4c9776e1 100644
|
||||
index b02a9cd65bf..9ccdec75ed4 100644
|
||||
--- a/server/change.c
|
||||
+++ b/server/change.c
|
||||
@@ -114,6 +114,7 @@ static const struct object_ops dir_ops =
|
||||
@@ -86,7 +86,7 @@ index ff8c3ad1037..30b4c9776e1 100644
|
||||
no_signal, /* signal */
|
||||
dir_get_fd, /* get_fd */
|
||||
diff --git a/server/clipboard.c b/server/clipboard.c
|
||||
index 1c4875ff726..e21663b5a94 100644
|
||||
index eb9bd4f7020..cb4ca0362df 100644
|
||||
--- a/server/clipboard.c
|
||||
+++ b/server/clipboard.c
|
||||
@@ -77,6 +77,7 @@ static const struct object_ops clipboard_ops =
|
||||
@@ -110,7 +110,7 @@ index eb0d256ad09..5a8bb8fb47f 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/console.c b/server/console.c
|
||||
index 848ee6e8d98..a7f122adacd 100644
|
||||
index 1e6f6c0f8a3..4443c322548 100644
|
||||
--- a/server/console.c
|
||||
+++ b/server/console.c
|
||||
@@ -81,6 +81,7 @@ static const struct object_ops console_ops =
|
||||
@@ -170,7 +170,7 @@ index 848ee6e8d98..a7f122adacd 100644
|
||||
no_signal, /* signal */
|
||||
console_connection_get_fd, /* get_fd */
|
||||
diff --git a/server/debugger.c b/server/debugger.c
|
||||
index 2a2839f42ee..aee4bebb147 100644
|
||||
index ca84a88258f..08d78eabe9b 100644
|
||||
--- a/server/debugger.c
|
||||
+++ b/server/debugger.c
|
||||
@@ -87,6 +87,7 @@ static const struct object_ops debug_event_ops =
|
||||
@@ -190,18 +190,18 @@ index 2a2839f42ee..aee4bebb147 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/device.c b/server/device.c
|
||||
index 6400751e339..6f8a65c6c41 100644
|
||||
index b669921a003..6086f134df7 100644
|
||||
--- a/server/device.c
|
||||
+++ b/server/device.c
|
||||
@@ -68,6 +68,7 @@ static const struct object_ops irp_call_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
irp_call_signaled, /* signaled */
|
||||
@@ -67,6 +67,7 @@ static const struct object_ops irp_call_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
no_satisfied, /* satisfied */
|
||||
NULL, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -108,6 +109,7 @@ static const struct object_ops device_manager_ops =
|
||||
@@ -107,6 +108,7 @@ static const struct object_ops device_manager_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
device_manager_signaled, /* signaled */
|
||||
@@ -209,7 +209,7 @@ index 6400751e339..6f8a65c6c41 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -165,6 +167,7 @@ static const struct object_ops device_ops =
|
||||
@@ -164,6 +166,7 @@ static const struct object_ops device_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -217,7 +217,7 @@ index 6400751e339..6f8a65c6c41 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -217,6 +220,7 @@ static const struct object_ops device_file_ops =
|
||||
@@ -216,6 +219,7 @@ static const struct object_ops device_file_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
default_fd_signaled, /* signaled */
|
||||
@@ -226,7 +226,7 @@ index 6400751e339..6f8a65c6c41 100644
|
||||
no_signal, /* signal */
|
||||
device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/directory.c b/server/directory.c
|
||||
index 30d69459984..1f2e7d28302 100644
|
||||
index ec8187b425a..1264551f4e4 100644
|
||||
--- a/server/directory.c
|
||||
+++ b/server/directory.c
|
||||
@@ -70,6 +70,7 @@ static const struct object_ops object_type_ops =
|
||||
@@ -278,7 +278,7 @@ index ccdd465dd5b..3d869037bf5 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 43c0d36dff9..819cd059547 100644
|
||||
index 01d6c181f1b..f7187ca2b34 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -218,6 +218,7 @@ static const struct object_ops fd_ops =
|
||||
@@ -314,7 +314,7 @@ index 43c0d36dff9..819cd059547 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/file.c b/server/file.c
|
||||
index ccac535e50f..70aa784fa21 100644
|
||||
index 53c694177df..e3f52f4ef76 100644
|
||||
--- a/server/file.c
|
||||
+++ b/server/file.c
|
||||
@@ -97,6 +97,7 @@ static const struct object_ops file_ops =
|
||||
@@ -326,7 +326,7 @@ index ccac535e50f..70aa784fa21 100644
|
||||
no_signal, /* signal */
|
||||
file_get_fd, /* get_fd */
|
||||
diff --git a/server/handle.c b/server/handle.c
|
||||
index 6e0848eedf0..65176c0be30 100644
|
||||
index 15da701ee99..c07199109fd 100644
|
||||
--- a/server/handle.c
|
||||
+++ b/server/handle.c
|
||||
@@ -126,6 +126,7 @@ static const struct object_ops handle_table_ops =
|
||||
@@ -350,7 +350,7 @@ index c048908c295..f5450b5a870 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/mailslot.c b/server/mailslot.c
|
||||
index 5597a21dd29..eec27a89dfc 100644
|
||||
index d4b2fd1b562..8cd4e9a741a 100644
|
||||
--- a/server/mailslot.c
|
||||
+++ b/server/mailslot.c
|
||||
@@ -78,6 +78,7 @@ static const struct object_ops mailslot_ops =
|
||||
@@ -386,7 +386,7 @@ index 5597a21dd29..eec27a89dfc 100644
|
||||
no_signal, /* signal */
|
||||
mailslot_device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/mapping.c b/server/mapping.c
|
||||
index 3a162eae76b..f182ac10b47 100644
|
||||
index a814fe8090f..c7541f353f4 100644
|
||||
--- a/server/mapping.c
|
||||
+++ b/server/mapping.c
|
||||
@@ -68,6 +68,7 @@ static const struct object_ops ranges_ops =
|
||||
@@ -426,7 +426,7 @@ index 75ff5117d3f..681cbc3e759 100644
|
||||
mutex_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index a3ce9d463f1..74348b45dc9 100644
|
||||
index df8c7e3170c..d756de18db0 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -119,6 +119,7 @@ static const struct object_ops named_pipe_ops =
|
||||
@@ -470,7 +470,7 @@ index a3ce9d463f1..74348b45dc9 100644
|
||||
no_signal, /* signal */
|
||||
named_pipe_device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/object.h b/server/object.h
|
||||
index 1aef43018b2..a4b5523866c 100644
|
||||
index 039bf4e7d4e..0a09663cfa7 100644
|
||||
--- a/server/object.h
|
||||
+++ b/server/object.h
|
||||
@@ -81,6 +81,8 @@ struct object_ops
|
||||
@@ -483,7 +483,7 @@ index 1aef43018b2..a4b5523866c 100644
|
||||
void (*satisfied)(struct object *,struct wait_queue_entry *);
|
||||
/* signal an object */
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index f65d7abe2af..af7aef0cdac 100644
|
||||
index 0870de5bb26..0b14f4e6193 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -91,6 +91,7 @@ static const struct object_ops process_ops =
|
||||
@@ -502,7 +502,7 @@ index f65d7abe2af..af7aef0cdac 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -200,6 +202,7 @@ static const struct object_ops job_ops =
|
||||
@@ -203,6 +205,7 @@ static const struct object_ops job_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
job_signaled, /* signaled */
|
||||
@@ -511,10 +511,10 @@ index f65d7abe2af..af7aef0cdac 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 2c7ad2de9eb..0bd84fb7223 100644
|
||||
index 54dcd246d89..2d6d262f09d 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -172,6 +172,7 @@ static const struct object_ops msg_queue_ops =
|
||||
@@ -175,6 +175,7 @@ static const struct object_ops msg_queue_ops =
|
||||
msg_queue_add_queue, /* add_queue */
|
||||
msg_queue_remove_queue, /* remove_queue */
|
||||
msg_queue_signaled, /* signaled */
|
||||
@@ -522,7 +522,7 @@ index 2c7ad2de9eb..0bd84fb7223 100644
|
||||
msg_queue_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -209,6 +210,7 @@ static const struct object_ops thread_input_ops =
|
||||
@@ -212,6 +213,7 @@ static const struct object_ops thread_input_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -531,10 +531,10 @@ index 2c7ad2de9eb..0bd84fb7223 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index 74da4d1d9a4..e9f7bf761e8 100644
|
||||
index 427da8a5883..1dd201d5b69 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -174,6 +174,7 @@ static const struct object_ops key_ops =
|
||||
@@ -178,6 +178,7 @@ static const struct object_ops key_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -567,7 +567,7 @@ index 543d5883ec8..9f37e2d8aa6 100644
|
||||
semaphore_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/serial.c b/server/serial.c
|
||||
index ba8402c5935..ba5d470704e 100644
|
||||
index d3ea4cbe420..af1fb49e52b 100644
|
||||
--- a/server/serial.c
|
||||
+++ b/server/serial.c
|
||||
@@ -92,6 +92,7 @@ static const struct object_ops serial_ops =
|
||||
@@ -591,10 +591,10 @@ index 0c22c157f2b..45d176de46c 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/sock.c b/server/sock.c
|
||||
index 775ec6edf32..651736a2280 100644
|
||||
index 50bfc08e145..a7ae0e1c7dc 100644
|
||||
--- a/server/sock.c
|
||||
+++ b/server/sock.c
|
||||
@@ -189,6 +189,7 @@ static const struct object_ops sock_ops =
|
||||
@@ -247,6 +247,7 @@ static const struct object_ops sock_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
default_fd_signaled, /* signaled */
|
||||
@@ -602,7 +602,7 @@ index 775ec6edf32..651736a2280 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
sock_get_fd, /* get_fd */
|
||||
@@ -1526,6 +1527,7 @@ static const struct object_ops ifchange_ops =
|
||||
@@ -2966,6 +2967,7 @@ static const struct object_ops ifchange_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -610,7 +610,7 @@ index 775ec6edf32..651736a2280 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
ifchange_get_fd, /* get_fd */
|
||||
@@ -1746,6 +1748,7 @@ static const struct object_ops socket_device_ops =
|
||||
@@ -3186,6 +3188,7 @@ static const struct object_ops socket_device_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -631,10 +631,10 @@ index 3879bb685f7..5ebe35636e1 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index b78ffe558de..62f9a3f877a 100644
|
||||
index 3bd932bad9f..7192faa544a 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -110,6 +110,7 @@ static const struct object_ops thread_apc_ops =
|
||||
@@ -97,6 +97,7 @@ static const struct object_ops thread_apc_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
thread_apc_signaled, /* signaled */
|
||||
@@ -642,7 +642,7 @@ index b78ffe558de..62f9a3f877a 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -147,6 +148,7 @@ static const struct object_ops context_ops =
|
||||
@@ -142,6 +143,7 @@ static const struct object_ops context_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
context_signaled, /* signaled */
|
||||
@@ -650,7 +650,7 @@ index b78ffe558de..62f9a3f877a 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -196,6 +198,7 @@ static const struct object_ops thread_ops =
|
||||
@@ -191,6 +193,7 @@ static const struct object_ops thread_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
thread_signaled, /* signaled */
|
||||
@@ -659,7 +659,7 @@ index b78ffe558de..62f9a3f877a 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/timer.c b/server/timer.c
|
||||
index 49483d9ae13..23d03aa3582 100644
|
||||
index 5e265d2ddf6..86ecf3cb7a3 100644
|
||||
--- a/server/timer.c
|
||||
+++ b/server/timer.c
|
||||
@@ -77,6 +77,7 @@ static const struct object_ops timer_ops =
|
||||
@@ -671,10 +671,10 @@ index 49483d9ae13..23d03aa3582 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 089f1c5c61e..d08539084bd 100644
|
||||
index 5d2fc9555a2..79beea16ab2 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -161,6 +161,7 @@ static const struct object_ops token_ops =
|
||||
@@ -162,6 +162,7 @@ static const struct object_ops token_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -683,7 +683,7 @@ index 089f1c5c61e..d08539084bd 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/winstation.c b/server/winstation.c
|
||||
index 1c7552f0687..86d82619433 100644
|
||||
index 61f9f77c73f..a38b2e831c4 100644
|
||||
--- a/server/winstation.c
|
||||
+++ b/server/winstation.c
|
||||
@@ -75,6 +75,7 @@ static const struct object_ops winstation_ops =
|
||||
@@ -703,5 +703,5 @@ index 1c7552f0687..86d82619433 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
--
|
||||
2.30.1
|
||||
2.32.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From b4010603ae2bab3a4fdc8b57efaebe47254eb168 Mon Sep 17 00:00:00 2001
|
||||
From 84c63ad840a0717541969a66124f830de282ffa8 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wendt <daniel.wendt@linux.com>
|
||||
Date: Fri, 15 Nov 2013 12:52:37 +0100
|
||||
Subject: [PATCH] gdi32: fix for rotated Arc, ArcTo, Chord and Pie drawing
|
||||
@@ -116,12 +116,12 @@ index c6f11ae6a69..e4a5f7bab8b 100644
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, points );
|
||||
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
|
||||
index 6d23e7e0ecc..e8e08d00b81 100644
|
||||
index bf7684b53a7..d75708f0d15 100644
|
||||
--- a/dlls/gdi32/gdi_private.h
|
||||
+++ b/dlls/gdi32/gdi_private.h
|
||||
@@ -208,4 +208,7 @@ extern BOOL EMFDC_StretchDIBits( DC_ATTR *dc_attr, INT x_dst, INT y_dst, INT wid
|
||||
INT height_src, const void *bits, const BITMAPINFO *info,
|
||||
UINT coloruse, DWORD rop ) DECLSPEC_HIDDEN;
|
||||
@@ -223,4 +223,7 @@ extern BOOL EMFDC_StrokeAndFillPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDC_StrokePath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDC_WidenPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
|
||||
|
||||
+BOOL xform_has_rotate_and_uniform_scale_and_shear( const XFORM *xform ) DECLSPEC_HIDDEN;
|
||||
+BOOL xform_decompose_rotation_and_translation( XFORM *xform, XFORM *rotation_and_translation ) DECLSPEC_HIDDEN;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 798934ff91c9ed7b445af4b8c7e6442fede713fb Mon Sep 17 00:00:00 2001
|
||||
From e5140396b7787d48d39f0b47876022c64fc1c2c7 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Maurer <dark.shadow4@web.de>
|
||||
Date: Fri, 10 Apr 2020 18:47:18 +0200
|
||||
Subject: [PATCH] kernelbase: Implement sortkey generation on official tables
|
||||
@@ -10,10 +10,10 @@ Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
|
||||
2 files changed, 413 insertions(+), 123 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
|
||||
index 42e14eb736f..29cfe95a47b 100644
|
||||
index c65c2cce3f2..a5d88288f27 100644
|
||||
--- a/dlls/kernel32/tests/locale.c
|
||||
+++ b/dlls/kernel32/tests/locale.c
|
||||
@@ -2692,6 +2692,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
|
||||
@@ -2697,6 +2697,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
|
||||
lstrlenW(symbols_stripped) + 1, ret);
|
||||
ok(!lstrcmpW(buf, symbols_stripped), "%s string comparison mismatch\n", func_name);
|
||||
|
||||
@@ -27,7 +27,7 @@ index 42e14eb736f..29cfe95a47b 100644
|
||||
/* test srclen = 0 */
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = func_ptr(0, upper_case, 0, buf, ARRAY_SIZE(buf));
|
||||
@@ -3114,6 +3121,135 @@ static void test_sorting(void)
|
||||
@@ -3126,6 +3133,135 @@ static void test_sorting(void)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,17 +163,17 @@ index 42e14eb736f..29cfe95a47b 100644
|
||||
static void test_FoldStringA(void)
|
||||
{
|
||||
int ret, i, j;
|
||||
@@ -7180,4 +7316,5 @@ START_TEST(locale)
|
||||
@@ -7191,4 +7327,5 @@ START_TEST(locale)
|
||||
test_NLSVersion();
|
||||
test_geo_name();
|
||||
/* this requires collation table patch to make it MS compatible */
|
||||
if (0) test_sorting();
|
||||
test_sorting();
|
||||
+ test_unicode_sorting();
|
||||
}
|
||||
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
|
||||
index 24e8cd3f338..0e40db40f72 100644
|
||||
index 89b35775053..5da87e065f1 100644
|
||||
--- a/dlls/kernelbase/locale.c
|
||||
+++ b/dlls/kernelbase/locale.c
|
||||
@@ -2161,127 +2161,6 @@ static int wcstombs_codepage( UINT codepage, DWORD flags, const WCHAR *src, int
|
||||
@@ -2164,127 +2164,6 @@ static int wcstombs_codepage( UINT codepage, DWORD flags, const WCHAR *src, int
|
||||
return wcstombs_sbcs( info, src, srclen, dst, dstlen );
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ index 24e8cd3f338..0e40db40f72 100644
|
||||
/* compose a full-width katakana. return consumed source characters. */
|
||||
static int compose_katakana( const WCHAR *src, int srclen, WCHAR *dst )
|
||||
{
|
||||
@@ -2609,6 +2488,280 @@ static int compare_weights(int flags, const WCHAR *str1, int len1,
|
||||
@@ -2612,6 +2491,280 @@ static int compare_weights(int flags, const WCHAR *str1, int len1,
|
||||
return len1 - len2;
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ index 24e8cd3f338..0e40db40f72 100644
|
||||
|
||||
static const struct geoinfo *get_geoinfo_ptr( GEOID geoid )
|
||||
{
|
||||
@@ -5292,8 +5445,8 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringEx( const WCHAR *locale, DWORD flags, co
|
||||
@@ -5303,8 +5456,8 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringEx( const WCHAR *locale, DWORD flags, co
|
||||
TRACE( "(%s,0x%08x,%s,%d,%p,%d)\n",
|
||||
debugstr_w(locale), flags, debugstr_wn(src, srclen), srclen, dst, dstlen );
|
||||
|
||||
@@ -594,5 +594,5 @@ index 24e8cd3f338..0e40db40f72 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.30.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
From adcb17116397f81a1ffec30badc6c02317033821 Mon Sep 17 00:00:00 2001
|
||||
From ef7af537a65151a43603cf10a88d91a73fe07de4 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Maurer <dark.shadow4@web.de>
|
||||
Date: Sun, 6 Dec 2020 20:57:16 +0100
|
||||
Subject: [PATCH] kernelbase: Implement CompareString functions
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/locale.c | 35 +++--
|
||||
dlls/kernel32/tests/locale.c | 33 ++--
|
||||
dlls/kernelbase/locale.c | 286 +++++++++++++++++++----------------
|
||||
2 files changed, 175 insertions(+), 146 deletions(-)
|
||||
2 files changed, 174 insertions(+), 145 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
|
||||
index 276422801cb..51c6d91c0b5 100644
|
||||
index 320e8f79387..667a950f4f1 100644
|
||||
--- a/dlls/kernel32/tests/locale.c
|
||||
+++ b/dlls/kernel32/tests/locale.c
|
||||
@@ -1960,16 +1960,16 @@ static void test_CompareStringA(void)
|
||||
@@ -33,7 +33,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
|
||||
lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT);
|
||||
|
||||
@@ -2050,9 +2050,9 @@ static void test_CompareStringW(void)
|
||||
@@ -2055,9 +2055,9 @@ static void test_CompareStringW(void)
|
||||
ok(ret == CSTR_EQUAL, "expected CSTR_EQUAL, got %d\n", ret);
|
||||
|
||||
ret = CompareStringW(CP_ACP, NORM_IGNORENONSPACE, ABC_EE, 3, A_ACUTE_BC, 4);
|
||||
@@ -45,7 +45,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
ret = CompareStringW(CP_ACP, NORM_IGNORENONSPACE, A_ACUTE_BC, 4, A_ACUTE_BC_DECOMP, 5);
|
||||
ok(ret == CSTR_EQUAL, "expected CSTR_EQUAL, got %d\n", ret);
|
||||
|
||||
@@ -2064,12 +2064,12 @@ static void test_CompareStringW(void)
|
||||
@@ -2069,12 +2069,12 @@ static void test_CompareStringW(void)
|
||||
ret = CompareStringW(CP_ACP, 0, A_NULL_BC, 4, A_ACUTE_BC, 4);
|
||||
ok(ret == CSTR_LESS_THAN, "expected CSTR_LESS_THAN, got %d\n", ret);
|
||||
ret = CompareStringW(CP_ACP, NORM_IGNORENONSPACE, A_NULL_BC, 4, A_ACUTE_BC, 4);
|
||||
@@ -60,7 +60,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
}
|
||||
|
||||
struct comparestringex_test {
|
||||
@@ -2106,7 +2106,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2111,7 +2111,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 5 */
|
||||
"tr-TR", 0,
|
||||
@@ -69,7 +69,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
},
|
||||
/* with NORM_IGNORECASE */
|
||||
{ /* 6 */
|
||||
@@ -2131,7 +2131,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2136,7 +2136,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 11 */
|
||||
"tr-TR", NORM_IGNORECASE,
|
||||
@@ -78,7 +78,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
},
|
||||
/* with NORM_LINGUISTIC_CASING */
|
||||
{ /* 12 */
|
||||
@@ -2156,7 +2156,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2161,7 +2161,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 17 */
|
||||
"tr-TR", NORM_LINGUISTIC_CASING,
|
||||
@@ -87,7 +87,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
},
|
||||
/* with LINGUISTIC_IGNORECASE */
|
||||
{ /* 18 */
|
||||
@@ -2181,7 +2181,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2186,7 +2186,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 23 */
|
||||
"tr-TR", LINGUISTIC_IGNORECASE,
|
||||
@@ -96,7 +96,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
},
|
||||
/* with NORM_LINGUISTIC_CASING | NORM_IGNORECASE */
|
||||
{ /* 24 */
|
||||
@@ -2206,7 +2206,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2211,7 +2211,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 29 */
|
||||
"tr-TR", NORM_LINGUISTIC_CASING | NORM_IGNORECASE,
|
||||
@@ -105,7 +105,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
},
|
||||
/* with NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE */
|
||||
{ /* 30 */
|
||||
@@ -2231,7 +2231,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2236,7 +2236,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 35 */
|
||||
"tr-TR", NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE,
|
||||
@@ -114,7 +114,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3385,6 +3385,9 @@ static const struct sorting_test_entry unicode_sorting_tests[] =
|
||||
@@ -3397,6 +3397,9 @@ static const struct sorting_test_entry unicode_sorting_tests[] =
|
||||
{ L"en-US", CSTR_LESS_THAN, CSTR_LESS_THAN, 0, L"\x00dc", L"\x1ee9" },
|
||||
{ L"en-US", CSTR_LESS_THAN, CSTR_LESS_THAN, 0, L"\x00fc", L"\x1ee6" },
|
||||
{ L"en-US", CSTR_GREATER_THAN, CSTR_GREATER_THAN, 0, L"\x0152", L"\x00d6" },
|
||||
@@ -124,7 +124,7 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
};
|
||||
|
||||
static void test_unicode_sorting(void)
|
||||
@@ -6126,7 +6129,7 @@ static void test_FindNLSStringEx(void)
|
||||
@@ -6138,7 +6141,7 @@ static void test_FindNLSStringEx(void)
|
||||
{ localeW, FIND_FROMSTART, comb_s_accent1W, ARRAY_SIZE(comb_s_accent1W)-1,
|
||||
comb_s_accent2W, ARRAY_SIZE(comb_s_accent2W)-1, 0, 0, 6, 1, TRUE },
|
||||
{ localeW, FIND_FROMSTART, comb_q_accent1W, ARRAY_SIZE(comb_q_accent1W)-1,
|
||||
@@ -133,19 +133,11 @@ index 276422801cb..51c6d91c0b5 100644
|
||||
{ 0 }
|
||||
};
|
||||
struct test_data *ptest;
|
||||
@@ -7490,6 +7493,6 @@ START_TEST(locale)
|
||||
test_NLSVersion();
|
||||
test_geo_name();
|
||||
/* this requires collation table patch to make it MS compatible */
|
||||
- if (0) test_sorting();
|
||||
+ test_sorting();
|
||||
test_unicode_sorting();
|
||||
}
|
||||
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
|
||||
index f651d7dc384..abcafbfa586 100644
|
||||
index 5b27dd1d36c..01bc3357cf1 100644
|
||||
--- a/dlls/kernelbase/locale.c
|
||||
+++ b/dlls/kernelbase/locale.c
|
||||
@@ -2368,126 +2368,6 @@ static int map_to_halfwidth( WCHAR c, WCHAR *dst, int dstlen )
|
||||
@@ -2371,126 +2371,6 @@ static int map_to_halfwidth( WCHAR c, WCHAR *dst, int dstlen )
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -272,7 +264,7 @@ index f651d7dc384..abcafbfa586 100644
|
||||
enum sortkey_special_script
|
||||
{
|
||||
SORTKEY_UNSORTABLE = 0,
|
||||
@@ -2525,6 +2405,7 @@ struct sortkey_data
|
||||
@@ -2528,6 +2408,7 @@ struct sortkey_data
|
||||
BYTE *buffer;
|
||||
int buffer_pos;
|
||||
int buffer_len;
|
||||
@@ -280,7 +272,7 @@ index f651d7dc384..abcafbfa586 100644
|
||||
};
|
||||
|
||||
static DWORD sortkey_get_exception(WCHAR ch, const struct sortguid *locale)
|
||||
@@ -2736,7 +2617,10 @@ static void sortkey_add_diacritic_weights(struct sortkey_data *data, int flags,
|
||||
@@ -2739,7 +2620,10 @@ static void sortkey_add_diacritic_weights(struct sortkey_data *data, int flags,
|
||||
if (old_pos >= diacritic_start_pos)
|
||||
{
|
||||
if (old_pos < data->buffer_len)
|
||||
@@ -291,7 +283,7 @@ index f651d7dc384..abcafbfa586 100644
|
||||
}
|
||||
else
|
||||
sortkey_add_diacritic_weight(data, info.weight_diacritic, last_weighted_pos);
|
||||
@@ -2945,6 +2829,7 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
@@ -2948,6 +2832,7 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
data.buffer = buffer;
|
||||
data.buffer_pos = 0;
|
||||
data.buffer_len = buffer ? buffer_len : 0;
|
||||
@@ -299,7 +291,7 @@ index f651d7dc384..abcafbfa586 100644
|
||||
|
||||
if (str_len == -1)
|
||||
str_len = wcslen(str);
|
||||
@@ -2994,6 +2879,155 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
@@ -2997,6 +2882,155 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -455,7 +447,7 @@ index f651d7dc384..abcafbfa586 100644
|
||||
static const struct geoinfo *get_geoinfo_ptr( GEOID geoid )
|
||||
{
|
||||
int min = 0, max = ARRAY_SIZE( geoinfodata )-1;
|
||||
@@ -3467,16 +3501,8 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
|
||||
@@ -3471,16 +3505,8 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
|
||||
if (len1 < 0) len1 = lstrlenW(str1);
|
||||
if (len2 < 0) len2 = lstrlenW(str2);
|
||||
|
||||
@@ -475,5 +467,5 @@ index f651d7dc384..abcafbfa586 100644
|
||||
|
||||
|
||||
--
|
||||
2.30.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 740afed65c692a9f96494465ddb72a362fa91613 Mon Sep 17 00:00:00 2001
|
||||
From b36d2db7b14e50e6bc2e74313f918737b32b60e9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 8 Sep 2020 18:43:52 +0200
|
||||
Subject: [PATCH] msxml3: Implement FreeThreadedXMLHTTP60.
|
||||
@@ -7,12 +7,12 @@ Update from Gijs Vermeulen <gijsvrm@gmail.com>
|
||||
---
|
||||
dlls/msxml3/Makefile.in | 2 +-
|
||||
dlls/msxml3/factory.c | 5 +
|
||||
dlls/msxml3/httprequest.c | 503 +++++++++++++++++++++++++++++++++++-
|
||||
dlls/msxml3/httprequest.c | 496 +++++++++++++++++++++++++++++++++++-
|
||||
dlls/msxml3/msxml_private.h | 1 +
|
||||
dlls/msxml3/tests/httpreq.c | 395 +++++++++++++++++++++++++++-
|
||||
dlls/msxml3/tests/schema.c | 6 +
|
||||
dlls/msxml3/uuid.c | 5 +
|
||||
7 files changed, 912 insertions(+), 5 deletions(-)
|
||||
7 files changed, 905 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/msxml3/Makefile.in b/dlls/msxml3/Makefile.in
|
||||
index 936c745895d..f9e629f89bc 100644
|
||||
@@ -26,7 +26,7 @@ index 936c745895d..f9e629f89bc 100644
|
||||
EXTRAINCL = $(XML2_CFLAGS) $(XSLT_CFLAGS)
|
||||
|
||||
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
|
||||
index b8452ff4b4e..90a042fec92 100644
|
||||
index 1a489b87a94..1c8e04813e5 100644
|
||||
--- a/dlls/msxml3/factory.c
|
||||
+++ b/dlls/msxml3/factory.c
|
||||
@@ -281,6 +281,7 @@ static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv
|
||||
@@ -49,28 +49,25 @@ index b8452ff4b4e..90a042fec92 100644
|
||||
IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP30 ) ||
|
||||
IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP40 ) ||
|
||||
diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
|
||||
index 7286eb97bb7..ed59a12912b 100644
|
||||
index 15a1f888ebd..a05e07b0c42 100644
|
||||
--- a/dlls/msxml3/httprequest.c
|
||||
+++ b/dlls/msxml3/httprequest.c
|
||||
@@ -44,13 +44,16 @@
|
||||
#include "docobj.h"
|
||||
@@ -38,11 +38,13 @@
|
||||
#include "shlwapi.h"
|
||||
|
||||
#include "msxml_dispex.h"
|
||||
+#include "initguid.h"
|
||||
+#include "rtworkq.h"
|
||||
+
|
||||
#include "msxml_private.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
#ifdef HAVE_LIBXML2
|
||||
#include "wine/unicode.h"
|
||||
|
||||
-WINE_DEFAULT_DEBUG_CHANNEL(msxml);
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(xmlhttp);
|
||||
|
||||
static const WCHAR colspaceW[] = {':',' ',0};
|
||||
static const WCHAR crlfW[] = {'\r','\n',0};
|
||||
@@ -2031,6 +2034,468 @@ static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl =
|
||||
@@ -2075,6 +2077,468 @@ static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl =
|
||||
ServerXMLHTTPRequest_setOption
|
||||
};
|
||||
|
||||
@@ -539,7 +536,7 @@ index 7286eb97bb7..ed59a12912b 100644
|
||||
static void init_httprequest(httprequest *req)
|
||||
{
|
||||
req->IXMLHTTPRequest_iface.lpVtbl = &XMLHTTPRequestVtbl;
|
||||
@@ -2080,6 +2545,35 @@ HRESULT XMLHTTPRequest_create(void **obj)
|
||||
@@ -2124,6 +2588,35 @@ HRESULT XMLHTTPRequest_create(void **obj)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -575,25 +572,16 @@ index 7286eb97bb7..ed59a12912b 100644
|
||||
HRESULT ServerXMLHTTP_create(void **obj)
|
||||
{
|
||||
serverhttp *req;
|
||||
@@ -2109,6 +2603,13 @@ HRESULT XMLHTTPRequest_create(void **ppObj)
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -2143,3 +2636,4 @@ HRESULT ServerXMLHTTP_create(void **obj)
|
||||
|
||||
+HRESULT XMLHTTPRequest2_create(void **ppObj)
|
||||
+{
|
||||
+ MESSAGE("This program tried to use a XMLHTTPRequest object, but\n"
|
||||
+ "libxml2 support was not present at compile time.\n");
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
return S_OK;
|
||||
}
|
||||
+
|
||||
HRESULT ServerXMLHTTP_create(void **obj)
|
||||
{
|
||||
MESSAGE("This program tried to use a ServerXMLHTTP object, but\n"
|
||||
diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h
|
||||
index a59e00bf2b3..9797f96f3ca 100644
|
||||
index d578d5de560..9fac4e5936f 100644
|
||||
--- a/dlls/msxml3/msxml_private.h
|
||||
+++ b/dlls/msxml3/msxml_private.h
|
||||
@@ -501,6 +501,7 @@ extern HRESULT XMLDocument_create(void**) DECLSPEC_HIDDEN;
|
||||
@@ -390,6 +390,7 @@ extern HRESULT XMLDocument_create(void**) DECLSPEC_HIDDEN;
|
||||
extern HRESULT SAXXMLReader_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN;
|
||||
extern HRESULT SAXAttributes_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN;
|
||||
extern HRESULT XMLHTTPRequest_create(void **) DECLSPEC_HIDDEN;
|
||||
@@ -602,7 +590,7 @@ index a59e00bf2b3..9797f96f3ca 100644
|
||||
extern HRESULT XSLTemplate_create(void**) DECLSPEC_HIDDEN;
|
||||
extern HRESULT MXWriter_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/msxml3/tests/httpreq.c b/dlls/msxml3/tests/httpreq.c
|
||||
index 4a23f1d82a8..25378a99bdc 100644
|
||||
index 2491e499638..511c2b26763 100644
|
||||
--- a/dlls/msxml3/tests/httpreq.c
|
||||
+++ b/dlls/msxml3/tests/httpreq.c
|
||||
@@ -26,9 +26,9 @@
|
||||
@@ -617,7 +605,7 @@ index 4a23f1d82a8..25378a99bdc 100644
|
||||
#include "dispex.h"
|
||||
|
||||
#include "initguid.h"
|
||||
@@ -1333,6 +1333,17 @@ static IXMLHttpRequest *create_xhr(void)
|
||||
@@ -1348,6 +1348,17 @@ static IXMLHttpRequest *create_xhr(void)
|
||||
return SUCCEEDED(hr) ? ret : NULL;
|
||||
}
|
||||
|
||||
@@ -635,7 +623,7 @@ index 4a23f1d82a8..25378a99bdc 100644
|
||||
static IServerXMLHTTPRequest *create_server_xhr(void)
|
||||
{
|
||||
IServerXMLHTTPRequest *ret;
|
||||
@@ -1889,11 +1900,388 @@ static void test_supporterrorinfo(void)
|
||||
@@ -1908,11 +1919,388 @@ static void test_supporterrorinfo(void)
|
||||
IServerXMLHTTPRequest_Release(server_xhr);
|
||||
}
|
||||
|
||||
@@ -1025,7 +1013,7 @@ index 4a23f1d82a8..25378a99bdc 100644
|
||||
|
||||
if (!(xhr = create_xhr()))
|
||||
{
|
||||
@@ -1908,6 +2296,7 @@ START_TEST(httpreq)
|
||||
@@ -1927,6 +2315,7 @@ START_TEST(httpreq)
|
||||
test_server_xhr();
|
||||
test_safe_httpreq();
|
||||
test_supporterrorinfo();
|
||||
@@ -1034,7 +1022,7 @@ index 4a23f1d82a8..25378a99bdc 100644
|
||||
CoUninitialize();
|
||||
}
|
||||
diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c
|
||||
index 964e368bf84..1b3b5cbad1b 100644
|
||||
index 219d7144ddb..7ef033237a1 100644
|
||||
--- a/dlls/msxml3/tests/schema.c
|
||||
+++ b/dlls/msxml3/tests/schema.c
|
||||
@@ -32,10 +32,16 @@
|
||||
|
@@ -1,19 +1,19 @@
|
||||
From 00b8fb5b21f01a3279c108fd15d587dc9b57c799 Mon Sep 17 00:00:00 2001
|
||||
From 30a823033f450475796b7d24a757ef3b00be46fa Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Tue, 14 Jul 2020 15:00:34 +0300
|
||||
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
|
||||
|
||||
---
|
||||
configure.ac | 1 +
|
||||
dlls/ntdll/unix/signal_x86_64.c | 117 ++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/unix/signal_x86_64.c | 122 ++++++++++++++++++++++++++++++++
|
||||
tools/winebuild/import.c | 3 +-
|
||||
3 files changed, 120 insertions(+), 1 deletion(-)
|
||||
3 files changed, 124 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ade04399af0..3dabc0d33d1 100644
|
||||
index 4b03c869d5e0..477266b8ba80 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -477,6 +477,7 @@ AC_CHECK_HEADERS(\
|
||||
@@ -487,6 +487,7 @@ AC_CHECK_HEADERS(\
|
||||
linux/joystick.h \
|
||||
linux/major.h \
|
||||
linux/param.h \
|
||||
@@ -22,7 +22,7 @@ index ade04399af0..3dabc0d33d1 100644
|
||||
linux/types.h \
|
||||
linux/ucdrom.h \
|
||||
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
|
||||
index c36699589d9..e8c3099ae14 100644
|
||||
index da548eb1a492..2fb3eab73594 100644
|
||||
--- a/dlls/ntdll/unix/signal_x86_64.c
|
||||
+++ b/dlls/ntdll/unix/signal_x86_64.c
|
||||
@@ -28,6 +28,7 @@
|
||||
@@ -33,7 +33,7 @@ index c36699589d9..e8c3099ae14 100644
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
@@ -65,6 +66,13 @@
|
||||
@@ -68,6 +69,13 @@
|
||||
# include <mach/mach.h>
|
||||
#endif
|
||||
|
||||
@@ -47,7 +47,7 @@ index c36699589d9..e8c3099ae14 100644
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
#include "ntstatus.h"
|
||||
@@ -2107,6 +2115,114 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
@@ -2426,6 +2434,118 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -123,12 +123,16 @@ index c36699589d9..e8c3099ae14 100644
|
||||
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_TRAP),
|
||||
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
|
||||
+ };
|
||||
+ struct syscall_frame *frame = amd64_thread_data()->syscall_frame;
|
||||
+ struct sock_fprog prog;
|
||||
+ NTSTATUS status;
|
||||
+
|
||||
+ sig_act->sa_sigaction = sigsys_handler;
|
||||
+ sigaction(SIGSYS, sig_act, NULL);
|
||||
+
|
||||
+ frame->syscall_flags = syscall_flags;
|
||||
+ frame->syscall_table = KeServiceDescriptorTable;
|
||||
+
|
||||
+ if ((status = syscall(0xffff)) == STATUS_INVALID_PARAMETER)
|
||||
+ {
|
||||
+ TRACE("Seccomp filters already installed.\n");
|
||||
@@ -162,7 +166,7 @@ index c36699589d9..e8c3099ae14 100644
|
||||
|
||||
/***********************************************************************
|
||||
* handle_interrupt
|
||||
@@ -2623,6 +2739,7 @@ void signal_init_process(void)
|
||||
@@ -3004,6 +3124,7 @@ void signal_init_process(void)
|
||||
if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error;
|
||||
if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error;
|
||||
if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error;
|
||||
@@ -170,19 +174,27 @@ index c36699589d9..e8c3099ae14 100644
|
||||
return;
|
||||
|
||||
error:
|
||||
@@ -3222,6 +3343,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
|
||||
"leaq 0x28(%rsp),%rsi\n\t" /* first argument */
|
||||
"movq %rcx,%rsp\n\t"
|
||||
"movq 0x00(%rcx),%rax\n\t"
|
||||
+ "subq $0xf000,%rax\n\t"
|
||||
"movq 0x18(%rcx),%rdx\n\t"
|
||||
"movl %eax,%ebx\n\t"
|
||||
"shrl $8,%ebx\n\t"
|
||||
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
|
||||
index a194ae50104..d5ef8fe2ba7 100644
|
||||
index 6a1585781431..dc04a3214749 100644
|
||||
--- a/tools/winebuild/import.c
|
||||
+++ b/tools/winebuild/import.c
|
||||
@@ -1603,6 +1603,7 @@ static void output_syscall_dispatcher(void)
|
||||
output( "\tleaq 0x28(%%rsp),%%rsi\n" ); /* first argument */
|
||||
output( "\tmovq %%rcx,%%rsp\n" );
|
||||
output( "\tmovq 0x00(%%rcx),%%rax\n" );
|
||||
+ output( "\tsubq $0xf000,%%rax\n" );
|
||||
output( "\tmovq 0x18(%%rcx),%%rdx\n" );
|
||||
output( "\tmovl %%eax,%%ebx\n" );
|
||||
output( "\tshrl $8,%%ebx\n" );
|
||||
@@ -1942,7 +1943,7 @@ void output_syscalls( DLLSPEC *spec )
|
||||
@@ -1419,7 +1419,6 @@ static int cmp_link_name( const void *e1, const void *e2 )
|
||||
return strcmp( odp1->link_name, odp2->link_name );
|
||||
}
|
||||
|
||||
-
|
||||
/* output the functions for system calls */
|
||||
void output_syscalls( DLLSPEC *spec )
|
||||
{
|
||||
@@ -1488,7 +1487,7 @@ void output_syscalls( DLLSPEC *spec )
|
||||
* validate that instruction, we can just put a jmp there instead. */
|
||||
output( "\t.byte 0x4c,0x8b,0xd1\n" ); /* movq %rcx,%r10 */
|
||||
output( "\t.byte 0xb8\n" ); /* movl $i,%eax */
|
||||
@@ -192,5 +204,5 @@ index a194ae50104..d5ef8fe2ba7 100644
|
||||
output( "\t.byte 0x75,0x03\n" ); /* jne 1f */
|
||||
output( "\t.byte 0x0f,0x05\n" ); /* syscall */
|
||||
--
|
||||
2.30.2
|
||||
2.31.1
|
||||
|
||||
|
@@ -51,13 +51,13 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "7f144646ffac6f3632d0c39b217dbd433c1154a0"
|
||||
echo "8e2df64cf8979334618a3e2672d19cb9b891fa3f"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
version()
|
||||
{
|
||||
echo "Wine Staging 6.15"
|
||||
echo "Wine Staging 6.16"
|
||||
echo "Copyright (C) 2014-2019 the Wine Staging project authors."
|
||||
echo "Copyright (C) 2018-2020 Alistair Leslie-Hughes"
|
||||
echo ""
|
||||
@@ -96,6 +96,7 @@ patch_enable_all ()
|
||||
enable_crypt32_CMS_Certificates="$1"
|
||||
enable_cryptext_CryptExtOpenCER="$1"
|
||||
enable_d3drm_IDirect3D3_support="$1"
|
||||
enable_d3dx11_43_D3DX11CreateTextureFromMemory="$1"
|
||||
enable_d3dx9_36_BumpLuminance="$1"
|
||||
enable_d3dx9_36_CloneEffect="$1"
|
||||
enable_d3dx9_36_D3DXDisassembleShader="$1"
|
||||
@@ -115,7 +116,6 @@ patch_enable_all ()
|
||||
enable_dinput_joy_mappings="$1"
|
||||
enable_dinput_reconnect_joystick="$1"
|
||||
enable_dinput_remap_joystick="$1"
|
||||
enable_dpnet_Server_EnumServiceProviders="$1"
|
||||
enable_dsound_EAX="$1"
|
||||
enable_dsound_Fast_Mixer="$1"
|
||||
enable_dwrite_FontFallback="$1"
|
||||
@@ -328,6 +328,9 @@ patch_enable ()
|
||||
d3drm-IDirect3D3-support)
|
||||
enable_d3drm_IDirect3D3_support="$2"
|
||||
;;
|
||||
d3dx11_43-D3DX11CreateTextureFromMemory)
|
||||
enable_d3dx11_43_D3DX11CreateTextureFromMemory="$2"
|
||||
;;
|
||||
d3dx9_36-BumpLuminance)
|
||||
enable_d3dx9_36_BumpLuminance="$2"
|
||||
;;
|
||||
@@ -385,9 +388,6 @@ patch_enable ()
|
||||
dinput-remap-joystick)
|
||||
enable_dinput_remap_joystick="$2"
|
||||
;;
|
||||
dpnet-Server-EnumServiceProviders)
|
||||
enable_dpnet_Server_EnumServiceProviders="$2"
|
||||
;;
|
||||
dsound-EAX)
|
||||
enable_dsound_EAX="$2"
|
||||
;;
|
||||
@@ -1600,6 +1600,20 @@ if test "$enable_d3drm_IDirect3D3_support" -eq 1; then
|
||||
patch_apply d3drm-IDirect3D3-support/0001-d3drm-Support-IDirect3D3-when-creating-device.patch
|
||||
fi
|
||||
|
||||
# Patchset d3dx11_43-D3DX11CreateTextureFromMemory
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#50210] - Implement D3DX11GetImageInfoFromMemory
|
||||
# | * [#45533] - Implement D3DX11CreateTextureFromMemory
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3dx11_42/Makefile.in, dlls/d3dx11_43/Makefile.in, dlls/d3dx11_43/main.c, dlls/d3dx11_43/texture.c
|
||||
# |
|
||||
if test "$enable_d3dx11_43_D3DX11CreateTextureFromMemory" -eq 1; then
|
||||
patch_apply d3dx11_43-D3DX11CreateTextureFromMemory/0001-d3dx11_43-Implement-D3DX11GetImageInfoFromMemory.patch
|
||||
patch_apply d3dx11_43-D3DX11CreateTextureFromMemory/0002-d3dx11_42-Implement-D3DX11CreateTextureFromMemory.patch
|
||||
fi
|
||||
|
||||
# Patchset d3dx9_36-BumpLuminance
|
||||
# |
|
||||
# | Modified files:
|
||||
@@ -1851,18 +1865,6 @@ if test "$enable_dinput_remap_joystick" -eq 1; then
|
||||
patch_apply dinput-remap-joystick/0001-dinput-Allow-remapping-of-joystick-buttons.patch
|
||||
fi
|
||||
|
||||
# Patchset dpnet-Server-EnumServiceProviders
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#51221] dpnet: Impelment IDirectPlay8Server EnumServiceProviders.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/dpnet/server.c, dlls/dpnet/tests/server.c
|
||||
# |
|
||||
if test "$enable_dpnet_Server_EnumServiceProviders" -eq 1; then
|
||||
patch_apply dpnet-Server-EnumServiceProviders/0001-dpnet-Implement-IDirectPlay8Server-EnumServicePro.patch
|
||||
fi
|
||||
|
||||
# Patchset dsound-Fast_Mixer
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From eac7d559f3a0dd0ab5b05a1ff461c619e6faa2d5 Mon Sep 17 00:00:00 2001
|
||||
From b08427ea0575faf213100269bf5bc931ec05930b Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 21 May 2021 21:52:06 -0500
|
||||
Subject: [PATCH] ntdll: Always start the initial process through start.exe.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/ntdll/unix/env.c | 21 +++------------------
|
||||
1 file changed, 3 insertions(+), 18 deletions(-)
|
||||
dlls/ntdll/unix/env.c | 19 +++----------------
|
||||
1 file changed, 3 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c
|
||||
index 837725dd0d1..ed844e26593 100644
|
||||
index ae1afb2797b..02af2c5ca5a 100644
|
||||
--- a/dlls/ntdll/unix/env.c
|
||||
+++ b/dlls/ntdll/unix/env.c
|
||||
@@ -2039,6 +2039,7 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module )
|
||||
@@ -2116,6 +2116,7 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module )
|
||||
*/
|
||||
static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
|
||||
{
|
||||
@@ -20,7 +20,7 @@ index 837725dd0d1..ed844e26593 100644
|
||||
static const WCHAR valueW[] = {'1',0};
|
||||
static const WCHAR pathW[] = {'P','A','T','H'};
|
||||
RTL_USER_PROCESS_PARAMETERS *params = NULL;
|
||||
@@ -2067,24 +2068,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
|
||||
@@ -2144,22 +2145,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
|
||||
add_registry_environment( &env, &env_pos, &env_size );
|
||||
env[env_pos++] = 0;
|
||||
|
||||
@@ -28,8 +28,6 @@ index 837725dd0d1..ed844e26593 100644
|
||||
- if (!status)
|
||||
- {
|
||||
- if (main_image_info.ImageCharacteristics & IMAGE_FILE_DLL) status = STATUS_INVALID_IMAGE_FORMAT;
|
||||
- if (main_image_info.ImageFlags & IMAGE_FLAGS_ComPlusNativeReady)
|
||||
- main_image_info.Machine = native_machine;
|
||||
- if (main_image_info.Machine != current_machine) status = STATUS_INVALID_IMAGE_FORMAT;
|
||||
- }
|
||||
-
|
||||
@@ -48,5 +46,5 @@ index 837725dd0d1..ed844e26593 100644
|
||||
main_wargv = build_wargv( get_dos_path( image ));
|
||||
cmdline = build_command_line( main_wargv );
|
||||
--
|
||||
2.30.2
|
||||
2.32.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 6439bc264e8d7673ebf783303927bb7a4af54506 Mon Sep 17 00:00:00 2001
|
||||
From 20e95575948faec1eca2e88967e985539a512cd5 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 18 Apr 2021 17:46:44 -0500
|
||||
Subject: [PATCH] ntdll: Elevate processes if requested in
|
||||
@@ -6,11 +6,11 @@ Subject: [PATCH] ntdll: Elevate processes if requested in
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/ntdll/process.c | 69 ++++++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 64 insertions(+), 5 deletions(-)
|
||||
dlls/ntdll/process.c | 79 +++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 74 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
|
||||
index 3ed31e22100..86c45d6dfff 100644
|
||||
index 160b1f549c9..fd437ea07d4 100644
|
||||
--- a/dlls/ntdll/process.c
|
||||
+++ b/dlls/ntdll/process.c
|
||||
@@ -39,6 +39,9 @@
|
||||
@@ -23,23 +23,31 @@ index 3ed31e22100..86c45d6dfff 100644
|
||||
/******************************************************************************
|
||||
* RtlGetCurrentPeb [NTDLL.@]
|
||||
*
|
||||
@@ -49,6 +52,55 @@ PEB * WINAPI RtlGetCurrentPeb(void)
|
||||
@@ -82,6 +85,63 @@ NTSTATUS WINAPI RtlWow64EnableFsRedirectionEx( ULONG disable, ULONG *old_value )
|
||||
}
|
||||
|
||||
|
||||
+static BOOL image_needs_elevation( const WCHAR *path )
|
||||
+static BOOL image_needs_elevation( const UNICODE_STRING *path )
|
||||
+{
|
||||
+ ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION run_level;
|
||||
+ UNICODE_STRING path0;
|
||||
+ BOOL ret = FALSE;
|
||||
+ HANDLE handle;
|
||||
+ ACTCTXW ctx;
|
||||
+
|
||||
+ if (RtlDuplicateUnicodeString( 1, path, &path0 ))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ ctx.cbSize = sizeof(ctx);
|
||||
+ ctx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID;
|
||||
+ ctx.lpSource = path;
|
||||
+ ctx.lpSource = path0.Buffer;
|
||||
+ ctx.lpResourceName = (const WCHAR *)CREATEPROCESS_MANIFEST_RESOURCE_ID;
|
||||
+
|
||||
+ if (RtlCreateActivationContext( &handle, &ctx )) return FALSE;
|
||||
+ if (RtlCreateActivationContext( &handle, &ctx ))
|
||||
+ {
|
||||
+ RtlFreeUnicodeString( &path0 );
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ if (!RtlQueryInformationActivationContext( 0, handle, NULL, RunlevelInformationInActivationContext,
|
||||
+ &run_level, sizeof(run_level), NULL ))
|
||||
@@ -50,7 +58,7 @@ index 3ed31e22100..86c45d6dfff 100644
|
||||
+ ret = TRUE;
|
||||
+ }
|
||||
+ RtlReleaseActivationContext( handle );
|
||||
+
|
||||
+ RtlFreeUnicodeString( &path0 );
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
@@ -79,7 +87,7 @@ index 3ed31e22100..86c45d6dfff 100644
|
||||
/**********************************************************************
|
||||
* RtlWow64GetCurrentMachine (NTDLL.@)
|
||||
*/
|
||||
@@ -176,8 +228,13 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
|
||||
@@ -294,8 +354,15 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
|
||||
PS_CREATE_INFO create_info;
|
||||
ULONG_PTR buffer[offsetof( PS_ATTRIBUTE_LIST, Attributes[6] ) / sizeof(ULONG_PTR)];
|
||||
PS_ATTRIBUTE_LIST *attr = (PS_ATTRIBUTE_LIST *)buffer;
|
||||
@@ -87,13 +95,15 @@ index 3ed31e22100..86c45d6dfff 100644
|
||||
+ NTSTATUS status;
|
||||
UINT pos = 0;
|
||||
|
||||
+ if (!token && image_needs_elevation( params->ImagePathName.Buffer ))
|
||||
+ /* It's not clear whether we should use path or ¶ms->ImagePathName here,
|
||||
+ * but Roblox Player tries to pass an empty string for the latter. */
|
||||
+ if (!token && image_needs_elevation( path ))
|
||||
+ token = elevated_token = get_elevated_token();
|
||||
+
|
||||
RtlNormalizeProcessParams( params );
|
||||
|
||||
attr->Attributes[pos].Attribute = PS_ATTRIBUTE_IMAGE_NAME;
|
||||
@@ -224,11 +281,13 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
|
||||
@@ -342,11 +409,13 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
|
||||
InitializeObjectAttributes( &process_attr, NULL, 0, NULL, process_descr );
|
||||
InitializeObjectAttributes( &thread_attr, NULL, 0, NULL, thread_descr );
|
||||
|
||||
@@ -113,5 +123,5 @@ index 3ed31e22100..86c45d6dfff 100644
|
||||
|
||||
/***********************************************************************
|
||||
--
|
||||
2.30.2
|
||||
2.32.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 1c662a1bdeec10a46e88c5f83aaa3f3e8ea4bf12 Mon Sep 17 00:00:00 2001
|
||||
From 82a42af095d379ed04ed3f0b369a156c87981d48 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Mar 2016 04:53:00 +0100
|
||||
Subject: [PATCH] setupapi: ImplementSetupAddSectionToDiskSpaceList.
|
||||
@@ -12,7 +12,7 @@ Subject: [PATCH] setupapi: ImplementSetupAddSectionToDiskSpaceList.
|
||||
5 files changed, 328 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c
|
||||
index 01b08c1408..8dbd0f0cc3 100644
|
||||
index 01b08c1408e..8dbd0f0cc3d 100644
|
||||
--- a/dlls/setupapi/diskspace.c
|
||||
+++ b/dlls/setupapi/diskspace.c
|
||||
@@ -20,6 +20,7 @@
|
||||
@@ -168,10 +168,10 @@ index 01b08c1408..8dbd0f0cc3 100644
|
||||
BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace,
|
||||
HINF InfHandle, HINF LayoutInfHandle,
|
||||
diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c
|
||||
index aa59adf967..c0ca7bb76a 100644
|
||||
index dc718cc66fc..ad626f113f1 100644
|
||||
--- a/dlls/setupapi/queue.c
|
||||
+++ b/dlls/setupapi/queue.c
|
||||
@@ -331,7 +331,7 @@ static void get_source_info( HINF hinf, const WCHAR *src_file, SP_FILE_COPY_PARA
|
||||
@@ -338,7 +338,7 @@ static void get_source_info( HINF hinf, const WCHAR *src_file, SP_FILE_COPY_PARA
|
||||
*
|
||||
* Retrieve the destination dir for a given section.
|
||||
*/
|
||||
@@ -181,7 +181,7 @@ index aa59adf967..c0ca7bb76a 100644
|
||||
INFCONTEXT context;
|
||||
WCHAR systemdir[MAX_PATH], *dir;
|
||||
diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec
|
||||
index 33ccc48097..e8468bdeb0 100644
|
||||
index 1b3f5cc6bd8..b2c42fe6e20 100644
|
||||
--- a/dlls/setupapi/setupapi.spec
|
||||
+++ b/dlls/setupapi/setupapi.spec
|
||||
@@ -246,8 +246,8 @@
|
||||
@@ -196,20 +196,20 @@ index 33ccc48097..e8468bdeb0 100644
|
||||
@ stdcall SetupAddToDiskSpaceListW(long wstr int64 long ptr long)
|
||||
@ stdcall SetupAddToSourceListA(long str)
|
||||
diff --git a/dlls/setupapi/setupapi_private.h b/dlls/setupapi/setupapi_private.h
|
||||
index f4685ab2b4..4df062349c 100644
|
||||
index 7681348a11c..edc833f5768 100644
|
||||
--- a/dlls/setupapi/setupapi_private.h
|
||||
+++ b/dlls/setupapi/setupapi_private.h
|
||||
@@ -92,6 +92,8 @@ extern const WCHAR *DIRID_get_string( int dirid ) DECLSPEC_HIDDEN;
|
||||
@@ -94,6 +94,8 @@ extern const WCHAR *DIRID_get_string( int dirid ) DECLSPEC_HIDDEN;
|
||||
extern const WCHAR *PARSER_get_inf_filename( HINF hinf ) DECLSPEC_HIDDEN;
|
||||
extern WCHAR *PARSER_get_dest_dir( INFCONTEXT *context ) DECLSPEC_HIDDEN;
|
||||
|
||||
+extern WCHAR *get_destination_dir( HINF hinf, const WCHAR *section );
|
||||
+
|
||||
/* support for Ascii queue callback functions */
|
||||
/* support for ANSI queue callback functions */
|
||||
|
||||
struct callback_WtoA_context
|
||||
diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c
|
||||
index 4ba9fea9e0..7b8bcf4a34 100644
|
||||
index 4ba9fea9e0a..7b8bcf4a342 100644
|
||||
--- a/dlls/setupapi/tests/diskspace.c
|
||||
+++ b/dlls/setupapi/tests/diskspace.c
|
||||
@@ -30,6 +30,8 @@
|
||||
@@ -432,5 +432,5 @@ index 4ba9fea9e0..7b8bcf4a34 100644
|
||||
+ test_SetupAddSectionToDiskSpaceListA();
|
||||
}
|
||||
--
|
||||
2.24.1
|
||||
2.32.0
|
||||
|
||||
|
@@ -1,133 +0,0 @@
|
||||
From e82ff01a82ef869fd97f19f5827f61eaaab7fb06 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 20 Nov 2014 13:27:24 +0100
|
||||
Subject: [PATCH] ws2_32: Implement returning the proper time with
|
||||
SO_CONNECT_TIME.
|
||||
|
||||
Based on a patch by Erich Hoover.
|
||||
|
||||
To avoid calculations on the client-side, the server sends the connect time as relative (negative) value.
|
||||
Needs tools/make_requests.
|
||||
---
|
||||
dlls/ws2_32/socket.c | 21 ++++++++++++++++-----
|
||||
dlls/ws2_32/tests/sock.c | 20 ++++++++++++++++++++
|
||||
server/protocol.def | 1 +
|
||||
server/sock.c | 1 +
|
||||
4 files changed, 38 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
|
||||
index 79085cf0c2a..2d35f4c9448 100644
|
||||
--- a/dlls/ws2_32/socket.c
|
||||
+++ b/dlls/ws2_32/socket.c
|
||||
@@ -798,6 +798,21 @@ static inline void release_sock_fd( SOCKET s, int fd )
|
||||
close( fd );
|
||||
}
|
||||
|
||||
+static DWORD _get_connect_time(SOCKET s)
|
||||
+{
|
||||
+ NTSTATUS status;
|
||||
+ DWORD connect_time = ~0u;
|
||||
+ SERVER_START_REQ( get_socket_info )
|
||||
+ {
|
||||
+ req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
||||
+ status = wine_server_call( req );
|
||||
+ if (!status)
|
||||
+ connect_time = reply->connect_time / -10000000;
|
||||
+ }
|
||||
+ SERVER_END_REQ;
|
||||
+ return connect_time;
|
||||
+}
|
||||
+
|
||||
static void _get_sock_errors(SOCKET s, int *events)
|
||||
{
|
||||
SERVER_START_REQ( get_socket_event )
|
||||
@@ -2626,7 +2641,6 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
|
||||
|
||||
case WS_SO_CONNECT_TIME:
|
||||
{
|
||||
- static int pretendtime = 0;
|
||||
struct WS_sockaddr addr;
|
||||
int len = sizeof(addr);
|
||||
|
||||
@@ -2638,10 +2652,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
|
||||
if (WS_getpeername(s, &addr, &len) == SOCKET_ERROR)
|
||||
*(DWORD *)optval = ~0u;
|
||||
else
|
||||
- {
|
||||
- if (!pretendtime) FIXME("WS_SO_CONNECT_TIME - faking results\n");
|
||||
- *(DWORD *)optval = pretendtime++;
|
||||
- }
|
||||
+ *(DWORD *)optval = _get_connect_time(s);
|
||||
*optlen = sizeof(DWORD);
|
||||
return ret;
|
||||
}
|
||||
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
|
||||
index c0b1abcaaa5..b94da0809b8 100644
|
||||
--- a/dlls/ws2_32/tests/sock.c
|
||||
+++ b/dlls/ws2_32/tests/sock.c
|
||||
@@ -4333,11 +4333,15 @@ static void test_send(void)
|
||||
OVERLAPPED ov;
|
||||
BOOL bret;
|
||||
DWORD id, bytes_sent, dwRet;
|
||||
+ DWORD expected_time, connect_time;
|
||||
+ socklen_t optlen;
|
||||
|
||||
memset(&ov, 0, sizeof(ov));
|
||||
|
||||
tcp_socketpair(&src, &dst);
|
||||
|
||||
+ expected_time = GetTickCount();
|
||||
+
|
||||
set_blocking(dst, FALSE);
|
||||
/* force disable buffering so we can get a pending overlapped request */
|
||||
ret = setsockopt(dst, SOL_SOCKET, SO_SNDBUF, (char *) &zero, sizeof(zero));
|
||||
@@ -4410,6 +4414,22 @@ static void test_send(void)
|
||||
ok(ret == SOCKET_ERROR && WSAGetLastError() == ERROR_IO_PENDING,
|
||||
"Failed to start overlapped send %d - %d\n", ret, WSAGetLastError());
|
||||
|
||||
+ expected_time = (GetTickCount() - expected_time) / 1000;
|
||||
+
|
||||
+ connect_time = 0xdeadbeef;
|
||||
+ optlen = sizeof(connect_time);
|
||||
+ ret = getsockopt(dst, SOL_SOCKET, SO_CONNECT_TIME, (char *)&connect_time, &optlen);
|
||||
+ ok(!ret, "getsockopt failed %d\n", WSAGetLastError());
|
||||
+ ok(connect_time >= expected_time && connect_time <= expected_time + 1,
|
||||
+ "unexpected connect time %u, expected %u\n", connect_time, expected_time);
|
||||
+
|
||||
+ connect_time = 0xdeadbeef;
|
||||
+ optlen = sizeof(connect_time);
|
||||
+ ret = getsockopt(src, SOL_SOCKET, SO_CONNECT_TIME, (char *)&connect_time, &optlen);
|
||||
+ ok(!ret, "getsockopt failed %d\n", WSAGetLastError());
|
||||
+ ok(connect_time >= expected_time && connect_time <= expected_time + 1,
|
||||
+ "unexpected connect time %u, expected %u\n", connect_time, expected_time);
|
||||
+
|
||||
end:
|
||||
if (src != INVALID_SOCKET)
|
||||
closesocket(src);
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 98d30ffc4be..e83e78006dd 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -1455,6 +1455,7 @@ enum server_fd_type
|
||||
int family; /* family, see socket manpage */
|
||||
int type; /* type, see socket manpage */
|
||||
int protocol; /* protocol, see socket manpage */
|
||||
+ timeout_t connect_time; /* time the socket was connected (relative) */
|
||||
@END
|
||||
|
||||
|
||||
diff --git a/server/sock.c b/server/sock.c
|
||||
index cf0ba068674..a828af2ec7d 100644
|
||||
--- a/server/sock.c
|
||||
+++ b/server/sock.c
|
||||
@@ -2411,6 +2411,7 @@ DECL_HANDLER(get_socket_info)
|
||||
reply->family = sock->family;
|
||||
reply->type = sock->type;
|
||||
reply->protocol = sock->proto;
|
||||
+ reply->connect_time = -(current_time - sock->connect_time);
|
||||
|
||||
release_object( &sock->obj );
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Fixes: SO_CONNECT_TIME returns the appropriate time
|
||||
Disabled: True
|
@@ -1 +1 @@
|
||||
Wine Staging 6.15
|
||||
Wine Staging 6.16
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user