From 78204c282f5766ce0a1d1a234b4db90cabfd40ea Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 23 Aug 2015 00:59:52 +0200 Subject: [PATCH] Added patch to return a valid mesh in D3DXCreateTeapot. --- README.md | 3 ++- debian/changelog | 1 + ...36-Return-a-mesh-in-D3DXCreateTeapot.patch | 26 +++++++++++++++++++ patches/d3dx9_36-D3DXCreateTeapot/definition | 1 + patches/patchinstall.sh | 19 ++++++++++++++ 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 patches/d3dx9_36-D3DXCreateTeapot/0001-d3dx9_36-Return-a-mesh-in-D3DXCreateTeapot.patch create mode 100644 patches/d3dx9_36-D3DXCreateTeapot/definition diff --git a/README.md b/README.md index 577b9527..c38fabc9 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [16]:** +**Bug fixes and features included in the next upcoming release [17]:** * Add IDragSourceHelper stub interface ([Wine Bug #24699](https://bugs.winehq.org/show_bug.cgi?id=24699)) * Catch invalid memory accesses in imagehlp.CheckSumMappedFile @@ -55,6 +55,7 @@ Included bug fixes and improvements * Properly implement imagehlp.ImageLoad and ImageUnload * Report correct ObjectName for NamedPipe wineserver objects * Return STATUS_OBJECT_NAME_INVALID in wine_nt_to_unix_file_name for paths that only contain a prefix ([Wine Bug #39133](https://bugs.winehq.org/show_bug.cgi?id=39133)) +* Return a valid mesh in D3DXCreateTeapot ([Wine Bug #36884](https://bugs.winehq.org/show_bug.cgi?id=36884)) * Set EOF on file which has a memory mapping should fail * Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject ([Wine Bug #39127](https://bugs.winehq.org/show_bug.cgi?id=39127)) diff --git a/debian/changelog b/debian/changelog index fae73f89..d43e50b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,6 +31,7 @@ wine-staging (1.7.50) UNRELEASED; urgency=low * Added patch to return STATUS_OBJECT_NAME_INVALID in wine_nt_to_unix_file_name for paths that only contain a prefix. * Added patch to make sure Notepad creates new files immediately. + * Added patch to return a valid mesh in D3DXCreateTeapot. * Removed patch to move security cookie initialization from memory management to loader (accepted upstream). * Removed patches for stub of D3DCompileFromFile and D3DCompile2 (accepted diff --git a/patches/d3dx9_36-D3DXCreateTeapot/0001-d3dx9_36-Return-a-mesh-in-D3DXCreateTeapot.patch b/patches/d3dx9_36-D3DXCreateTeapot/0001-d3dx9_36-Return-a-mesh-in-D3DXCreateTeapot.patch new file mode 100644 index 00000000..0d03d023 --- /dev/null +++ b/patches/d3dx9_36-D3DXCreateTeapot/0001-d3dx9_36-Return-a-mesh-in-D3DXCreateTeapot.patch @@ -0,0 +1,26 @@ +From 34607775675c9475973fd249b8a68a59935b0391 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Thu, 30 Jul 2015 11:57:28 +1000 +Subject: d3dx9_36: Return a mesh in D3DXCreateTeapot + +Fixes https://bugs.winehq.org/show_bug.cgi?id=36884 +--- + dlls/d3dx9_36/mesh.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c +index 39d279d..59e385e4 100644 +--- a/dlls/d3dx9_36/mesh.c ++++ b/dlls/d3dx9_36/mesh.c +@@ -5153,7 +5153,7 @@ HRESULT WINAPI D3DXCreateTeapot(struct IDirect3DDevice9 *device, + { + FIXME("(%p, %p, %p): stub\n", device, mesh, adjacency); + +- return E_NOTIMPL; ++ return D3DXCreateSphere(device, 1.0f, 4, 4, mesh, adjacency); + } + + HRESULT WINAPI D3DXCreateTextA(struct IDirect3DDevice9 *device, HDC hdc, const char *text, float deviation, +-- +2.5.0 + diff --git a/patches/d3dx9_36-D3DXCreateTeapot/definition b/patches/d3dx9_36-D3DXCreateTeapot/definition new file mode 100644 index 00000000..36d71ea1 --- /dev/null +++ b/patches/d3dx9_36-D3DXCreateTeapot/definition @@ -0,0 +1 @@ +Fixes: [36884] Return a valid mesh in D3DXCreateTeapot diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 9efb4ed1..0ca1761e 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -97,6 +97,7 @@ patch_enable_all () enable_d3dx9_33_Share_Source="$1" enable_d3dx9_36_AnimationController="$1" enable_d3dx9_36_CloneEffect="$1" + enable_d3dx9_36_D3DXCreateTeapot="$1" enable_d3dx9_36_D3DXStubs="$1" enable_d3dx9_36_DDS="$1" enable_d3dx9_36_DXTn="$1" @@ -382,6 +383,9 @@ patch_enable () d3dx9_36-CloneEffect) enable_d3dx9_36_CloneEffect="$2" ;; + d3dx9_36-D3DXCreateTeapot) + enable_d3dx9_36_D3DXCreateTeapot="$2" + ;; d3dx9_36-D3DXStubs) enable_d3dx9_36_D3DXStubs="$2" ;; @@ -2493,6 +2497,21 @@ if test "$enable_d3dx9_36_CloneEffect" -eq 1; then ) >> "$patchlist" fi +# Patchset d3dx9_36-D3DXCreateTeapot +# | +# | This patchset fixes the following Wine bugs: +# | * [#36884] Return a valid mesh in D3DXCreateTeapot +# | +# | Modified files: +# | * dlls/d3dx9_36/mesh.c +# | +if test "$enable_d3dx9_36_D3DXCreateTeapot" -eq 1; then + patch_apply d3dx9_36-D3DXCreateTeapot/0001-d3dx9_36-Return-a-mesh-in-D3DXCreateTeapot.patch + ( + echo '+ { "Alistair Leslie-Hughes", "d3dx9_36: Return a mesh in D3DXCreateTeapot.", 1 },'; + ) >> "$patchlist" +fi + # Patchset d3dx9_36-DDS # | # | This patchset fixes the following Wine bugs: