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
94 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d935a41e61 | ||
|
31acabe792 | ||
|
1a2b47b084 | ||
|
2e9f238732 | ||
|
cf32a7092b | ||
|
4303e3ee3b | ||
|
49ed7ae4a0 | ||
|
eff142bc57 | ||
|
bd2608b12c | ||
|
acb054627a | ||
|
f07f287395 | ||
|
8703ad8375 | ||
|
1f500db5b7 | ||
|
1deec9df95 | ||
|
a8e296715c | ||
|
43d5c1e0f5 | ||
|
41a3c56c50 | ||
|
5be23b8ae8 | ||
|
769ddd9f00 | ||
|
aabde22767 | ||
|
ca3220cbd6 | ||
|
ff6cef5d72 | ||
|
d2b7b686f1 | ||
|
c5c29f9395 | ||
|
08ad410761 | ||
|
e6f9a449cd | ||
|
0ea57a0262 | ||
|
4f75966580 | ||
|
9f9285256f | ||
|
21009111bd | ||
|
fe476e7241 | ||
|
29e810ed54 | ||
|
1dc3666fd0 | ||
|
78837ecadc | ||
|
626e3d77cd | ||
|
5013933ea5 | ||
|
c10d599428 | ||
|
1d75f6950a | ||
|
ffaf883b19 | ||
|
19c062dbc7 | ||
|
1ed196f0ef | ||
|
533337e25e | ||
|
7e2f1d392c | ||
|
129ce257fd | ||
|
a27ba94091 | ||
|
d490a981e1 | ||
|
092bc29352 | ||
|
2ee26de43f | ||
|
6d46b1e13f | ||
|
64d7f6c5f3 | ||
|
99fc74eb6c | ||
|
73351fd593 | ||
|
34b3ffed35 | ||
|
d6a9c88bf3 | ||
|
c61fed05c0 | ||
|
55c3361918 | ||
|
4ecbce03f5 | ||
|
b4004c7c84 | ||
|
6f59ab8034 | ||
|
4966b421fc | ||
|
57a12e6845 | ||
|
aa2eb6eed6 | ||
|
4ae0f97bc7 | ||
|
b31a964e1e | ||
|
fa8d0abc9d | ||
|
2c5c068424 | ||
|
e893644049 | ||
|
afbc5756c9 | ||
|
552b03f70a | ||
|
1f218b6822 | ||
|
d9e4a75d19 | ||
|
0106909ec5 | ||
|
ec592e937b | ||
|
4bc5bffe2f | ||
|
f2648a9a40 | ||
|
1d21e2b6f5 | ||
|
fcaab59ec5 | ||
|
8708356647 | ||
|
d3ed71430a | ||
|
fb2b3b3c69 | ||
|
9fd1bb66d3 | ||
|
86091d3b1f | ||
|
ab31919ee5 | ||
|
6638f9ee79 | ||
|
92ce758ac8 | ||
|
0de9d1028b | ||
|
7a2920aa2a | ||
|
cd8ca4d7d6 | ||
|
7cecf22dcc | ||
|
eb479ea60c | ||
|
a500c9ce42 | ||
|
35d13b744e | ||
|
f7d87c5bfb | ||
|
0acaed0ae5 |
57
.github/workflows/macOS.yml
vendored
57
.github/workflows/macOS.yml
vendored
@@ -64,60 +64,3 @@ jobs:
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
make -j$(sysctl -n hw.ncpu 2>/dev/null)
|
||||
|
||||
wine-devel:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install --cask xquartz
|
||||
brew install bison \
|
||||
gphoto2 \
|
||||
gst-plugins-base \
|
||||
mingw-w64 \
|
||||
molten-vk \
|
||||
mpg123
|
||||
|
||||
- name: Add bison & krb5 to $PATH
|
||||
run: |
|
||||
set -eu
|
||||
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
|
||||
echo "$(brew --prefix krb5)/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Get upstream-commit
|
||||
run: |
|
||||
mkdir $GITHUB_WORKSPACE/wine
|
||||
cd wine
|
||||
git init
|
||||
git fetch git://source.winehq.org/git/wine.git $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit) --depth=1
|
||||
git checkout $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit)
|
||||
|
||||
- name: Configure wine64
|
||||
env:
|
||||
LDFLAGS: "-Wl,-rpath,/opt/X11/lib"
|
||||
# Avoid weird linker errors with Xcode 10 and later
|
||||
MACOSX_DEPLOYMENT_TARGET: "10.14"
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
./configure --enable-win64 \
|
||||
--without-alsa \
|
||||
--without-capi \
|
||||
--without-dbus \
|
||||
--without-inotify \
|
||||
--without-oss \
|
||||
--without-pulse \
|
||||
--without-udev \
|
||||
--without-v4l2 \
|
||||
--x-include=/opt/X11/include \
|
||||
--x-lib=/opt/X11/lib
|
||||
|
||||
- name: Build wine64
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/wine
|
||||
make -j$(sysctl -n hw.ncpu 2>/dev/null)
|
||||
|
@@ -94,17 +94,17 @@ proper implementation. In the event that this happens, we add the patches to
|
||||
wine-staging instead, and keep them updated and maintained as well as attempt to
|
||||
clean them up to be upstreamed. We also both write and verify patches which fix
|
||||
various bugs that may not have patches, and in turn allow them run better using
|
||||
WINE. This includes testing on various hardware, games, and applications.
|
||||
WINE. This includes testing on various hardware, games and applications.
|
||||
|
||||
Any expenses for applications, games, or hardware which we do not own comes out
|
||||
of pocket. In order to alleviate these expenses, we are now accepting donations.
|
||||
This in turn allows us to continue to perform testing, provide fixes, and get
|
||||
them upstreamed, ultimately aiming to provide a better experience for all WINE
|
||||
users. All of our work is provided publicly for free and can be found at
|
||||
<https://github.com/wine-staging/wine-staging>. We do not expect to be paid for
|
||||
<https://gitlab.winehq.org/wine/wine-staging>. We do not expect to be paid for
|
||||
any of the work provided, nor will donators receive any special benefits or
|
||||
compensation.
|
||||
|
||||
Donations are recieved through Patreon. Anyone interested may donate here:
|
||||
|
||||
https://www.patreon.com/winestaging
|
||||
https://www.patreon.com/winestaging
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 12a9a9cb506aede4748611c8fa3339afcee7c070 Mon Sep 17 00:00:00 2001
|
||||
From eddc40dbf4048ceea1fda7f842adad340865723b Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 5 Jul 2019 13:20:23 +0800
|
||||
Subject: [PATCH] cryptext: Implement CryptExtOpenCER.
|
||||
@@ -17,29 +17,29 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
create mode 100644 dlls/cryptext/tests/cryptext.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 20bcb96a2a6..b8fd60dbb53 100755
|
||||
index 6425e4da5f8..c97671cdfc6 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -20910,6 +20910,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
@@ -21346,6 +21346,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg
|
||||
wine_fn_config_makefile dlls/cryptdll enable_cryptdll
|
||||
wine_fn_config_makefile dlls/cryptext enable_cryptext
|
||||
+wine_fn_config_makefile dlls/cryptext/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptnet enable_cryptnet
|
||||
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptsp enable_cryptsp
|
||||
wine_fn_config_makefile dlls/cryptowinrt enable_cryptowinrt
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6cbd947bf31..c68c5975e63 100644
|
||||
index b5a3b0069fb..73b1b1c8c2b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2361,6 +2361,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
@@ -2450,6 +2450,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptext)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/cryptext/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptsp)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptowinrt)
|
||||
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
|
||||
index 0ec2b8a2045..76accca43eb 100644
|
||||
--- a/dlls/cryptext/Makefile.in
|
||||
@@ -67,7 +67,7 @@ index ee3e155f457..24b4794c198 100644
|
||||
@ stub CryptExtOpenCRLW
|
||||
@ stub CryptExtOpenCTL
|
||||
diff --git a/dlls/cryptext/cryptext_main.c b/dlls/cryptext/cryptext_main.c
|
||||
index 537ba66cd3b..f9e34d1f8c5 100644
|
||||
index 537ba66cd3b..a4314518eac 100644
|
||||
--- a/dlls/cryptext/cryptext_main.c
|
||||
+++ b/dlls/cryptext/cryptext_main.c
|
||||
@@ -22,10 +22,29 @@
|
||||
@@ -161,7 +161,7 @@ index 00000000000..522fc60a4af
|
||||
+ cryptext.c
|
||||
diff --git a/dlls/cryptext/tests/cryptext.c b/dlls/cryptext/tests/cryptext.c
|
||||
new file mode 100644
|
||||
index 00000000000..cc62a772b59
|
||||
index 00000000000..ab1007dbd82
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/cryptext.c
|
||||
@@ -0,0 +1,61 @@
|
||||
@@ -227,5 +227,5 @@ index 00000000000..cc62a772b59
|
||||
+ test_CryptExtOpenCER();
|
||||
+}
|
||||
--
|
||||
2.34.1
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,116 +0,0 @@
|
||||
From 861cd6c6409efce4eb03aad3bc01f5df772e77fb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 6 Feb 2016 01:15:07 +0100
|
||||
Subject: [PATCH] ddraw: Don't set HWTRANSFORMANDLIGHT flag on d3d7 RGB device.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 9 +++++++++
|
||||
dlls/ddraw/tests/ddraw7.c | 18 ++++++++++++++++++
|
||||
2 files changed, 27 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 705d0335d95..1d916f93c4f 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -49,6 +49,7 @@ static struct enum_device_entry
|
||||
char interface_name[100];
|
||||
char device_name[100];
|
||||
const GUID *device_guid;
|
||||
+ DWORD remove_caps;
|
||||
} device_list7[] =
|
||||
{
|
||||
/* T&L HAL device */
|
||||
@@ -56,6 +57,7 @@ static struct enum_device_entry
|
||||
"WINE Direct3D7 Hardware Transform and Lighting acceleration using WineD3D",
|
||||
"Wine D3D7 T&L HAL",
|
||||
&IID_IDirect3DTnLHalDevice,
|
||||
+ 0,
|
||||
},
|
||||
|
||||
/* HAL device */
|
||||
@@ -63,6 +65,7 @@ static struct enum_device_entry
|
||||
"WINE Direct3D7 Hardware acceleration using WineD3D",
|
||||
"Direct3D HAL",
|
||||
&IID_IDirect3DHALDevice,
|
||||
+ 0,
|
||||
},
|
||||
|
||||
/* RGB device */
|
||||
@@ -70,6 +73,7 @@ static struct enum_device_entry
|
||||
"WINE Direct3D7 RGB Software Emulation using WineD3D",
|
||||
"Wine D3D7 RGB",
|
||||
&IID_IDirect3DRGBDevice,
|
||||
+ D3DDEVCAPS_HWTRANSFORMANDLIGHT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3749,6 +3753,7 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
{
|
||||
struct ddraw *ddraw = impl_from_IDirect3D7(iface);
|
||||
D3DDEVICEDESC7 device_desc7;
|
||||
+ DWORD dev_caps;
|
||||
HRESULT hr;
|
||||
size_t i;
|
||||
|
||||
@@ -3765,11 +3770,15 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
return hr;
|
||||
}
|
||||
|
||||
+ dev_caps = device_desc7.dwDevCaps;
|
||||
+
|
||||
for (i = 0; i < ARRAY_SIZE(device_list7); i++)
|
||||
{
|
||||
HRESULT ret;
|
||||
|
||||
device_desc7.deviceGUID = *device_list7[i].device_guid;
|
||||
+ device_desc7.dwDevCaps = dev_caps & ~device_list7[i].remove_caps;
|
||||
+
|
||||
ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
|
||||
if (ret != DDENUMRET_OK)
|
||||
{
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index d641595baa2..54cc18b74f2 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -577,6 +577,19 @@ static IDirect3DDevice7 *create_device_ex(HWND window, DWORD coop_level, const G
|
||||
return device;
|
||||
}
|
||||
|
||||
+static HRESULT WINAPI enum_devtype_software_cb(char *desc_str, char *name, D3DDEVICEDESC7 *desc, void *ctx)
|
||||
+{
|
||||
+ BOOL *software_ok = ctx;
|
||||
+ if (IsEqualGUID(&desc->deviceGUID, &IID_IDirect3DRGBDevice))
|
||||
+ {
|
||||
+ ok(!(desc->dwDevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT),
|
||||
+ "RGB emulation device shouldn't have HWTRANSFORMANDLIGHT flag\n");
|
||||
+ *software_ok = TRUE;
|
||||
+ return DDENUMRET_CANCEL;
|
||||
+ }
|
||||
+ return DDENUMRET_OK;
|
||||
+}
|
||||
+
|
||||
static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
|
||||
{
|
||||
const GUID *device_guid = &IID_IDirect3DHALDevice;
|
||||
@@ -6719,6 +6732,7 @@ static void test_surface_lock(void)
|
||||
ULONG refcount;
|
||||
DDPIXELFORMAT z_fmt;
|
||||
BOOL hal_ok = FALSE;
|
||||
+ BOOL software_ok = FALSE;
|
||||
const GUID *devtype = &IID_IDirect3DHALDevice;
|
||||
D3DDEVICEDESC7 device_desc;
|
||||
BOOL cubemap_supported;
|
||||
@@ -6844,6 +6858,10 @@ static void test_surface_lock(void)
|
||||
if (hal_ok)
|
||||
devtype = &IID_IDirect3DTnLHalDevice;
|
||||
|
||||
+ hr = IDirect3D7_EnumDevices(d3d, enum_devtype_software_cb, &software_ok);
|
||||
+ ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr);
|
||||
+ if (!software_ok) win_skip("RGB device not found, unable to check flags\n");
|
||||
+
|
||||
memset(&z_fmt, 0, sizeof(z_fmt));
|
||||
hr = IDirect3D7_EnumZBufferFormats(d3d, devtype, enum_z_fmt, &z_fmt);
|
||||
if (FAILED(hr) || !z_fmt.dwSize)
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From 4498bb259a9ab5e5bf6f8a55dc96b6ac24c82e09 Mon Sep 17 00:00:00 2001
|
||||
From 9028351204472aafe5d7731c8737a6cfdb09e659 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 30 May 2015 02:56:19 +0200
|
||||
Subject: ddraw/tests: Add more tests for IDirect3DTexture2::Load.
|
||||
Subject: [PATCH] ddraw/tests: Add more tests for IDirect3DTexture2::Load.
|
||||
|
||||
---
|
||||
dlls/ddraw/tests/d3d.c | 373 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ddraw/tests/ddraw2.c | 28 +++-
|
||||
dlls/ddraw/tests/d3d.c | 373 ++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ddraw/tests/ddraw2.c | 28 ++-
|
||||
2 files changed, 400 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
|
||||
index ec4197a..d35d0e0 100644
|
||||
index 87d0648b699..e88bbf59767 100644
|
||||
--- a/dlls/ddraw/tests/d3d.c
|
||||
+++ b/dlls/ddraw/tests/d3d.c
|
||||
@@ -1515,6 +1515,288 @@ static BOOL colortables_check_equality(PALETTEENTRY table1[256], PALETTEENTRY ta
|
||||
@@ -1221,6 +1221,288 @@ static BOOL colortables_check_equality(PALETTEENTRY table1[256], PALETTEENTRY ta
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -301,9 +301,9 @@ index ec4197a..d35d0e0 100644
|
||||
/* test palette handling in IDirect3DTexture_Load */
|
||||
static void TextureLoadTest(void)
|
||||
{
|
||||
@@ -1578,6 +1860,97 @@ static void TextureLoadTest(void)
|
||||
@@ -1284,6 +1566,97 @@ static void TextureLoadTest(void)
|
||||
hr = IDirect3DTexture_Load(Texture2, Texture);
|
||||
ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr);
|
||||
ok(hr == DD_OK, "Got hr %#lx.\n", hr);
|
||||
|
||||
+ for (i = 0; i < sizeof(load_tests) / sizeof(load_tests[0]); i++)
|
||||
+ {
|
||||
@@ -400,10 +400,10 @@ index ec4197a..d35d0e0 100644
|
||||
table1[i].peRed = i;
|
||||
table1[i].peGreen = i;
|
||||
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
|
||||
index 0cb1ca4..a2489e4 100644
|
||||
index 2d08718d131..0a2d575e8cc 100644
|
||||
--- a/dlls/ddraw/tests/ddraw2.c
|
||||
+++ b/dlls/ddraw/tests/ddraw2.c
|
||||
@@ -1121,8 +1121,10 @@ static void test_texture_load_ckey(void)
|
||||
@@ -1495,8 +1495,10 @@ static void test_texture_load_ckey(void)
|
||||
IDirectDraw2 *ddraw = NULL;
|
||||
IDirectDrawSurface *src = NULL;
|
||||
IDirectDrawSurface *dst = NULL;
|
||||
@@ -414,7 +414,7 @@ index 0cb1ca4..a2489e4 100644
|
||||
DDSURFACEDESC ddsd;
|
||||
HRESULT hr;
|
||||
DDCOLORKEY ckey;
|
||||
@@ -1134,16 +1136,31 @@ static void test_texture_load_ckey(void)
|
||||
@@ -1508,16 +1510,31 @@ static void test_texture_load_ckey(void)
|
||||
|
||||
memset(&ddsd, 0, sizeof(ddsd));
|
||||
ddsd.dwSize = sizeof(ddsd);
|
||||
@@ -431,10 +431,10 @@ index 0cb1ca4..a2489e4 100644
|
||||
+ U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000000FF;
|
||||
+
|
||||
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &src, NULL);
|
||||
ok(SUCCEEDED(hr), "Failed to create source texture, hr %#x.\n", hr);
|
||||
ok(SUCCEEDED(hr), "Failed to create source texture, hr %#lx.\n", hr);
|
||||
ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE;
|
||||
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &dst, NULL);
|
||||
ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#x.\n", hr);
|
||||
ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#lx.\n", hr);
|
||||
|
||||
+ U1(ddsd.ddpfPixelFormat).dwRGBBitCount = 16;
|
||||
+ U2(ddsd.ddpfPixelFormat).dwRBitMask = 0xf800;
|
||||
@@ -445,20 +445,20 @@ index 0cb1ca4..a2489e4 100644
|
||||
+ ok(SUCCEEDED(hr), "Failed to create destination texture, hr %#x.\n", hr);
|
||||
+
|
||||
hr = IDirectDrawSurface_QueryInterface(src, &IID_IDirect3DTexture, (void **)&src_tex);
|
||||
ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get Direct3DTexture interface, hr %#x.\n", hr);
|
||||
ok(SUCCEEDED(hr) || hr == E_NOINTERFACE, "Failed to get Direct3DTexture interface, hr %#lx.\n", hr);
|
||||
if (FAILED(hr))
|
||||
@@ -1154,6 +1171,8 @@ static void test_texture_load_ckey(void)
|
||||
@@ -1528,6 +1545,8 @@ static void test_texture_load_ckey(void)
|
||||
}
|
||||
hr = IDirectDrawSurface_QueryInterface(dst, &IID_IDirect3DTexture, (void **)&dst_tex);
|
||||
ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#x.\n", hr);
|
||||
ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#lx.\n", hr);
|
||||
+ hr = IDirectDrawSurface_QueryInterface(dst2, &IID_IDirect3DTexture, (void **)&dst2_tex);
|
||||
+ ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#x.\n", hr);
|
||||
+ ok(SUCCEEDED(hr), "Failed to get Direct3DTexture interface, hr %#lx.\n", hr);
|
||||
|
||||
/* No surface has a color key */
|
||||
hr = IDirect3DTexture_Load(dst_tex, src_tex);
|
||||
@@ -1182,6 +1201,11 @@ static void test_texture_load_ckey(void)
|
||||
ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "dwColorSpaceLowValue is %#x.\n", ckey.dwColorSpaceLowValue);
|
||||
ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue);
|
||||
@@ -1556,6 +1575,11 @@ static void test_texture_load_ckey(void)
|
||||
ok(ckey.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceLowValue);
|
||||
ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
|
||||
|
||||
+ /* Source surface has a color key but destination differs in format */
|
||||
+ ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x0;
|
||||
@@ -468,8 +468,8 @@ index 0cb1ca4..a2489e4 100644
|
||||
/* Both surfaces have a color key: Dest ckey is overwritten */
|
||||
ckey.dwColorSpaceLowValue = ckey.dwColorSpaceHighValue = 0x000000ff;
|
||||
hr = IDirectDrawSurface_SetColorKey(dst, DDCKEY_SRCBLT, &ckey);
|
||||
@@ -1206,8 +1230,10 @@ static void test_texture_load_ckey(void)
|
||||
ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "dwColorSpaceHighValue is %#x.\n", ckey.dwColorSpaceHighValue);
|
||||
@@ -1580,8 +1604,10 @@ static void test_texture_load_ckey(void)
|
||||
ok(ckey.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08lx.\n", ckey.dwColorSpaceHighValue);
|
||||
|
||||
done:
|
||||
+ if (dst2_tex) IDirect3DTexture_Release(dst2_tex);
|
||||
@@ -480,5 +480,5 @@ index 0cb1ca4..a2489e4 100644
|
||||
if (src) IDirectDrawSurface_Release(src);
|
||||
if (ddraw) IDirectDraw2_Release(ddraw);
|
||||
--
|
||||
2.4.2
|
||||
2.35.1
|
||||
|
||||
|
@@ -8,3 +8,4 @@
|
||||
# The Sims Online
|
||||
Fixes: [19153] Resident Evil 1 fails to start (needs IDirect3D3::EnumDevices() to return a device named "RGB Emulation")
|
||||
Depends: ddraw-Device_Caps
|
||||
Disabled: True
|
||||
|
@@ -1,69 +0,0 @@
|
||||
From b1690a5bc6ea4cf670f3117f8caf9e229cd1f47d Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Sun, 20 May 2018 21:40:39 -0700
|
||||
Subject: [PATCH] dwrite: Test IDWriteTextFormat with nonexistent font
|
||||
|
||||
Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/tests/layout.c | 45 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index d19f91311db..d89ccc9d995 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -3290,6 +3290,51 @@ todo_wine
|
||||
ok(metrics.lineCount == 1, "Unexpected line count %u.\n", metrics.lineCount);
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
||||
+ IDWriteTextFormat_Release(format);
|
||||
+
|
||||
+ /* nonexistent font */
|
||||
+ hr = IDWriteFactory_CreateTextFormat(factory, L"Blah!", NULL, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL,
|
||||
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, L"en-us", &format);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, strW, 4, format, 500.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ count = 0;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+todo_wine
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+todo_wine
|
||||
+ ok(metrics.layoutWidth == 500.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
IDWriteTextFormat_Release(format);
|
||||
IDWriteFactory_Release(factory);
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,332 +0,0 @@
|
||||
From 79b9dda91ac0e33add2252f9ad5c10ba752ddabb Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Wed, 23 May 2018 00:01:42 -0700
|
||||
Subject: [PATCH] dwrite: Test GetMetrics with custom fontcollection
|
||||
|
||||
Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/tests/layout.c | 280 ++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 279 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index 9a450495146..9f1051b4905 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -3363,7 +3363,7 @@ todo_wine
|
||||
DWRITE_FONT_STRETCH_NORMAL, 10.0, L"en-us", &format);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
- hr = IDWriteFactory_CreateTextLayout(factory, strW, 4, format, 500.0, 1000.0, &layout);
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, L"A", 4, format, 500.0, 1000.0, &layout);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
count = 0;
|
||||
@@ -4546,6 +4546,7 @@ static void test_SetWordWrapping(void)
|
||||
/* Collection dedicated to fallback testing */
|
||||
|
||||
static const WCHAR g_blahfontW[] = {'B','l','a','h',0};
|
||||
+static const WCHAR g_fontNotInCollectionW[] = {'n','o','t','B','l','a','h',0};
|
||||
static HRESULT WINAPI fontcollection_QI(IDWriteFontCollection *iface, REFIID riid, void **obj)
|
||||
{
|
||||
if (IsEqualIID(riid, &IID_IDWriteFontCollection) || IsEqualIID(riid, &IID_IUnknown)) {
|
||||
@@ -4607,6 +4608,9 @@ static HRESULT WINAPI fontcollection_FindFamilyName(IDWriteFontCollection *iface
|
||||
*index = 123456;
|
||||
*exists = TRUE;
|
||||
return S_OK;
|
||||
+ } else if (!lstrcmpW(name, g_fontNotInCollectionW)) {
|
||||
+ *exists = FALSE;
|
||||
+ return S_OK;
|
||||
}
|
||||
ok(0, "unexpected call, name %s\n", wine_dbgstr_w(name));
|
||||
return E_NOTIMPL;
|
||||
@@ -6405,6 +6409,279 @@ static void test_layout_range_length(void)
|
||||
IDWriteFactory_Release(factory);
|
||||
}
|
||||
|
||||
+static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
+{
|
||||
+ static const WCHAR emptystringW[] = {0};
|
||||
+ static const WCHAR mappedW[] = {'a','b','c','d',0};
|
||||
+ static const WCHAR notmappedW[] = {'a',0xffff,'b',0}; // u+ffff = not a unicode character
|
||||
+ DWRITE_CLUSTER_METRICS clusters[4];
|
||||
+ DWRITE_TEXT_METRICS metrics;
|
||||
+ IDWriteTextFormat *format;
|
||||
+ IDWriteTextLayout *layout;
|
||||
+ IDWriteFactory *factory;
|
||||
+ UINT32 count, i;
|
||||
+ FLOAT width;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ factory = create_factory();
|
||||
+
|
||||
+ /* font is in font collection */
|
||||
+ hr = IDWriteFactory_CreateTextFormat(factory, g_blahfontW, &fallbackcollection,
|
||||
+ DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL,
|
||||
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, L"en-us", &format);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ /* text is mapped by fontfallback */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, mappedW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* text is not mapped by fontfallback */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, notmappedW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* empty string */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, emptystringW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* zero-length empty string */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, emptystringW, 0, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 0, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ IDWriteTextFormat_Release(format);
|
||||
+
|
||||
+ /* font not in font collection */
|
||||
+ hr = IDWriteFactory_CreateTextFormat(factory, g_fontNotInCollectionW, &fallbackcollection,
|
||||
+ DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL,
|
||||
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, L"en-us", &format);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+
|
||||
+ /* text is mapped by fontfallback */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, mappedW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* text is not mapped by fontfallback */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, notmappedW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* empty string */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, emptystringW, 4, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(count == 4, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ /* zero-length empty string */
|
||||
+ hr = IDWriteFactory_CreateTextLayout(factory, emptystringW, 0, format, 1000.0, 1000.0, &layout);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ count = 9999;
|
||||
+ hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ ok(count == 0, "got %u\n", count);
|
||||
+ for (i = 0, width = 0.0; i < count; i++)
|
||||
+ width += clusters[i].width;
|
||||
+ memset(&metrics, 0xcc, sizeof(metrics));
|
||||
+ hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
+ todo_wine
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ todo_wine
|
||||
+ ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
+ todo_wine
|
||||
+ ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
+ todo_wine
|
||||
+ ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
+ metrics.widthIncludingTrailingWhitespace, width);
|
||||
+ todo_wine
|
||||
+ ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
+ todo_wine
|
||||
+ ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
+ todo_wine
|
||||
+ ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
+ IDWriteTextLayout_Release(layout);
|
||||
+
|
||||
+ IDWriteTextFormat_Release(format);
|
||||
+
|
||||
+ IDWriteFactory_Release(factory);
|
||||
+}
|
||||
+
|
||||
START_TEST(layout)
|
||||
{
|
||||
IDWriteFactory *factory;
|
||||
@@ -6438,6 +6715,7 @@ START_TEST(layout)
|
||||
test_SetFontStretch();
|
||||
test_SetStrikethrough();
|
||||
test_GetMetrics();
|
||||
+ test_GetMetrics_with_custom_fontcollection();
|
||||
test_SetFlowDirection();
|
||||
test_SetDrawingEffect();
|
||||
test_GetLineMetrics();
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,311 +0,0 @@
|
||||
From bf4cc6cfca946ff719763bb7be25fe268577f0d3 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Mon, 21 May 2018 18:13:00 -0700
|
||||
Subject: [PATCH] dwrite: Use font fallback when mapping characters
|
||||
|
||||
Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/analyzer.c | 77 +++++++++++++++++++++++++++++---------
|
||||
dlls/dwrite/layout.c | 6 +++
|
||||
dlls/dwrite/tests/layout.c | 54 ++++----------------------
|
||||
3 files changed, 73 insertions(+), 64 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
|
||||
index 7ffcfa8070c..aab309c2a8c 100644
|
||||
--- a/dlls/dwrite/analyzer.c
|
||||
+++ b/dlls/dwrite/analyzer.c
|
||||
@@ -2094,6 +2094,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
IDWriteFont **mapped_font)
|
||||
{
|
||||
const struct fallback_mapping *mapping;
|
||||
+ IDWriteFontCollection *collection;
|
||||
HRESULT hr;
|
||||
UINT32 i;
|
||||
|
||||
@@ -2105,9 +2106,15 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
+ if (mapping->collection) {
|
||||
+ collection = mapping->collection;
|
||||
+ } else {
|
||||
+ collection = (IDWriteFontCollection *)fallback->systemcollection;
|
||||
+ }
|
||||
+
|
||||
/* Now let's see what fallback can handle. Pick first font that could be created. */
|
||||
for (i = 0; i < mapping->families_count; i++) {
|
||||
- hr = create_matching_font((IDWriteFontCollection *)fallback->systemcollection, mapping->families[i],
|
||||
+ hr = create_matching_font(collection, mapping->families[i],
|
||||
weight, style, stretch, mapped_font);
|
||||
if (hr == S_OK) {
|
||||
TRACE("Created fallback font using family %s.\n", debugstr_w(mapping->families[i]));
|
||||
@@ -2164,32 +2171,66 @@ static HRESULT WINAPI fontfallback_MapCharacters(IDWriteFontFallback1 *iface, ID
|
||||
|
||||
if (basefamily && *basefamily) {
|
||||
hr = create_matching_font(basecollection, basefamily, weight, style, stretch, ret_font);
|
||||
- if (FAILED(hr))
|
||||
- goto done;
|
||||
-
|
||||
- hr = fallback_map_characters(*ret_font, text, length, mapped_length);
|
||||
- if (FAILED(hr))
|
||||
- goto done;
|
||||
+ if (SUCCEEDED(hr)) {
|
||||
+ hr = fallback_map_characters(*ret_font, text, length, mapped_length);
|
||||
+ if (FAILED(hr)) {
|
||||
+ IDWriteFont_Release(*ret_font);
|
||||
+ *ret_font = NULL;
|
||||
+ WARN("Mapping with requested family %s failed, hr %#x.\n", debugstr_w(basefamily), hr);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!*mapped_length) {
|
||||
- IDWriteFont *mapped_font;
|
||||
+ if (*ret_font) {
|
||||
+ IDWriteFont_Release(*ret_font);
|
||||
+ *ret_font = NULL;
|
||||
+ }
|
||||
|
||||
- hr = fallback_get_fallback_font(fallback, text, length, weight, style, stretch, mapped_length, &mapped_font);
|
||||
+ hr = fallback_get_fallback_font(fallback, text, length, weight, style, stretch, mapped_length, ret_font);
|
||||
if (FAILED(hr)) {
|
||||
- /* fallback wasn't found, keep base font if any, so we can get at least some visual output */
|
||||
- if (*ret_font) {
|
||||
- *mapped_length = length;
|
||||
- hr = S_OK;
|
||||
- }
|
||||
+ WARN("Mapping with fallback families failed, hr %#x.\n", hr);
|
||||
}
|
||||
- else {
|
||||
- if (*ret_font)
|
||||
- IDWriteFont_Release(*ret_font);
|
||||
- *ret_font = mapped_font;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This is a rough hack. We search the system font collection because
|
||||
+ * the system fontfallback, which would have been searched above, is not
|
||||
+ * fully implemented as it isn't populated with any system fonts. Once
|
||||
+ * implemented, the block below can be removed.
|
||||
+ * */
|
||||
+ if (!*mapped_length) {
|
||||
+ IDWriteFontFamily *family;
|
||||
+ IDWriteFont *font;
|
||||
+ UINT32 i, count = IDWriteFontCollection_GetFontFamilyCount((IDWriteFontCollection *)fallback->systemcollection);
|
||||
+ for (i = 0; i < count; i++) {
|
||||
+ hr = IDWriteFontCollection_GetFontFamily((IDWriteFontCollection *)fallback->systemcollection, i, &family);
|
||||
+ if (FAILED(hr)) {
|
||||
+ ERR("Failed to get font family.\n");
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ hr = IDWriteFontFamily_GetFirstMatchingFont(family, weight, stretch, style, &font);
|
||||
+ IDWriteFontFamily_Release(family);
|
||||
+ if (FAILED(hr)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ hr = fallback_map_characters(font, text, length, mapped_length);
|
||||
+ if (SUCCEEDED(hr) && mapped_length > 0) {
|
||||
+ *ret_font = font;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ IDWriteFont_Release(font);
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!*mapped_length) {
|
||||
+ *mapped_length = length == 0 ? 0 : 1;
|
||||
+ hr = S_OK;
|
||||
+ }
|
||||
+
|
||||
done:
|
||||
free(buff);
|
||||
return hr;
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index ba80c3f70e8..c7845f9b675 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -725,6 +725,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
goto fatal;
|
||||
}
|
||||
|
||||
+ if (!font) {
|
||||
+ hr = E_FAIL;
|
||||
+ WARN("Failed to create font face, hr %#x.\n", hr);
|
||||
+ goto fatal;
|
||||
+ }
|
||||
+
|
||||
hr = IDWriteFont_CreateFontFace(font, &run->run.fontFace);
|
||||
IDWriteFont_Release(font);
|
||||
if (FAILED(hr)) {
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index 3efedd3df95..07687c76c60 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -3366,35 +3366,23 @@ static void test_GetMetrics(void)
|
||||
|
||||
count = 0;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
-todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
-todo_wine
|
||||
ok(count == 4, "got %u\n", count);
|
||||
for (i = 0, width = 0.0; i < count; i++)
|
||||
width += clusters[i].width;
|
||||
|
||||
memset(&metrics, 0xcc, sizeof(metrics));
|
||||
hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
-todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
-todo_wine
|
||||
ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
-todo_wine
|
||||
ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
-todo_wine
|
||||
ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
-todo_wine
|
||||
ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
metrics.widthIncludingTrailingWhitespace, width);
|
||||
-todo_wine
|
||||
ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
-todo_wine
|
||||
ok(metrics.layoutWidth == 500.0, "got %.2f\n", metrics.layoutWidth);
|
||||
-todo_wine
|
||||
ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
-todo_wine
|
||||
ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
-todo_wine
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
|
||||
IDWriteTextLayout_Release(layout);
|
||||
@@ -4688,16 +4676,12 @@ static void test_MapCharacters(void)
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
- todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
IDWriteFont_Release(font);
|
||||
-}
|
||||
+
|
||||
/* same Latin text, full length */
|
||||
g_source = L"abc";
|
||||
mappedlength = 0;
|
||||
@@ -4705,16 +4689,12 @@ if (font) {
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(mappedlength == 3, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
- todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
IDWriteFont_Release(font);
|
||||
-}
|
||||
+
|
||||
/* string 'a\x3058b' */
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
@@ -4722,32 +4702,24 @@ if (font) {
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
- todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
IDWriteFont_Release(font);
|
||||
-}
|
||||
+
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
scale = 0.0f;
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 1, 2, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
- todo_wine
|
||||
ok(font != NULL, "got %p\n", font);
|
||||
-if (font) {
|
||||
IDWriteFont_Release(font);
|
||||
-}
|
||||
+
|
||||
/* Try with explicit collection, Tahoma will be forced. */
|
||||
/* 1. Latin part */
|
||||
g_source = str2W;
|
||||
@@ -4770,7 +4742,10 @@ if (font) {
|
||||
IDWriteLocalizedStrings_Release(strings);
|
||||
IDWriteFont_Release(font);
|
||||
|
||||
- /* 2. Hiragana character, force Tahoma font does not support Japanese */
|
||||
+ /**
|
||||
+ * 2. Hiragana character. Tahoma is requested, but it doesn't support
|
||||
+ * Japanese. A NULL font is returned if there is no fallback for Japanese.
|
||||
+ */
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
scale = 0.0f;
|
||||
@@ -4780,7 +4755,6 @@ if (font) {
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
- ok(font != NULL, "got %p\n", font);
|
||||
|
||||
exists = FALSE;
|
||||
hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists);
|
||||
@@ -6667,34 +6641,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
count = 9999;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- todo_wine
|
||||
ok(count == 4, "got %u\n", count);
|
||||
for (i = 0, width = 0.0; i < count; i++)
|
||||
width += clusters[i].width;
|
||||
memset(&metrics, 0xcc, sizeof(metrics));
|
||||
hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- todo_wine
|
||||
ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
- todo_wine
|
||||
ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
- todo_wine
|
||||
ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
- todo_wine
|
||||
ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
metrics.widthIncludingTrailingWhitespace, width);
|
||||
- todo_wine
|
||||
ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
- todo_wine
|
||||
ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
- todo_wine
|
||||
ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
- todo_wine
|
||||
ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
- todo_wine
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
@@ -1,128 +0,0 @@
|
||||
From 838b8a5edeca6c06c20bdc301f4d5d658e835cc9 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Wed, 23 May 2018 05:59:20 -0700
|
||||
Subject: [PATCH 5/6] dwrite: Use MapCharacters for non-visual characters
|
||||
|
||||
Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/layout.c | 22 +++++++++++++++-------
|
||||
dlls/dwrite/tests/layout.c | 24 ------------------------
|
||||
2 files changed, 15 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index df3f3beabb..5d06bf9348 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -822,7 +822,8 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
LIST_FOR_EACH_ENTRY(r, &layout->runs, struct layout_run, entry) {
|
||||
struct regular_layout_run *run = &r->u.regular;
|
||||
IDWriteFont *font;
|
||||
- UINT32 length;
|
||||
+ UINT32 length, mapped_length;
|
||||
+ FLOAT scale;
|
||||
|
||||
if (r->kind == LAYOUT_RUN_INLINE)
|
||||
continue;
|
||||
@@ -830,12 +831,19 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
range = get_layout_range_by_pos(layout, run->descr.textPosition);
|
||||
|
||||
if (run->sa.shapes == DWRITE_SCRIPT_SHAPES_NO_VISUAL) {
|
||||
- IDWriteFontCollection *collection;
|
||||
-
|
||||
- collection = range->collection ? range->collection : sys_collection;
|
||||
-
|
||||
- if (FAILED(hr = create_matching_font(collection, range->fontfamily, range->weight, range->style,
|
||||
- range->stretch, &font))) {
|
||||
+ hr = IDWriteFontFallback_MapCharacters(fallback,
|
||||
+ (IDWriteTextAnalysisSource *)&layout->IDWriteTextAnalysisSource1_iface,
|
||||
+ run->descr.textPosition,
|
||||
+ run->descr.stringLength,
|
||||
+ range->collection,
|
||||
+ range->fontfamily,
|
||||
+ range->weight,
|
||||
+ range->style,
|
||||
+ range->stretch,
|
||||
+ &mapped_length,
|
||||
+ &font,
|
||||
+ &scale);
|
||||
+ if (FAILED(hr)) {
|
||||
WARN("%s: failed to create matching font for non visual run, family %s, collection %p\n",
|
||||
debugstr_rundescr(&run->descr), debugstr_w(range->fontfamily), range->collection);
|
||||
break;
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index 430bb1f0eb..cf1d5d7060 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -5713,34 +5713,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
count = 9999;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- todo_wine
|
||||
ok(count == 4, "got %u\n", count);
|
||||
for (i = 0, width = 0.0; i < count; i++)
|
||||
width += clusters[i].width;
|
||||
memset(&metrics, 0xcc, sizeof(metrics));
|
||||
hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- todo_wine
|
||||
ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
- todo_wine
|
||||
ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
- todo_wine
|
||||
ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
- todo_wine
|
||||
ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
metrics.widthIncludingTrailingWhitespace, width);
|
||||
- todo_wine
|
||||
ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
- todo_wine
|
||||
ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
- todo_wine
|
||||
ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
- todo_wine
|
||||
ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
- todo_wine
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
||||
@@ -5749,34 +5737,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
count = 9999;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- todo_wine
|
||||
ok(count == 4, "got %u\n", count);
|
||||
for (i = 0, width = 0.0; i < count; i++)
|
||||
width += clusters[i].width;
|
||||
memset(&metrics, 0xcc, sizeof(metrics));
|
||||
hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- todo_wine
|
||||
ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
- todo_wine
|
||||
ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
- todo_wine
|
||||
ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
- todo_wine
|
||||
ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
metrics.widthIncludingTrailingWhitespace, width);
|
||||
- todo_wine
|
||||
ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
- todo_wine
|
||||
ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
- todo_wine
|
||||
ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
- todo_wine
|
||||
ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
- todo_wine
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
||||
--
|
||||
2.18.0
|
||||
|
@@ -1,96 +0,0 @@
|
||||
From a0f4bde380003f7a8e3b713028215bf985dbb3c0 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Wed, 23 May 2018 07:03:44 -0700
|
||||
Subject: [PATCH 6/6] dwrite: Use MapCharacters for dummy line metrics
|
||||
|
||||
Fixes: https://bugs.winehq.org/show_bug.cgi?id=44052
|
||||
|
||||
Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/layout.c | 29 +++++++++++++++++++++++++++++
|
||||
dlls/dwrite/tests/layout.c | 8 --------
|
||||
2 files changed, 29 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index 5d06bf9348..2213717f92 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -1808,8 +1808,11 @@ static HRESULT layout_set_dummy_line_metrics(struct dwrite_textlayout *layout, U
|
||||
DWRITE_FONT_METRICS fontmetrics;
|
||||
struct layout_range *range;
|
||||
IDWriteFontFace *fontface;
|
||||
+ IDWriteFontFallback *fallback;
|
||||
IDWriteFont *font;
|
||||
HRESULT hr;
|
||||
+ UINT32 mapped_length;
|
||||
+ FLOAT scale;
|
||||
|
||||
range = get_layout_range_by_pos(layout, pos);
|
||||
hr = create_matching_font(range->collection,
|
||||
@@ -1818,8 +1821,34 @@ static HRESULT layout_set_dummy_line_metrics(struct dwrite_textlayout *layout, U
|
||||
range->style,
|
||||
range->stretch,
|
||||
&font);
|
||||
+
|
||||
+ if (FAILED(hr)) {
|
||||
+ if (layout->format.fallback) {
|
||||
+ fallback = layout->format.fallback;
|
||||
+ IDWriteFontFallback_AddRef(fallback);
|
||||
+ } else if (FAILED(hr = IDWriteFactory7_GetSystemFontFallback(layout->factory, &fallback))) {
|
||||
+ WARN("Failed to get system fallback, hr %#x.\n", hr);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ hr = IDWriteFontFallback_MapCharacters(fallback,
|
||||
+ (IDWriteTextAnalysisSource *)&layout->IDWriteTextAnalysisSource1_iface,
|
||||
+ pos,
|
||||
+ layout->len,
|
||||
+ range->collection,
|
||||
+ range->fontfamily,
|
||||
+ range->weight,
|
||||
+ range->style,
|
||||
+ range->stretch,
|
||||
+ &mapped_length,
|
||||
+ &font,
|
||||
+ &scale);
|
||||
+ IDWriteFontFallback_Release(fallback);
|
||||
+ }
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
+ if (font == NULL)
|
||||
+ return S_OK;
|
||||
hr = IDWriteFont_CreateFontFace(font, &fontface);
|
||||
IDWriteFont_Release(font);
|
||||
if (FAILED(hr))
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index cf1d5d7060..6ed7b3c334 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -5767,24 +5767,16 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
width += clusters[i].width;
|
||||
memset(&metrics, 0xcc, sizeof(metrics));
|
||||
hr = IDWriteTextLayout_GetMetrics(layout, &metrics);
|
||||
- todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
- todo_wine
|
||||
ok(metrics.left == 0.0, "got %.2f\n", metrics.left);
|
||||
- todo_wine
|
||||
ok(metrics.top == 0.0, "got %.2f\n", metrics.top);
|
||||
- todo_wine
|
||||
ok(metrics.width == width, "got %.2f, expected %.2f\n", metrics.width, width);
|
||||
- todo_wine
|
||||
ok(metrics.widthIncludingTrailingWhitespace == width, "got %.2f, expected %.2f\n",
|
||||
metrics.widthIncludingTrailingWhitespace, width);
|
||||
todo_wine
|
||||
ok(metrics.height > 0.0, "got %.2f\n", metrics.height);
|
||||
- todo_wine
|
||||
ok(metrics.layoutWidth == 1000.0, "got %.2f\n", metrics.layoutWidth);
|
||||
- todo_wine
|
||||
ok(metrics.layoutHeight == 1000.0, "got %.2f\n", metrics.layoutHeight);
|
||||
- todo_wine
|
||||
ok(metrics.maxBidiReorderingDepth == 1, "got %u\n", metrics.maxBidiReorderingDepth);
|
||||
todo_wine
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
--
|
||||
2.18.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [44052] - Support for font fallback.
|
@@ -1,4 +1,4 @@
|
||||
From 846f2603e9d2a3a3b5a56b0e1140bb49a95053a6 Mon Sep 17 00:00:00 2001
|
||||
From ec18233558b62aa736b5ecf20d2f7487e2823286 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 7 Jun 2018 20:09:59 -0500
|
||||
Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
@@ -15,7 +15,7 @@ Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
create mode 100644 server/esync.h
|
||||
|
||||
diff --git a/server/Makefile.in b/server/Makefile.in
|
||||
index c81a2112632..da20dff9f56 100644
|
||||
index 3b9446fe224..776faec63e4 100644
|
||||
--- a/server/Makefile.in
|
||||
+++ b/server/Makefile.in
|
||||
@@ -11,6 +11,7 @@ C_SRCS = \
|
||||
@@ -28,7 +28,7 @@ index c81a2112632..da20dff9f56 100644
|
||||
file.c \
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
new file mode 100644
|
||||
index 00000000000..b9dbfa322bc
|
||||
index 00000000000..35b4833fd4c
|
||||
--- /dev/null
|
||||
+++ b/server/esync.c
|
||||
@@ -0,0 +1,318 @@
|
||||
@@ -158,7 +158,7 @@ index 00000000000..b9dbfa322bc
|
||||
+ NULL, /* satisfied */
|
||||
+ no_signal, /* signal */
|
||||
+ no_get_fd, /* get_fd */
|
||||
+ no_map_access, /* map_access */
|
||||
+ default_map_access, /* map_access */
|
||||
+ default_get_sd, /* get_sd */
|
||||
+ default_set_sd, /* set_sd */
|
||||
+ default_get_full_name, /* get_full_name */
|
||||
@@ -403,10 +403,10 @@ index a134d811d82..3436b0871b4 100644
|
||||
set_current_time();
|
||||
init_scheduler();
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 6bfcda213a4..6b0e0e6f6e4 100644
|
||||
index 99df502e398..9e15ada5bd0 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3738,7 +3738,6 @@ struct handle_info
|
||||
@@ -3777,7 +3777,6 @@ struct handle_info
|
||||
obj_handle_t handle; /* process handle */
|
||||
@END
|
||||
|
||||
@@ -414,7 +414,7 @@ index 6bfcda213a4..6b0e0e6f6e4 100644
|
||||
/* Iterate thread list for process */
|
||||
@REQ(get_next_thread)
|
||||
obj_handle_t process; /* process handle */
|
||||
@@ -3749,3 +3748,27 @@ struct handle_info
|
||||
@@ -3788,3 +3787,27 @@ struct handle_info
|
||||
@REPLY
|
||||
obj_handle_t handle; /* next thread handle */
|
||||
@END
|
||||
@@ -443,5 +443,5 @@ index 6bfcda213a4..6b0e0e6f6e4 100644
|
||||
+ unsigned int shm_idx;
|
||||
+@END
|
||||
--
|
||||
2.35.1
|
||||
2.38.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From c204c9ed2a8504868c3cbf487e7a29c4e7254d3f Mon Sep 17 00:00:00 2001
|
||||
From 271f43a1fafb19e1404b05ec597b504ecad74784 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 12:09:22 -0500
|
||||
Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
@@ -16,10 +16,10 @@ Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
create mode 100644 dlls/ntdll/unix/esync.h
|
||||
|
||||
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
|
||||
index 185bc563e68..d7c757cab32 100644
|
||||
index 07688a5fcf6..4e490c475a2 100644
|
||||
--- a/dlls/ntdll/Makefile.in
|
||||
+++ b/dlls/ntdll/Makefile.in
|
||||
@@ -46,6 +46,7 @@ C_SRCS = \
|
||||
@@ -47,6 +47,7 @@ C_SRCS = \
|
||||
unix/cdrom.c \
|
||||
unix/debug.c \
|
||||
unix/env.c \
|
||||
@@ -346,7 +346,7 @@ index 00000000000..a50a755149a
|
||||
+
|
||||
+extern int receive_fd( obj_handle_t *handle ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index 10884a7a673..28cc48e04bf 100644
|
||||
index 35f2e5f986f..4d95c29ab24 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -89,6 +89,7 @@
|
||||
@@ -357,8 +357,8 @@ index 10884a7a673..28cc48e04bf 100644
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -2082,6 +2083,7 @@ static void start_main_thread(void)
|
||||
signal_init_thread( teb );
|
||||
@@ -2188,6 +2189,7 @@ static void start_main_thread(void)
|
||||
signal_alloc_thread( teb );
|
||||
dbg_init();
|
||||
startup_info_size = server_init_process();
|
||||
+ esync_init();
|
||||
@@ -366,7 +366,7 @@ index 10884a7a673..28cc48e04bf 100644
|
||||
init_cpu_info();
|
||||
init_files();
|
||||
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
|
||||
index 6a3224d8385..de65f936a59 100644
|
||||
index b7d8733f2bc..8cd5f0474e6 100644
|
||||
--- a/dlls/ntdll/unix/server.c
|
||||
+++ b/dlls/ntdll/unix/server.c
|
||||
@@ -106,7 +106,7 @@ sigset_t server_block_set; /* signals to block during server calls */
|
||||
@@ -378,7 +378,7 @@ index 6a3224d8385..de65f936a59 100644
|
||||
|
||||
/* atomically exchange a 64-bit value */
|
||||
static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val )
|
||||
@@ -803,7 +803,7 @@ void wine_server_send_fd( int fd )
|
||||
@@ -834,7 +834,7 @@ void wine_server_send_fd( int fd )
|
||||
*
|
||||
* Receive a file descriptor passed from the server.
|
||||
*/
|
||||
@@ -388,7 +388,7 @@ index 6a3224d8385..de65f936a59 100644
|
||||
struct iovec vec;
|
||||
struct msghdr msghdr;
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index 442243d8bcf..72cbf92f93c 100644
|
||||
index 9112572c67d..c5f30428f79 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -64,6 +64,7 @@
|
||||
@@ -399,7 +399,7 @@ index 442243d8bcf..72cbf92f93c 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(sync);
|
||||
|
||||
@@ -262,6 +263,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
|
||||
@@ -273,6 +274,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
|
||||
if (max <= 0 || initial < 0 || initial > max) return STATUS_INVALID_PARAMETER;
|
||||
if ((ret = alloc_object_attributes( attr, &objattr, &len ))) return ret;
|
||||
|
||||
@@ -422,5 +422,5 @@ index b9dbfa322bc..99e57eca44c 100644
|
||||
int do_esync(void)
|
||||
{
|
||||
--
|
||||
2.34.1
|
||||
2.38.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3e714e2eb10fe17f12b747731c0ce7e18fd4b7a0 Mon Sep 17 00:00:00 2001
|
||||
From 61fb7e02aa6779469e94c79f1132c4991cb27244 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 15:11:12 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for process objects.
|
||||
@@ -40,16 +40,16 @@ index c7b0323f204..27049ffbdb0 100644
|
||||
{
|
||||
struct esync *esync;
|
||||
diff --git a/server/esync.h b/server/esync.h
|
||||
index 7ca4ca89394..6a0a367124d 100644
|
||||
index 00f9e638d83..8522d8a69ae 100644
|
||||
--- a/server/esync.h
|
||||
+++ b/server/esync.h
|
||||
@@ -20,3 +20,4 @@
|
||||
@@ -22,3 +22,4 @@
|
||||
|
||||
extern int do_esync(void);
|
||||
void esync_init(void);
|
||||
+int esync_create_fd( int initval, int flags );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index da972a41955..91b26d00ec0 100644
|
||||
index da11b90c613..22ac16fb540 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -63,6 +63,7 @@
|
||||
@@ -77,7 +77,7 @@ index da972a41955..91b26d00ec0 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -684,6 +686,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
@@ -686,6 +688,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
process->rawinput_mouse = NULL;
|
||||
process->rawinput_kbd = NULL;
|
||||
memset( &process->image_info, 0, sizeof(process->image_info) );
|
||||
@@ -85,7 +85,7 @@ index da972a41955..91b26d00ec0 100644
|
||||
list_init( &process->kernel_object );
|
||||
list_init( &process->thread_list );
|
||||
list_init( &process->locks );
|
||||
@@ -741,6 +744,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
@@ -742,6 +745,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
if (!token_assign_label( process->token, &high_label_sid ))
|
||||
goto error;
|
||||
|
||||
@@ -95,15 +95,15 @@ index da972a41955..91b26d00ec0 100644
|
||||
set_fd_events( process->msg_fd, POLLIN ); /* start listening to events */
|
||||
return process;
|
||||
|
||||
@@ -787,6 +793,7 @@ static void process_destroy( struct object *obj )
|
||||
if (process->token) release_object( process->token );
|
||||
@@ -789,6 +795,7 @@ static void process_destroy( struct object *obj )
|
||||
free( process->rawinput_devices );
|
||||
free( process->dir_cache );
|
||||
free( process->image );
|
||||
+ if (do_esync()) close( process->esync_fd );
|
||||
}
|
||||
|
||||
/* dump a process on stdout for debugging purposes */
|
||||
@@ -804,6 +811,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
|
||||
@@ -806,6 +813,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
|
||||
return !process->running_threads;
|
||||
}
|
||||
|
||||
@@ -118,10 +118,10 @@ index da972a41955..91b26d00ec0 100644
|
||||
{
|
||||
access = default_map_access( obj, access );
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index 632faf9c4bf..1ba69b3406e 100644
|
||||
index 97e0d455ece..a0a071d8f88 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -90,6 +90,7 @@ struct process
|
||||
@@ -85,6 +85,7 @@ struct process
|
||||
const struct rawinput_device *rawinput_kbd; /* rawinput keyboard device, if any */
|
||||
struct list kernel_object; /* list of kernel object pointers */
|
||||
pe_image_info_t image_info; /* main exe image info */
|
||||
@@ -130,5 +130,5 @@ index 632faf9c4bf..1ba69b3406e 100644
|
||||
|
||||
/* process functions */
|
||||
--
|
||||
2.34.1
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From e0a89702e35941e75ce06f795966c92b3f195ed8 Mon Sep 17 00:00:00 2001
|
||||
From ca6a89f3bfb6aa5d7ac05bb0c469b527ae1a9d9d Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 16:11:23 -0500
|
||||
Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
3 files changed, 75 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index fcbe563bb5a..88490e08ef9 100644
|
||||
index 2ae334d8417..608c318c1c7 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -482,12 +482,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
@@ -475,12 +475,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
|
||||
/* A value of STATUS_NOT_IMPLEMENTED returned from this function means that we
|
||||
* need to delegate to server_select(). */
|
||||
@@ -28,7 +28,7 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
LONGLONG timeleft;
|
||||
LARGE_INTEGER now;
|
||||
ULONGLONG end;
|
||||
@@ -515,6 +516,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -508,6 +509,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
if (has_esync && has_server)
|
||||
FIXME("Can't wait on esync and server objects at the same time!\n");
|
||||
else if (has_server)
|
||||
@@ -526,6 +530,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -519,6 +523,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
for (i = 0; i < count; i++)
|
||||
TRACE(" %p", handles[i]);
|
||||
|
||||
@@ -48,7 +48,7 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
if (!timeout)
|
||||
TRACE(", timeout = INFINITE.\n");
|
||||
else
|
||||
@@ -565,7 +572,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -558,7 +565,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
int64_t value;
|
||||
ssize_t size;
|
||||
|
||||
@@ -59,7 +59,7 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
{
|
||||
/* Don't grab the object, just check if it's signaled. */
|
||||
if (fds[i].revents & POLLIN)
|
||||
@@ -610,6 +619,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -603,6 +612,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,10 +105,10 @@ index fcbe563bb5a..88490e08ef9 100644
|
||||
{
|
||||
struct stat st;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index cf00ab99c63..ecbb78cc9bb 100644
|
||||
index 5cf63cbac21..f837944574e 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3734,3 +3734,8 @@ enum esync_type
|
||||
@@ -3797,3 +3797,8 @@ enum esync_type
|
||||
int type;
|
||||
unsigned int shm_idx;
|
||||
@END
|
||||
@@ -118,10 +118,10 @@ index cf00ab99c63..ecbb78cc9bb 100644
|
||||
+ int in_msgwait; /* are we in a message wait? */
|
||||
+@END
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index d34bc284d08..f4edb299dc3 100644
|
||||
index 1702acb8480..9593ae532d4 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -146,6 +146,7 @@ struct msg_queue
|
||||
@@ -144,6 +144,7 @@ struct msg_queue
|
||||
int keystate_lock; /* owns an input keystate lock */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
int esync_fd; /* esync file descriptor (signalled on message) */
|
||||
@@ -129,7 +129,7 @@ index d34bc284d08..f4edb299dc3 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -319,6 +320,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -317,6 +318,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->keystate_lock = 0;
|
||||
queue->ignore_post_msg = 0;
|
||||
queue->esync_fd = -1;
|
||||
@@ -137,7 +137,7 @@ index d34bc284d08..f4edb299dc3 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -1002,6 +1004,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
@@ -1001,6 +1003,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
if (get_wait_queue_thread(entry)->queue == queue)
|
||||
return 0; /* thread is waiting on queue -> not hung */
|
||||
}
|
||||
@@ -148,9 +148,9 @@ index d34bc284d08..f4edb299dc3 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3416,3 +3422,18 @@ DECL_HANDLER(get_rawinput_devices)
|
||||
devices[i++] = e->device;
|
||||
}
|
||||
@@ -3456,3 +3462,18 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
process->rawinput_mouse = find_rawinput_device( process, 1, 2 );
|
||||
process->rawinput_kbd = find_rawinput_device( process, 1, 6 );
|
||||
}
|
||||
+
|
||||
+DECL_HANDLER(esync_msgwait)
|
||||
@@ -168,5 +168,5 @@ index d34bc284d08..f4edb299dc3 100644
|
||||
+ set_fd_events( queue->fd, req->in_msgwait ? POLLIN : 0 );
|
||||
+}
|
||||
--
|
||||
2.30.2
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 161ae4c64b5e3bd33771671f518c482a6a66700b Mon Sep 17 00:00:00 2001
|
||||
From 614c13aed3d20a772c3ccd26547fa93a56fcc40b Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 10 Jun 2018 19:08:18 -0500
|
||||
Subject: [PATCH] server: Implement esync_map_access().
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] server: Implement esync_map_access().
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index 1703608263f..20f149cdad3 100644
|
||||
index eca9b6aa67d..3a334b3b330 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -114,6 +114,7 @@ struct esync
|
||||
@@ -112,6 +112,7 @@ struct esync
|
||||
};
|
||||
|
||||
static void esync_dump( struct object *obj, int verbose );
|
||||
@@ -19,16 +19,16 @@ index 1703608263f..20f149cdad3 100644
|
||||
static void esync_destroy( struct object *obj );
|
||||
|
||||
const struct object_ops esync_ops =
|
||||
@@ -128,7 +129,7 @@ const struct object_ops esync_ops =
|
||||
@@ -126,7 +127,7 @@ const struct object_ops esync_ops =
|
||||
NULL, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
- no_map_access, /* map_access */
|
||||
- default_map_access, /* map_access */
|
||||
+ esync_map_access, /* map_access */
|
||||
default_get_sd, /* get_sd */
|
||||
default_set_sd, /* set_sd */
|
||||
default_get_full_name, /* get_full_name */
|
||||
@@ -148,6 +149,16 @@ static void esync_dump( struct object *obj, int verbose )
|
||||
@@ -146,6 +147,16 @@ static void esync_dump( struct object *obj, int verbose )
|
||||
fprintf( stderr, "esync fd=%d\n", esync->fd );
|
||||
}
|
||||
|
||||
@@ -46,5 +46,5 @@ index 1703608263f..20f149cdad3 100644
|
||||
{
|
||||
struct esync *esync = (struct esync *)obj;
|
||||
--
|
||||
2.28.0
|
||||
2.38.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 505384ad65984c3fc18c1c1a7b1fd39ecd0186f1 Mon Sep 17 00:00:00 2001
|
||||
From 07694655cf43e87ffc6185a5e7fe8d1bdd8658a4 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 13 Jun 2018 23:32:04 -0500
|
||||
Subject: [PATCH] kernel32/tests: Add some mutex tests.
|
||||
@@ -8,11 +8,11 @@ Subject: [PATCH] kernel32/tests: Add some mutex tests.
|
||||
1 file changed, 94 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c
|
||||
index ea54cb069df..790b7bfe797 100644
|
||||
index bc85126d9aa..491052d5593 100644
|
||||
--- a/dlls/kernel32/tests/sync.c
|
||||
+++ b/dlls/kernel32/tests/sync.c
|
||||
@@ -177,8 +177,23 @@ static void test_signalandwait(void)
|
||||
CloseHandle(file);
|
||||
@@ -227,8 +227,23 @@ static void test_temporary_objects(void)
|
||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
|
||||
}
|
||||
|
||||
+static HANDLE mutex, mutex2, mutices[2];
|
||||
@@ -35,7 +35,7 @@ index ea54cb069df..790b7bfe797 100644
|
||||
DWORD wait_ret;
|
||||
BOOL ret;
|
||||
HANDLE hCreated;
|
||||
@@ -289,6 +304,85 @@ todo_wine_if(getenv("WINEESYNC")) /* XFAIL: due to the above */
|
||||
@@ -339,6 +354,85 @@ todo_wine_if(getenv("WINEESYNC")) /* XFAIL: due to the above */
|
||||
CloseHandle(hOpened);
|
||||
|
||||
CloseHandle(hCreated);
|
||||
@@ -122,5 +122,5 @@ index ea54cb069df..790b7bfe797 100644
|
||||
|
||||
static void test_slist(void)
|
||||
--
|
||||
2.28.0
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From a791c331b23e717a5f6c0397e4c290e8e8abd2f2 Mon Sep 17 00:00:00 2001
|
||||
From 9829e3c307e8019a3a2b9204d1133833863da5f1 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sat, 7 Jul 2018 12:57:47 +0200
|
||||
Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
|
||||
@@ -11,10 +11,10 @@ Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
|
||||
3 files changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 880a5037925..c6db8d13265 100644
|
||||
index 6a1b89b0e54..8ba704344cf 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -102,6 +102,7 @@
|
||||
@@ -97,6 +97,7 @@
|
||||
#include "handle.h"
|
||||
#include "process.h"
|
||||
#include "request.h"
|
||||
@@ -22,7 +22,7 @@ index 880a5037925..c6db8d13265 100644
|
||||
|
||||
#include "winternl.h"
|
||||
#include "winioctl.h"
|
||||
@@ -205,6 +206,7 @@ struct fd
|
||||
@@ -198,6 +199,7 @@ struct fd
|
||||
struct completion *completion; /* completion object attached to this fd */
|
||||
apc_param_t comp_key; /* completion key to set in completion events */
|
||||
unsigned int comp_flags; /* completion flags */
|
||||
@@ -30,8 +30,8 @@ index 880a5037925..c6db8d13265 100644
|
||||
};
|
||||
|
||||
static void fd_dump( struct object *obj, int verbose );
|
||||
@@ -1606,6 +1608,9 @@ static void fd_destroy( struct object *obj )
|
||||
free( fd->unlink_name );
|
||||
@@ -1668,6 +1670,9 @@ static void fd_destroy( struct object *obj )
|
||||
if (fd->unix_fd != -1) close( fd->unix_fd );
|
||||
free( fd->unix_name );
|
||||
}
|
||||
+
|
||||
@@ -40,7 +40,7 @@ index 880a5037925..c6db8d13265 100644
|
||||
}
|
||||
|
||||
/* check if the desired access is possible without violating */
|
||||
@@ -1723,6 +1728,7 @@ static struct fd *alloc_fd_object(void)
|
||||
@@ -1784,6 +1789,7 @@ static struct fd *alloc_fd_object(void)
|
||||
fd->poll_index = -1;
|
||||
fd->completion = NULL;
|
||||
fd->comp_flags = 0;
|
||||
@@ -48,7 +48,7 @@ index 880a5037925..c6db8d13265 100644
|
||||
init_async_queue( &fd->read_q );
|
||||
init_async_queue( &fd->write_q );
|
||||
init_async_queue( &fd->wait_q );
|
||||
@@ -1763,11 +1769,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
@@ -1823,11 +1829,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
fd->completion = NULL;
|
||||
fd->comp_flags = 0;
|
||||
fd->no_fd_status = STATUS_BAD_DEVICE_TYPE;
|
||||
@@ -64,7 +64,7 @@ index 880a5037925..c6db8d13265 100644
|
||||
return fd;
|
||||
}
|
||||
|
||||
@@ -2293,6 +2303,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
|
||||
@@ -2268,6 +2278,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
|
||||
if (fd->comp_flags & FILE_SKIP_SET_EVENT_ON_HANDLE) return;
|
||||
fd->signaled = signaled;
|
||||
if (signaled) wake_up( fd->user, 0 );
|
||||
@@ -74,7 +74,7 @@ index 880a5037925..c6db8d13265 100644
|
||||
}
|
||||
|
||||
/* check if events are pending and if yes return which one(s) */
|
||||
@@ -2318,6 +2331,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
@@ -2293,6 +2306,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ index 880a5037925..c6db8d13265 100644
|
||||
{
|
||||
int events = 0;
|
||||
diff --git a/server/file.h b/server/file.h
|
||||
index 80f2191c050..224048a4292 100644
|
||||
index 0ffe0e2c8dc..b5b1e2a1077 100644
|
||||
--- a/server/file.h
|
||||
+++ b/server/file.h
|
||||
@@ -106,6 +106,7 @@ extern char *dup_fd_name( struct fd *root, const char *name );
|
||||
@@ -103,7 +103,7 @@ index 80f2191c050..224048a4292 100644
|
||||
extern void default_poll_event( struct fd *fd, int event );
|
||||
extern void fd_cancel_async( struct fd *fd, struct async *async );
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index 6b4401810dc..27f4497bfe2 100644
|
||||
index b8ec17a787a..e01b28f725a 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -168,7 +168,7 @@ static const struct object_ops pipe_server_ops =
|
||||
@@ -125,5 +125,5 @@ index 6b4401810dc..27f4497bfe2 100644
|
||||
no_signal, /* signal */
|
||||
pipe_end_get_fd, /* get_fd */
|
||||
--
|
||||
2.33.0
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From cc964cf26e79a89fb3d7345847a23d93368e3eed Mon Sep 17 00:00:00 2001
|
||||
From c4a4d47fb07faee6ef6d20b967e21eafe6a60ea4 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 9 Jul 2019 14:13:28 +1000
|
||||
Subject: [PATCH] user32: Do not enumerate the registry in
|
||||
@@ -13,10 +13,10 @@ not the complete list from the registry.
|
||||
3 files changed, 36 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
|
||||
index 06756b5551e..99abab38ccf 100644
|
||||
index bb7477ed482..55ab8d246e7 100644
|
||||
--- a/dlls/user32/input.c
|
||||
+++ b/dlls/user32/input.c
|
||||
@@ -521,7 +521,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
|
||||
@@ -494,7 +494,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ index 06756b5551e..99abab38ccf 100644
|
||||
* EnableMouseInPointer (USER32.@)
|
||||
*/
|
||||
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
|
||||
index 8b84a39d009..d7520459c6d 100644
|
||||
index 8477645fad5..e92548c7402 100644
|
||||
--- a/dlls/user32/tests/input.c
|
||||
+++ b/dlls/user32/tests/input.c
|
||||
@@ -4481,6 +4481,40 @@ static void test_SendInput(void)
|
||||
@@ -4566,6 +4566,40 @@ static void test_SendInput(void)
|
||||
DestroyWindow( hwnd );
|
||||
}
|
||||
|
||||
@@ -69,19 +69,19 @@ index 8b84a39d009..d7520459c6d 100644
|
||||
START_TEST(input)
|
||||
{
|
||||
char **argv;
|
||||
@@ -4523,6 +4557,7 @@ START_TEST(input)
|
||||
@@ -4608,6 +4642,7 @@ START_TEST(input)
|
||||
test_GetRawInputBuffer();
|
||||
test_RegisterRawInputDevices();
|
||||
test_rawinput(argv[0]);
|
||||
+ test_GetKeyboardLayoutList();
|
||||
test_DefRawInputProc();
|
||||
|
||||
if(pGetMouseMovePointsEx)
|
||||
test_GetMouseMovePointsEx(argv[0]);
|
||||
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
|
||||
index 28fc5a918c8..24782e405a7 100644
|
||||
index f3b724e7010..a971e1ee776 100644
|
||||
--- a/dlls/win32u/input.c
|
||||
+++ b/dlls/win32u/input.c
|
||||
@@ -933,11 +933,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
@@ -934,11 +934,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
*/
|
||||
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
{
|
||||
@@ -94,7 +94,7 @@ index 28fc5a918c8..24782e405a7 100644
|
||||
HKL layout;
|
||||
|
||||
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
|
||||
@@ -951,33 +947,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
@@ -952,33 +948,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
if (size && layouts)
|
||||
{
|
||||
layouts[count - 1] = layout;
|
||||
@@ -129,5 +129,5 @@ index 28fc5a918c8..24782e405a7 100644
|
||||
|
||||
return count;
|
||||
--
|
||||
2.34.1
|
||||
2.37.2
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user