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
157 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
8a7297ab71 | ||
|
8937409359 | ||
|
0a970828aa | ||
|
dc27f103e5 | ||
|
d1bde95011 | ||
|
90d6184697 | ||
|
d10f51a658 | ||
|
bad4d30c2c | ||
|
3a1f2a42bb | ||
|
3aca66f24e | ||
|
32c64aa429 | ||
|
ffc4a7a5a0 | ||
|
13c3e61937 | ||
|
c5281120df | ||
|
18941e7959 | ||
|
8581775098 | ||
|
f912827a38 | ||
|
d269579b4b | ||
|
cc4bced66e | ||
|
ab806dce36 | ||
|
2f85e74399 | ||
|
d007ef33ee | ||
|
c3db92d75d | ||
|
d8881486da | ||
|
8c90eb42eb | ||
|
da453ddf66 | ||
|
6c3797b3e8 | ||
|
3d15623eaf | ||
|
bf51996097 | ||
|
8a5220955b | ||
|
5088fc67ba | ||
|
a16b6b9c1e | ||
|
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 | ||
|
8699d2c2f6 | ||
|
e7622edfc9 | ||
|
c9652a68e1 | ||
|
6be691c005 | ||
|
850b7f6540 | ||
|
776c47da46 | ||
|
a51c679f34 | ||
|
366a9020dc | ||
|
a8e56928ef | ||
|
f0e38f512c | ||
|
3d9f724967 | ||
|
4e4376778f | ||
|
94e31f7578 | ||
|
560db77d41 | ||
|
2d5e6b24dc | ||
|
37c1363814 | ||
|
94f00cd958 | ||
|
b22c061c3f | ||
|
0e42f8ce9a | ||
|
f2c44a8a4d | ||
|
8f0f175429 | ||
|
3fe7d402eb | ||
|
7fc2d64fee | ||
|
c6119e3d5c | ||
|
8ee2551c93 | ||
|
f0d1a4a5ba | ||
|
2a411514e5 | ||
|
6ea30a2e5b | ||
|
e31ff0a923 | ||
|
e534d6546a | ||
|
ea360c871f |
69
.github/workflows/macOS.yml
vendored
69
.github/workflows/macOS.yml
vendored
@@ -14,12 +14,11 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install --cask xquartz
|
||||
brew install bison \
|
||||
gphoto2 \
|
||||
gst-plugins-base \
|
||||
gcenx/wine/mingw-w64@9 \
|
||||
mingw-w64 \
|
||||
molten-vk \
|
||||
sdl2
|
||||
|
||||
@@ -28,7 +27,6 @@ jobs:
|
||||
set -eu
|
||||
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
|
||||
echo "$(brew --prefix krb5)/bin" >> $GITHUB_PATH
|
||||
echo "$(brew --prefix mingw-w64@9)/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Get upstream-commit
|
||||
run: |
|
||||
@@ -62,71 +60,6 @@ jobs:
|
||||
--x-lib=/opt/X11/lib
|
||||
|
||||
- name: Build wine64
|
||||
# mingw-w64 brew formula bumped binutils 2.38 causing a regression in parallel builds
|
||||
# use gcenx/wine/mingw-w64@9 this uses binutils 2.37
|
||||
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 \
|
||||
faudio \
|
||||
gphoto2 \
|
||||
gst-plugins-base \
|
||||
jxrlib \
|
||||
little-cms2 \
|
||||
gcenx/wine/mingw-w64@9 \
|
||||
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
|
||||
echo "$(brew --prefix mingw-w64@9)/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
|
||||
# mingw-w64 brew formula bumped binutils 2.38 causing a regression in parallel builds
|
||||
# use gcenx/wine/mingw-w64@9 this uses binutils 2.37
|
||||
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 a0211ba2069af11a64588a49222dcdcce1d805be Mon Sep 17 00:00:00 2001
|
||||
From 4edf58f26172ec7f931eab57d14aca564d8b58e3 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 21:54:26 +0100
|
||||
Subject: [PATCH] d2d1: Avoid implicit cast of interface pointer.
|
||||
@@ -13,10 +13,10 @@ Subject: [PATCH] d2d1: Avoid implicit cast of interface pointer.
|
||||
6 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/d2d1/bitmap.c b/dlls/d2d1/bitmap.c
|
||||
index bc958e50a1..76ecc7f02a 100644
|
||||
index 1cba26f5ca4..df88fb70469 100644
|
||||
--- a/dlls/d2d1/bitmap.c
|
||||
+++ b/dlls/d2d1/bitmap.c
|
||||
@@ -617,5 +617,5 @@ struct d2d_bitmap *unsafe_impl_from_ID2D1Bitmap(ID2D1Bitmap *iface)
|
||||
@@ -762,5 +762,5 @@ struct d2d_bitmap *unsafe_impl_from_ID2D1Bitmap(ID2D1Bitmap *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (ID2D1BitmapVtbl *)&d2d_bitmap_vtbl);
|
||||
@@ -24,10 +24,10 @@ index bc958e50a1..76ecc7f02a 100644
|
||||
+ return CONTAINING_RECORD((ID2D1Bitmap1*)iface, struct d2d_bitmap, ID2D1Bitmap1_iface);
|
||||
}
|
||||
diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c
|
||||
index 80fc0f5331..a612e683b6 100644
|
||||
index 98aa889aa5f..52fc0a9854a 100644
|
||||
--- a/dlls/d2d1/brush.c
|
||||
+++ b/dlls/d2d1/brush.c
|
||||
@@ -253,7 +253,7 @@ static void d2d_brush_init(struct d2d_brush *brush, ID2D1Factory *factory,
|
||||
@@ -259,7 +259,7 @@ static void d2d_brush_init(struct d2d_brush *brush, ID2D1Factory *factory,
|
||||
|
||||
static inline struct d2d_brush *impl_from_ID2D1SolidColorBrush(ID2D1SolidColorBrush *iface)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ index 80fc0f5331..a612e683b6 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_solid_color_brush_QueryInterface(ID2D1SolidColorBrush *iface,
|
||||
@@ -396,7 +396,7 @@ HRESULT d2d_solid_color_brush_create(ID2D1Factory *factory, const D2D1_COLOR_F *
|
||||
@@ -402,7 +402,7 @@ HRESULT d2d_solid_color_brush_create(ID2D1Factory *factory, const D2D1_COLOR_F *
|
||||
|
||||
static inline struct d2d_brush *impl_from_ID2D1LinearGradientBrush(ID2D1LinearGradientBrush *iface)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ index 80fc0f5331..a612e683b6 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_linear_gradient_brush_QueryInterface(ID2D1LinearGradientBrush *iface,
|
||||
@@ -583,7 +583,7 @@ HRESULT d2d_linear_gradient_brush_create(ID2D1Factory *factory,
|
||||
@@ -589,7 +589,7 @@ HRESULT d2d_linear_gradient_brush_create(ID2D1Factory *factory,
|
||||
|
||||
static inline struct d2d_brush *impl_from_ID2D1RadialGradientBrush(ID2D1RadialGradientBrush *iface)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ index 80fc0f5331..a612e683b6 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_radial_gradient_brush_QueryInterface(ID2D1RadialGradientBrush *iface,
|
||||
@@ -815,7 +815,7 @@ HRESULT d2d_radial_gradient_brush_create(ID2D1Factory *factory,
|
||||
@@ -821,7 +821,7 @@ HRESULT d2d_radial_gradient_brush_create(ID2D1Factory *factory,
|
||||
|
||||
static inline struct d2d_brush *impl_from_ID2D1BitmapBrush1(ID2D1BitmapBrush1 *iface)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ index 80fc0f5331..a612e683b6 100644
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_bitmap_brush_QueryInterface(ID2D1BitmapBrush1 *iface,
|
||||
diff --git a/dlls/d2d1/dc_render_target.c b/dlls/d2d1/dc_render_target.c
|
||||
index 47aa99697d..0efa3ebeaf 100644
|
||||
index 30eafe361d1..0a38aa8613a 100644
|
||||
--- a/dlls/d2d1/dc_render_target.c
|
||||
+++ b/dlls/d2d1/dc_render_target.c
|
||||
@@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
@@ -77,19 +77,19 @@ index 47aa99697d..0efa3ebeaf 100644
|
||||
|
||||
static HRESULT d2d_dc_render_target_present(IUnknown *outer_unknown)
|
||||
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
|
||||
index 79850f1c20..b9b6a32f76 100644
|
||||
index d6ee91de005..781e9aa8511 100644
|
||||
--- a/dlls/d2d1/geometry.c
|
||||
+++ b/dlls/d2d1/geometry.c
|
||||
@@ -2982,7 +2982,7 @@ static const struct ID2D1GeometrySinkVtbl d2d_geometry_sink_vtbl =
|
||||
@@ -3360,7 +3360,7 @@ static const struct ID2D1GeometrySinkVtbl d2d_geometry_sink_vtbl =
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1PathGeometry(ID2D1PathGeometry *iface)
|
||||
static inline struct d2d_geometry *impl_from_ID2D1PathGeometry1(ID2D1PathGeometry1 *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, struct d2d_geometry, ID2D1Geometry_iface);
|
||||
+ return CONTAINING_RECORD((ID2D1Geometry *)iface, struct d2d_geometry, ID2D1Geometry_iface);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_path_geometry_QueryInterface(ID2D1PathGeometry *iface, REFIID iid, void **out)
|
||||
@@ -3502,7 +3502,7 @@ void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factor
|
||||
static HRESULT STDMETHODCALLTYPE d2d_path_geometry_QueryInterface(ID2D1PathGeometry1 *iface, REFIID iid, void **out)
|
||||
@@ -4233,7 +4233,7 @@ fail:
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1RectangleGeometry(ID2D1RectangleGeometry *iface)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ index 79850f1c20..b9b6a32f76 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_QueryInterface(ID2D1RectangleGeometry *iface,
|
||||
@@ -3841,7 +3841,7 @@ fail:
|
||||
@@ -4945,7 +4945,7 @@ fail:
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1TransformedGeometry(ID2D1TransformedGeometry *iface)
|
||||
{
|
||||
@@ -107,7 +107,7 @@ index 79850f1c20..b9b6a32f76 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_QueryInterface(ID2D1TransformedGeometry *iface,
|
||||
@@ -4122,7 +4122,7 @@ void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2
|
||||
@@ -5229,7 +5229,7 @@ void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1GeometryGroup(ID2D1GeometryGroup *iface)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ index 79850f1c20..b9b6a32f76 100644
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_geometry_group_QueryInterface(ID2D1GeometryGroup *iface,
|
||||
diff --git a/dlls/d2d1/hwnd_render_target.c b/dlls/d2d1/hwnd_render_target.c
|
||||
index 625f101eaa..f3626c42ce 100644
|
||||
index 4d3fe43a1b3..ccb7067fabf 100644
|
||||
--- a/dlls/d2d1/hwnd_render_target.c
|
||||
+++ b/dlls/d2d1/hwnd_render_target.c
|
||||
@@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
@@ -130,16 +130,16 @@ index 625f101eaa..f3626c42ce 100644
|
||||
|
||||
static HRESULT d2d_hwnd_render_target_present(IUnknown *outer_unknown)
|
||||
diff --git a/dlls/d2d1/state_block.c b/dlls/d2d1/state_block.c
|
||||
index e3175146a6..b66752983e 100644
|
||||
index 770c165fd90..a3b48095436 100644
|
||||
--- a/dlls/d2d1/state_block.c
|
||||
+++ b/dlls/d2d1/state_block.c
|
||||
@@ -187,5 +187,5 @@ struct d2d_state_block *unsafe_impl_from_ID2D1DrawingStateBlock(ID2D1DrawingStat
|
||||
if (!iface)
|
||||
@@ -191,5 +191,5 @@ struct d2d_state_block *unsafe_impl_from_ID2D1DrawingStateBlock(ID2D1DrawingStat
|
||||
WARN("Unexpected state block vtbl %p.\n", iface->lpVtbl);
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (ID2D1DrawingStateBlockVtbl *)&d2d_state_block_vtbl);
|
||||
}
|
||||
- return CONTAINING_RECORD(iface, struct d2d_state_block, ID2D1DrawingStateBlock1_iface);
|
||||
+ return CONTAINING_RECORD((ID2D1DrawingStateBlock1*)iface, struct d2d_state_block, ID2D1DrawingStateBlock1_iface);
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
2.38.1
|
||||
|
||||
|
@@ -67,7 +67,7 @@ index cacb7ea7751..19a807c1624 100644
|
||||
- Note: Launching internal wine processes cannot specify a full path to exe */
|
||||
- status = CreateProcessW(thisDir,
|
||||
- command, NULL, NULL, TRUE, 0, NULL, NULL, &st, &pe);
|
||||
- heap_free(st.lpReserved2);
|
||||
- free(st.lpReserved2);
|
||||
- if ((opt_c || opt_k) && !opt_s && !status
|
||||
- && GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') {
|
||||
- /* strip first and last quote WCHARacters and try again */
|
||||
@@ -143,7 +143,7 @@ index cacb7ea7751..19a807c1624 100644
|
||||
+ WINE_TRACE("Launching via CreateProcess\n");
|
||||
+ status = CreateProcessW(thisDir,
|
||||
+ command, NULL, NULL, TRUE, 0, NULL, NULL, &st, &pe);
|
||||
+ heap_free(st.lpReserved2);
|
||||
+ free(st.lpReserved2);
|
||||
+ if ((opt_c || opt_k) && !opt_s && !status
|
||||
+ && GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') {
|
||||
+ /* strip first and last quote WCHARacters and try again */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From c88a1acf9ac625cb2a7cbfc90ac3bb2d426889a0 Mon Sep 17 00:00:00 2001
|
||||
From 7362e037e8160046fffcf062a663ea8e7ac45290 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 12 Nov 2019 18:13:20 +0800
|
||||
Subject: [PATCH] comctl32: Bump version to 6.0.
|
||||
@@ -14,10 +14,10 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
|
||||
index 66b341ae5ad..1af9baea7ee 100644
|
||||
index 7dfdf089eb1..17ec7eeab40 100644
|
||||
--- a/dlls/comctl32/comctl32.h
|
||||
+++ b/dlls/comctl32/comctl32.h
|
||||
@@ -193,7 +193,7 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
@@ -194,7 +194,7 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
BOOL imagelist_has_alpha(HIMAGELIST, UINT) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -40,12 +40,12 @@ index c9aa1ba6253..be6e2425193 100644
|
||||
#define WINE_PRODUCTVERSION_STR WINE_FILEVERSION_STR
|
||||
|
||||
diff --git a/include/commctrl.h b/include/commctrl.h
|
||||
index dfd2f4a37d2..0784478ce14 100644
|
||||
index a54de13d8b2..e0b0e22d4dc 100644
|
||||
--- a/include/commctrl.h
|
||||
+++ b/include/commctrl.h
|
||||
@@ -51,7 +51,7 @@ enum _LI_METRIC
|
||||
HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE, const WCHAR *, int, int, HICON *);
|
||||
HRESULT WINAPI LoadIconMetric(HINSTANCE, const WCHAR *, int, HICON *);
|
||||
@@ -59,7 +59,7 @@ enum _LI_METRIC
|
||||
WINCOMMCTRLAPI HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE, const WCHAR *, int, int, HICON *);
|
||||
WINCOMMCTRLAPI HRESULT WINAPI LoadIconMetric(HINSTANCE, const WCHAR *, int, HICON *);
|
||||
|
||||
-#define COMCTL32_VERSION 5 /* dll version */
|
||||
+#define COMCTL32_VERSION 6 /* dll version */
|
||||
@@ -53,5 +53,5 @@ index dfd2f4a37d2..0784478ce14 100644
|
||||
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
||||
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
||||
--
|
||||
2.25.1
|
||||
2.35.1
|
||||
|
||||
|
@@ -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,76 +0,0 @@
|
||||
From 9ea60091ba885b5f63266374f49f0d63e2cf2767 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 16 Dec 2020 11:07:05 +1100
|
||||
Subject: [PATCH] d3drm: Support IDirect3D3 when creating device
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39346
|
||||
---
|
||||
dlls/d3drm/device.c | 26 ++++++++++++++++++++++++--
|
||||
1 file changed, 24 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3drm/device.c b/dlls/d3drm/device.c
|
||||
index 2e1b5f2d24f..fff272197bf 100644
|
||||
--- a/dlls/d3drm/device.c
|
||||
+++ b/dlls/d3drm/device.c
|
||||
@@ -124,7 +124,9 @@ HRESULT d3drm_device_init(struct d3drm_device *device, UINT version, IDirectDraw
|
||||
IDirectDrawSurface *ds = NULL;
|
||||
IDirect3DDevice *device1 = NULL;
|
||||
IDirect3DDevice2 *device2 = NULL;
|
||||
+ IDirect3DDevice3 *device3 = NULL;
|
||||
IDirect3D2 *d3d2 = NULL;
|
||||
+ IDirect3D3 *d3d3 = NULL;
|
||||
DDSURFACEDESC desc, surface_desc;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -171,19 +173,29 @@ HRESULT d3drm_device_init(struct d3drm_device *device, UINT version, IDirectDraw
|
||||
|
||||
if (version == 1)
|
||||
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DRGBDevice, (void **)&device1);
|
||||
- else
|
||||
+ else if (version == 2)
|
||||
{
|
||||
IDirectDraw_QueryInterface(ddraw, &IID_IDirect3D2, (void**)&d3d2);
|
||||
hr = IDirect3D2_CreateDevice(d3d2, &IID_IDirect3DRGBDevice, surface, &device2);
|
||||
IDirect3D2_Release(d3d2);
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ IDirectDrawSurface4 *surface4 = NULL;
|
||||
+
|
||||
+ IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface4, (void**)&surface4);
|
||||
+ IDirectDraw_QueryInterface(ddraw, &IID_IDirect3D3, (void**)&d3d3);
|
||||
+ hr = IDirect3D3_CreateDevice(d3d3, &IID_IDirect3DRGBDevice, surface4, &device3, NULL);
|
||||
+ IDirectDrawSurface4_Release(surface4);
|
||||
+ IDirect3D3_Release(d3d3);
|
||||
+ }
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds);
|
||||
return hr;
|
||||
}
|
||||
|
||||
- if (version != 1)
|
||||
+ if (version == 2)
|
||||
{
|
||||
hr = IDirect3DDevice2_QueryInterface(device2, &IID_IDirect3DDevice, (void**)&device1);
|
||||
IDirect3DDevice2_Release(device2);
|
||||
@@ -193,6 +205,16 @@ HRESULT d3drm_device_init(struct d3drm_device *device, UINT version, IDirectDraw
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
+ else if (version == 3)
|
||||
+ {
|
||||
+ hr = IDirect3DDevice3_QueryInterface(device3, &IID_IDirect3DDevice, (void**)&device1);
|
||||
+ IDirect3DDevice3_Release(device3);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds);
|
||||
+ return hr;
|
||||
+ }
|
||||
+ }
|
||||
device->device = device1;
|
||||
device->width = desc.dwWidth;
|
||||
device->height = desc.dwHeight;
|
||||
--
|
||||
2.29.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [39346] Support IDirect3D3 when creating device.
|
@@ -1,7 +1,7 @@
|
||||
From cfbee3f0f952769dbf663489c2a209493c7412d3 Mon Sep 17 00:00:00 2001
|
||||
From 5d9d9cbdb4043848aa5ebdd8a1349d9c876650e3 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 11 Jan 2015 16:18:03 +0100
|
||||
Subject: d3dx9_36: Add support for FOURCC surface to
|
||||
Subject: [PATCH] d3dx9_36: Add support for FOURCC surface to
|
||||
save_dds_surface_to_memory.
|
||||
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Subject: d3dx9_36: Add support for FOURCC surface to
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index 4fa2a76..58b676d 100644
|
||||
index 26809a47e18..db334ee83f1 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -311,6 +311,14 @@ static HRESULT d3dformat_to_dds_pixel_format(struct dds_pixel_format *pixel_form
|
||||
@@ -433,6 +433,14 @@ static HRESULT d3dformat_to_dds_pixel_format(struct dds_pixel_format *pixel_form
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ index 4fa2a76..58b676d 100644
|
||||
+ return D3D_OK;
|
||||
+ }
|
||||
+
|
||||
WARN("Unknown pixel format %#x\n", d3dformat);
|
||||
WARN("Unknown pixel format %#x.\n", d3dformat);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
--
|
||||
2.6.4
|
||||
2.35.1
|
||||
|
||||
|
@@ -1,16 +1,16 @@
|
||||
From 33e4e3219056f09ed8b406d154b87bafedb1ebe0 Mon Sep 17 00:00:00 2001
|
||||
From 7ba5e4a89be15deeb704078ad8321c7cc5aa02eb Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Mon, 22 Jul 2013 21:51:20 +0200
|
||||
Subject: d3dx9_36: Implement ID3DXSkinInfoImpl_UpdateSkinnedMesh.
|
||||
Subject: [PATCH] d3dx9_36: Implement ID3DXSkinInfoImpl_UpdateSkinnedMesh.
|
||||
|
||||
This patch fixes last problem of bug 32572.
|
||||
---
|
||||
dlls/d3dx9_36/skin.c | 86 ++++++++++++++++++++++++++++++++++++++++++++--
|
||||
dlls/d3dx9_36/tests/mesh.c | 83 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/skin.c | 86 ++++++++++++++++++++++++++++++++++++--
|
||||
dlls/d3dx9_36/tests/mesh.c | 83 ++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 166 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/skin.c b/dlls/d3dx9_36/skin.c
|
||||
index aa5acf2..bd7e581 100644
|
||||
index b81fb6863d3..75ee6d44a95 100644
|
||||
--- a/dlls/d3dx9_36/skin.c
|
||||
+++ b/dlls/d3dx9_36/skin.c
|
||||
@@ -2,6 +2,7 @@
|
||||
@@ -21,7 +21,7 @@ index aa5acf2..bd7e581 100644
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -375,10 +376,89 @@ static HRESULT WINAPI d3dx9_skin_info_GetDeclaration(ID3DXSkinInfo *iface,
|
||||
@@ -399,10 +400,89 @@ static HRESULT WINAPI d3dx9_skin_info_GetDeclaration(ID3DXSkinInfo *iface,
|
||||
static HRESULT WINAPI d3dx9_skin_info_UpdateSkinnedMesh(ID3DXSkinInfo *iface, const D3DXMATRIX *bone_transforms,
|
||||
const D3DXMATRIX *bone_inv_transpose_transforms, const void *src_vertices, void *dst_vertices)
|
||||
{
|
||||
@@ -115,11 +115,11 @@ index aa5acf2..bd7e581 100644
|
||||
|
||||
static HRESULT WINAPI d3dx9_skin_info_ConvertToBlendedMesh(ID3DXSkinInfo *iface, ID3DXMesh *mesh_in,
|
||||
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
|
||||
index 17c5d9c..e255eac 100644
|
||||
index 1daec158a5f..64b02276843 100644
|
||||
--- a/dlls/d3dx9_36/tests/mesh.c
|
||||
+++ b/dlls/d3dx9_36/tests/mesh.c
|
||||
@@ -5152,6 +5152,88 @@ static void test_create_skin_info(void)
|
||||
ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr);
|
||||
@@ -5241,6 +5241,88 @@ static void test_create_skin_info(void)
|
||||
ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr);
|
||||
}
|
||||
|
||||
+static void test_update_skinned_mesh(void)
|
||||
@@ -207,7 +207,7 @@ index 17c5d9c..e255eac 100644
|
||||
static void test_convert_adjacency_to_point_reps(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
@@ -10468,6 +10550,7 @@ START_TEST(mesh)
|
||||
@@ -11484,6 +11566,7 @@ START_TEST(mesh)
|
||||
D3DXGenerateAdjacencyTest();
|
||||
test_update_semantics();
|
||||
test_create_skin_info();
|
||||
@@ -216,5 +216,5 @@ index 17c5d9c..e255eac 100644
|
||||
test_convert_point_reps_to_adjacency();
|
||||
test_weld_vertices();
|
||||
--
|
||||
2.1.2
|
||||
2.38.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,4 +1,4 @@
|
||||
From 415ededb3cceae15cb05a1860cef1d4e5e055b27 Mon Sep 17 00:00:00 2001
|
||||
From 5d29a2de174042ce7bdd52d92337591933e0f761 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Harmstone <mark@harmstone.com>
|
||||
Date: Fri, 27 Mar 2015 20:58:37 +0000
|
||||
Subject: [PATCH] dsound: Add EAX init and free stubs.
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] dsound: Add EAX init and free stubs.
|
||||
3 files changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
|
||||
index 6bbf468d136..e27fdfdecc4 100644
|
||||
index e8b3fb4a832..28f2e95994e 100644
|
||||
--- a/dlls/dsound/buffer.c
|
||||
+++ b/dlls/dsound/buffer.c
|
||||
@@ -1110,6 +1110,8 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
|
||||
@@ -1153,6 +1153,8 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
|
||||
DSOUND_RecalcVolPan(&(dsb->volpan));
|
||||
|
||||
InitializeSRWLock(&dsb->lock);
|
||||
@@ -22,20 +22,20 @@ index 6bbf468d136..e27fdfdecc4 100644
|
||||
|
||||
/* register buffer */
|
||||
err = DirectSoundDevice_AddBuffer(device, dsb);
|
||||
@@ -1150,6 +1152,8 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
|
||||
@@ -1194,6 +1196,8 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
|
||||
HeapFree(GetProcessHeap(), 0, This->filters);
|
||||
}
|
||||
|
||||
+ free_eax_buffer(This);
|
||||
+
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
TRACE("(%p) released\n", This);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
|
||||
index 3b4c4f290a4..8dbb9edb594 100644
|
||||
index 267b2c044bc..c906eb2adb1 100644
|
||||
--- a/dlls/dsound/dsound_private.h
|
||||
+++ b/dlls/dsound/dsound_private.h
|
||||
@@ -234,6 +234,8 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
@@ -240,6 +240,8 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData,
|
||||
ULONG cbPropData) DECLSPEC_HIDDEN;
|
||||
@@ -45,7 +45,7 @@ index 3b4c4f290a4..8dbb9edb594 100644
|
||||
/* mixer.c */
|
||||
void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
|
||||
index 3931681d295..c0afb0f1acf 100644
|
||||
index 03b6e0a9813..91438efc335 100644
|
||||
--- a/dlls/dsound/eax.c
|
||||
+++ b/dlls/dsound/eax.c
|
||||
@@ -92,20 +92,46 @@ static const EFXEAXREVERBPROPERTIES efx_presets[] = {
|
||||
@@ -97,5 +97,5 @@ index 3931681d295..c0afb0f1acf 100644
|
||||
|
||||
HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
--
|
||||
2.27.0
|
||||
2.35.1
|
||||
|
||||
|
@@ -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.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user