You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Compare commits
63 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
317665ee20 | ||
|
3d1b6a4bc0 | ||
|
e33772ec34 | ||
|
342cfbc5de | ||
|
91b4afcd38 | ||
|
5f55fc20dc | ||
|
3714d05e91 | ||
|
39778538c2 | ||
|
0c15cda214 | ||
|
858b0697d2 | ||
|
0394bb10be | ||
|
e004127f41 | ||
|
5cba568c93 | ||
|
e2610f8a45 | ||
|
e250393ba4 | ||
|
ce66dea197 | ||
|
7cd95e9f79 | ||
|
c605cf204a | ||
|
a8f798fc3c | ||
|
a8a6d7b0ed | ||
|
f09ef9a3ca | ||
|
a877872a9a | ||
|
e2390e2637 | ||
|
999c6a11d6 | ||
|
dde6218e4e | ||
|
6336965159 | ||
|
18084e82a7 | ||
|
89d2f58ebd | ||
|
1db546cd7e | ||
|
5e73b4fe8b | ||
|
54295e8aaa | ||
|
b09545bc48 | ||
|
8c98aa0c22 | ||
|
31cab243e7 | ||
|
caa47e6c73 | ||
|
d102a32693 | ||
|
784382204b | ||
|
3e94d12465 | ||
|
f102154244 | ||
|
26c1f46d89 | ||
|
8dd91084bf | ||
|
e232cccc6a | ||
|
2ed03c4ed0 | ||
|
5054f7359b | ||
|
7db26cf727 | ||
|
1d80a4ba4e | ||
|
5cc4d90333 | ||
|
a044166651 | ||
|
c37f9f5091 | ||
|
b3f1bf0856 | ||
|
4de57fff29 | ||
|
52ba925f90 | ||
|
cc517dd949 | ||
|
a9be5cf2b0 | ||
|
df97d6c328 | ||
|
b4006fc038 | ||
|
d1cc8d0fa5 | ||
|
ef72380f02 | ||
|
1b2e959b75 | ||
|
31a37e3f3c | ||
|
a3738434e0 | ||
|
554a64f6b3 | ||
|
7f2c4b8613 |
@@ -1,4 +1,4 @@
|
||||
From 3dc4a148d7c91afea8f589f47daca82c5c27b7c1 Mon Sep 17 00:00:00 2001
|
||||
From efd5485d5026fceb01c7a25bb47a780505adea68 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:44:31 +0200
|
||||
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 74eb1b7f500..95639558155 100644
|
||||
index c20d6a5d87b..717f321bc6e 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -43,6 +43,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
@@ -20,7 +20,7 @@ index 74eb1b7f500..95639558155 100644
|
||||
|
||||
#ifdef _WIN64
|
||||
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
|
||||
@@ -3870,6 +3871,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
@@ -3879,6 +3880,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
process_detach();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ index 74eb1b7f500..95639558155 100644
|
||||
|
||||
/******************************************************************
|
||||
* RtlExitUserProcess (NTDLL.@)
|
||||
@@ -4366,6 +4368,9 @@ static void release_address_space(void)
|
||||
@@ -4388,6 +4390,9 @@ static void release_address_space(void)
|
||||
*/
|
||||
void loader_init( CONTEXT *context, void **entry )
|
||||
{
|
||||
@@ -38,9 +38,9 @@ index 74eb1b7f500..95639558155 100644
|
||||
static int attach_done;
|
||||
NTSTATUS status;
|
||||
ULONG_PTR cookie, port = 0;
|
||||
@@ -4455,6 +4460,20 @@ void loader_init( CONTEXT *context, void **entry )
|
||||
arm64ec_thread_init();
|
||||
#endif
|
||||
@@ -4485,6 +4490,20 @@ void loader_init( CONTEXT *context, void **entry )
|
||||
}
|
||||
|
||||
wm = get_modref( NtCurrentTeb()->Peb->ImageBaseAddress );
|
||||
+ /* This hunk occasionally applies in the wrong place;
|
||||
+ * add a comment here to try to prevent that. */
|
||||
@@ -60,5 +60,5 @@ index 74eb1b7f500..95639558155 100644
|
||||
|
||||
NtCurrentTeb()->FlsSlots = fls_alloc_data();
|
||||
--
|
||||
2.47.2
|
||||
2.51.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 8aa6fb73e3142d86ba354c204313b8a74a5fa43d Mon Sep 17 00:00:00 2001
|
||||
From fb422ad56e3549e81d3b60afc77b0a0c6a56f672 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:53:46 +0200
|
||||
Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f86a5decb07..3d7f9cc96e6 100644
|
||||
index b4ede761391..ea6bd2fae3c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3910,7 +3910,7 @@ dnl Rules for generated source files
|
||||
@@ -3728,7 +3728,7 @@ dnl Rules for generated source files
|
||||
|
||||
WINE_APPEND_RULE(
|
||||
[dlls/ntdll/unix/version.c: dummy
|
||||
@@ -19,7 +19,7 @@ index f86a5decb07..3d7f9cc96e6 100644
|
||||
+ @version=\`(GIT_DIR=${wine_srcdir}.git git describe HEAD 2>/dev/null || echo \"wine-\$(PACKAGE_VERSION)\") | sed -n -e '\$\$s/\(.*\)/const char wine_build[[]] = \"\\1 (Staging)\";/p'\` && (echo \$\$version | cmp -s - \$[@]) || echo \$\$version >\$[@] || (rm -f \$[@] && exit 1)
|
||||
programs/winetest/build.rc: dummy
|
||||
@build=\"STRINGTABLE { 1 \\\"\`GIT_DIR=${wine_srcdir}.git git rev-parse HEAD 2>/dev/null\`\\\" }\" && (echo \$\$build | cmp -s - \$[@]) || echo \$\$build >\$[@] || (rm -f \$[@] && exit 1)
|
||||
programs/winetest/build.nfo:
|
||||
dlls/wineandroid.drv/wine-debug.apk: dlls/wineandroid.drv/build.gradle ${wine_srcdir}dlls/wineandroid.drv/AndroidManifest.xml ${wine_srcdir}dlls/wineandroid.drv/WineActivity.java ${wine_srcdir}dlls/wineandroid.drv/wine.svg
|
||||
--
|
||||
2.33.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f9f5002e4ce6417dd196d53b50c51a3b224015d3 Mon Sep 17 00:00:00 2001
|
||||
From 9cf09446b0bf5da7988d1ba30c24d392c7a01f4b 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.
|
||||
@@ -8,39 +8,25 @@ and refuses to run, changing DLL version to 6.0 makes it run.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/comctl32/comctl32.h | 2 +-
|
||||
dlls/comctl32/comctl32.rc | 2 +-
|
||||
include/commctrl.h | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
|
||||
index 51f4337add2..3fe8905abea 100644
|
||||
--- a/dlls/comctl32/comctl32.h
|
||||
+++ b/dlls/comctl32/comctl32.h
|
||||
@@ -194,7 +194,7 @@ BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc);
|
||||
BOOL Str_SetPtrWtoA(LPSTR *lppDest, LPCWSTR lpSrc);
|
||||
BOOL imagelist_has_alpha(HIMAGELIST, UINT);
|
||||
|
||||
-#define COMCTL32_VERSION_MINOR 81
|
||||
+#define COMCTL32_VERSION_MINOR 0
|
||||
|
||||
/* Our internal stack structure of the window procedures to subclass */
|
||||
typedef struct _SUBCLASSPROCS {
|
||||
diff --git a/dlls/comctl32/comctl32.rc b/dlls/comctl32/comctl32.rc
|
||||
index c9aa1ba6253..be6e2425193 100644
|
||||
index 2c62dbe2720..473de211c67 100644
|
||||
--- a/dlls/comctl32/comctl32.rc
|
||||
+++ b/dlls/comctl32/comctl32.rc
|
||||
@@ -114,7 +114,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
@@ -113,7 +113,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
#define WINE_FILEDESCRIPTION_STR "Wine Common Controls"
|
||||
#define WINE_FILENAME_STR "comctl32.dll"
|
||||
#define WINE_FILEVERSION COMCTL32_VERSION, COMCTL32_VERSION_MINOR, 4704, 1100
|
||||
-#define WINE_FILEVERSION_STR "5.81"
|
||||
+#define WINE_FILEVERSION_STR "6.00.4704.1100"
|
||||
#define WINE_PRODUCTVERSION WINE_FILEVERSION
|
||||
#define WINE_PRODUCTVERSION_STR WINE_FILEVERSION_STR
|
||||
-#define WINE_FILEVERSION COMCTL32_VERSION,81,4704,1100
|
||||
+#define WINE_FILEVERSION COMCTL32_VERSION,0,4704,1100
|
||||
|
||||
#include "wine/wine_common_ver.rc"
|
||||
|
||||
diff --git a/include/commctrl.h b/include/commctrl.h
|
||||
index a54de13d8b2..e0b0e22d4dc 100644
|
||||
index 235704a76dd..5a67c1284a0 100644
|
||||
--- a/include/commctrl.h
|
||||
+++ b/include/commctrl.h
|
||||
@@ -59,7 +59,7 @@ enum _LI_METRIC
|
||||
@@ -53,5 +39,5 @@ index a54de13d8b2..e0b0e22d4dc 100644
|
||||
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
||||
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
||||
--
|
||||
2.40.1
|
||||
2.47.2
|
||||
|
||||
|
@@ -0,0 +1,24 @@
|
||||
From 8a9c55d23750ca2650eba518e46549d8b5d94b43 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 11 Jul 2025 14:11:36 +1000
|
||||
Subject: [PATCH] comctl32: Animate support AVI msvc codex
|
||||
|
||||
---
|
||||
dlls/comctl32/animate.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
|
||||
index 46e1e37b72d..717422c784f 100644
|
||||
--- a/dlls/comctl32/animate.c
|
||||
+++ b/dlls/comctl32/animate.c
|
||||
@@ -644,6 +644,7 @@ static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
|
||||
/* check uncompressed AVI */
|
||||
if ((infoPtr->ash.fccHandler == mmioFOURCC('D', 'I', 'B', ' ')) ||
|
||||
(infoPtr->ash.fccHandler == mmioFOURCC('R', 'L', 'E', ' ')) ||
|
||||
+ (infoPtr->ash.fccHandler == mmioFOURCC('m', 's', 'v', 'c')) ||
|
||||
(infoPtr->ash.fccHandler == mmioFOURCC(0, 0, 0, 0)))
|
||||
{
|
||||
infoPtr->hic = 0;
|
||||
--
|
||||
2.47.2
|
||||
|
@@ -0,0 +1,24 @@
|
||||
From b8cce6663a956f8fb8f07700672e378b44b1af1c Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 11 Jul 2025 15:21:07 +1000
|
||||
Subject: [PATCH] comctl32: Animate to support RLE8 codex
|
||||
|
||||
---
|
||||
dlls/comctl32/animate.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
|
||||
index 717422c784f..ca4fae85a11 100644
|
||||
--- a/dlls/comctl32/animate.c
|
||||
+++ b/dlls/comctl32/animate.c
|
||||
@@ -645,6 +645,7 @@ static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
|
||||
if ((infoPtr->ash.fccHandler == mmioFOURCC('D', 'I', 'B', ' ')) ||
|
||||
(infoPtr->ash.fccHandler == mmioFOURCC('R', 'L', 'E', ' ')) ||
|
||||
(infoPtr->ash.fccHandler == mmioFOURCC('m', 's', 'v', 'c')) ||
|
||||
+ (infoPtr->ash.fccHandler == mmioFOURCC('m', 'r', 'l', 'e')) ||
|
||||
(infoPtr->ash.fccHandler == mmioFOURCC(0, 0, 0, 0)))
|
||||
{
|
||||
infoPtr->hic = 0;
|
||||
--
|
||||
2.47.2
|
||||
|
@@ -0,0 +1,119 @@
|
||||
From 2ef9715ae9fffa0a6d7cdf0dc04e8de7eb245ce4 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 11 Jul 2025 18:07:39 +1000
|
||||
Subject: [PATCH] comctl32: Animate control doesn't support compressed AVI
|
||||
|
||||
The Animate control only supporst uncompress AVI with the excpetion of RLE8.
|
||||
---
|
||||
dlls/comctl32/animate.c | 64 ++---------------------------------------
|
||||
1 file changed, 3 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
|
||||
index ca4fae85a11..74516db81f5 100644
|
||||
--- a/dlls/comctl32/animate.c
|
||||
+++ b/dlls/comctl32/animate.c
|
||||
@@ -39,14 +39,6 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(animate);
|
||||
|
||||
-static struct {
|
||||
- HMODULE hModule;
|
||||
- HIC (WINAPI *fnICOpen)(DWORD, DWORD, UINT);
|
||||
- LRESULT (WINAPI *fnICClose)(HIC);
|
||||
- LRESULT (WINAPI *fnICSendMessage)(HIC, UINT, DWORD_PTR, DWORD_PTR);
|
||||
- DWORD (WINAPIV *fnICDecompress)(HIC,DWORD,LPBITMAPINFOHEADER,LPVOID,LPBITMAPINFOHEADER,LPVOID);
|
||||
-} fnIC;
|
||||
-
|
||||
typedef struct
|
||||
{
|
||||
/* reference to input stream (file or resource) */
|
||||
@@ -189,11 +181,6 @@ static void ANIMATE_Free(ANIMATE_INFO *infoPtr)
|
||||
}
|
||||
Free (infoPtr->lpIndex);
|
||||
infoPtr->lpIndex = NULL;
|
||||
- if (infoPtr->hic)
|
||||
- {
|
||||
- fnIC.fnICClose(infoPtr->hic);
|
||||
- infoPtr->hic = 0;
|
||||
- }
|
||||
Free (infoPtr->inbih);
|
||||
infoPtr->inbih = NULL;
|
||||
Free (infoPtr->outbih);
|
||||
@@ -342,13 +329,6 @@ static BOOL ANIMATE_DrawFrame(ANIMATE_INFO *infoPtr, HDC hDC)
|
||||
mmioSeek(infoPtr->hMMio, infoPtr->lpIndex[infoPtr->currFrame], SEEK_SET);
|
||||
mmioRead(infoPtr->hMMio, infoPtr->indata, infoPtr->ash.dwSuggestedBufferSize);
|
||||
|
||||
- if (infoPtr->hic &&
|
||||
- fnIC.fnICDecompress(infoPtr->hic, 0, infoPtr->inbih, infoPtr->indata,
|
||||
- infoPtr->outbih, infoPtr->outdata) != ICERR_OK) {
|
||||
- WARN("Decompression error\n");
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
ANIMATE_PaintFrame(infoPtr, hDC);
|
||||
|
||||
if (infoPtr->currFrame++ >= infoPtr->nToFrame) {
|
||||
@@ -649,39 +629,12 @@ static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
|
||||
(infoPtr->ash.fccHandler == mmioFOURCC(0, 0, 0, 0)))
|
||||
{
|
||||
infoPtr->hic = 0;
|
||||
- return TRUE;
|
||||
- }
|
||||
-
|
||||
- /* try to get a decompressor for that type */
|
||||
- infoPtr->hic = fnIC.fnICOpen(ICTYPE_VIDEO, infoPtr->ash.fccHandler, ICMODE_DECOMPRESS);
|
||||
- if (!infoPtr->hic) {
|
||||
- WARN("Can't load codec for the file\n");
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
- outSize = fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
|
||||
- (DWORD_PTR)infoPtr->inbih, 0L);
|
||||
-
|
||||
- if (!(infoPtr->outbih = Alloc(outSize)))
|
||||
- return FALSE;
|
||||
-
|
||||
- if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
|
||||
- (DWORD_PTR)infoPtr->inbih, (DWORD_PTR)infoPtr->outbih) != ICERR_OK)
|
||||
- {
|
||||
- WARN("Can't get output BIH\n");
|
||||
- return FALSE;
|
||||
+ return TRUE;
|
||||
}
|
||||
|
||||
- if (!(infoPtr->outdata = Alloc(infoPtr->outbih->biSizeImage)))
|
||||
- return FALSE;
|
||||
+ FIXME("Unsupported %s\n", debugstr_fourcc(infoPtr->ash.fccHandler));
|
||||
|
||||
- if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_BEGIN,
|
||||
- (DWORD_PTR)infoPtr->inbih, (DWORD_PTR)infoPtr->outbih) != ICERR_OK) {
|
||||
- WARN("Can't begin decompression\n");
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
- return TRUE;
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -790,17 +743,6 @@ static BOOL ANIMATE_Create(HWND hWnd, const CREATESTRUCTW *lpcs)
|
||||
{
|
||||
ANIMATE_INFO *infoPtr;
|
||||
|
||||
- if (!fnIC.hModule)
|
||||
- {
|
||||
- fnIC.hModule = LoadLibraryW(L"msvfw32.dll");
|
||||
- if (!fnIC.hModule) return FALSE;
|
||||
-
|
||||
- fnIC.fnICOpen = (void*)GetProcAddress(fnIC.hModule, "ICOpen");
|
||||
- fnIC.fnICClose = (void*)GetProcAddress(fnIC.hModule, "ICClose");
|
||||
- fnIC.fnICSendMessage = (void*)GetProcAddress(fnIC.hModule, "ICSendMessage");
|
||||
- fnIC.fnICDecompress = (void*)GetProcAddress(fnIC.hModule, "ICDecompress");
|
||||
- }
|
||||
-
|
||||
/* allocate memory for info structure */
|
||||
infoPtr = Alloc(sizeof(*infoPtr));
|
||||
if (!infoPtr) return FALSE;
|
||||
--
|
||||
2.47.2
|
||||
|
2
patches/comctl32_animate_avi/definition
Normal file
2
patches/comctl32_animate_avi/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: [52278] comctl32: Animate support AVI msvc codex.
|
||||
|
@@ -1,245 +0,0 @@
|
||||
From 0fbce9fe4b69f27b7df82c6517c364aab57de63b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 30 Jul 2021 15:57:29 +1000
|
||||
Subject: [PATCH 1/2] d3dx11_43: Implement D3DX11GetImageInfoFromMemory
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50210
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx11_42/Makefile.in | 1 +
|
||||
dlls/d3dx11_43/Makefile.in | 1 +
|
||||
dlls/d3dx11_43/main.c | 9 --
|
||||
dlls/d3dx11_43/texture.c | 167 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 169 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_42/Makefile.in b/dlls/d3dx11_42/Makefile.in
|
||||
index 7fcce18a8e1..78ca5f707a7 100644
|
||||
--- a/dlls/d3dx11_42/Makefile.in
|
||||
+++ b/dlls/d3dx11_42/Makefile.in
|
||||
@@ -2,6 +2,7 @@ EXTRADEFS = -DD3DX11_SDK_VERSION=42
|
||||
MODULE = d3dx11_42.dll
|
||||
IMPORTLIB = d3dx11_42
|
||||
IMPORTS = d3dcompiler
|
||||
+DELAYIMPORTS = windowscodecs
|
||||
PARENTSRC = ../d3dx11_43
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
diff --git a/dlls/d3dx11_43/Makefile.in b/dlls/d3dx11_43/Makefile.in
|
||||
index ccd4319ace2..6854c73ebcb 100644
|
||||
--- a/dlls/d3dx11_43/Makefile.in
|
||||
+++ b/dlls/d3dx11_43/Makefile.in
|
||||
@@ -2,6 +2,7 @@ EXTRADEFS = -DD3DX11_SDK_VERSION=43
|
||||
MODULE = d3dx11_43.dll
|
||||
IMPORTLIB = d3dx11
|
||||
IMPORTS = d3dcompiler
|
||||
+DELAYIMPORTS = windowscodecs
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/d3dx11_43/main.c b/dlls/d3dx11_43/main.c
|
||||
index 5dad027864f..00c1db35e42 100644
|
||||
--- a/dlls/d3dx11_43/main.c
|
||||
+++ b/dlls/d3dx11_43/main.c
|
||||
@@ -66,12 +66,3 @@ HRESULT WINAPI D3DX11GetImageInfoFromFileW(const WCHAR *filename, ID3DX11ThreadP
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
-
|
||||
-HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
- D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
-{
|
||||
- FIXME("src_data %p, src_data_size %Iu, pump %p, img_info %p, hresult %p stub!\n",
|
||||
- src_data, src_data_size, pump, img_info, hresult);
|
||||
-
|
||||
- return E_NOTIMPL;
|
||||
-}
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 81ac8ee6db7..bbf937cdab0 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -15,14 +15,181 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
+#define COBJMACROS
|
||||
|
||||
#include "d3dx11.h"
|
||||
#include "d3dcompiler.h"
|
||||
+#include "wincodec.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
+HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT sdk_version, IWICImagingFactory **imaging_factory);
|
||||
+
|
||||
+static const struct
|
||||
+{
|
||||
+ const GUID *wic_container_guid;
|
||||
+ D3DX11_IMAGE_FILE_FORMAT d3dx_file_format;
|
||||
+}
|
||||
+file_formats[] =
|
||||
+{
|
||||
+ { &GUID_ContainerFormatBmp, D3DX11_IFF_BMP },
|
||||
+ { &GUID_ContainerFormatJpeg, D3DX11_IFF_JPG },
|
||||
+ { &GUID_ContainerFormatPng, D3DX11_IFF_PNG },
|
||||
+ { &GUID_ContainerFormatDds, D3DX11_IFF_DDS },
|
||||
+ { &GUID_ContainerFormatTiff, D3DX11_IFF_TIFF },
|
||||
+ { &GUID_ContainerFormatGif, D3DX11_IFF_GIF },
|
||||
+ { &GUID_ContainerFormatWmp, D3DX11_IFF_WMP },
|
||||
+};
|
||||
+
|
||||
+static D3DX11_IMAGE_FILE_FORMAT wic_container_guid_to_file_format(GUID *container_format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(file_formats); ++i)
|
||||
+ {
|
||||
+ if (IsEqualGUID(file_formats[i].wic_container_guid, container_format))
|
||||
+ return file_formats[i].d3dx_file_format;
|
||||
+ }
|
||||
+ return D3DX11_IFF_FORCE_DWORD;
|
||||
+}
|
||||
+
|
||||
+static D3D11_RESOURCE_DIMENSION wic_dimension_to_d3dx11_dimension(WICDdsDimension wic_dimension)
|
||||
+{
|
||||
+ switch (wic_dimension)
|
||||
+ {
|
||||
+ case WICDdsTexture1D:
|
||||
+ return D3D11_RESOURCE_DIMENSION_TEXTURE1D;
|
||||
+ case WICDdsTexture2D:
|
||||
+ case WICDdsTextureCube:
|
||||
+ return D3D11_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
+ case WICDdsTexture3D:
|
||||
+ return D3D11_RESOURCE_DIMENSION_TEXTURE3D;
|
||||
+ default:
|
||||
+ return D3D11_RESOURCE_DIMENSION_UNKNOWN;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const DXGI_FORMAT to_be_converted_format[] =
|
||||
+{
|
||||
+ DXGI_FORMAT_UNKNOWN,
|
||||
+ DXGI_FORMAT_R8_UNORM,
|
||||
+ DXGI_FORMAT_R8G8_UNORM,
|
||||
+ DXGI_FORMAT_B5G6R5_UNORM,
|
||||
+ DXGI_FORMAT_B4G4R4A4_UNORM,
|
||||
+ DXGI_FORMAT_B5G5R5A1_UNORM,
|
||||
+ DXGI_FORMAT_B8G8R8X8_UNORM,
|
||||
+ DXGI_FORMAT_B8G8R8A8_UNORM
|
||||
+};
|
||||
+
|
||||
+static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(to_be_converted_format); ++i)
|
||||
+ {
|
||||
+ if (format == to_be_converted_format[i])
|
||||
+ return DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
+ }
|
||||
+ return format;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
+ D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
+{
|
||||
+ IWICImagingFactory *factory = NULL;
|
||||
+ IWICDdsDecoder *dds_decoder = NULL;
|
||||
+ IWICBitmapDecoder *decoder = NULL;
|
||||
+ WICDdsParameters dds_params;
|
||||
+ IWICStream *stream = NULL;
|
||||
+ GUID container_format;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("src_data %p, src_data_size %Iu, pump %p, img_info %p, hresult %p.\n",
|
||||
+ src_data, src_data_size, pump, img_info, hresult);
|
||||
+
|
||||
+ if (!src_data || !src_data_size || !img_info)
|
||||
+ return E_FAIL;
|
||||
+ if (pump)
|
||||
+ FIXME("Thread pump is not supported yet.\n");
|
||||
+
|
||||
+ WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory);
|
||||
+ IWICImagingFactory_CreateStream(factory, &stream);
|
||||
+ hr = IWICStream_InitializeFromMemory(stream, (BYTE *)src_data, src_data_size);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ WARN("Failed to initialize stream.\n");
|
||||
+ goto end;
|
||||
+ }
|
||||
+ hr = IWICImagingFactory_CreateDecoderFromStream(factory, (IStream *)stream, NULL, 0, &decoder);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+
|
||||
+ hr = IWICBitmapDecoder_GetContainerFormat(decoder, &container_format);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ img_info->ImageFileFormat = wic_container_guid_to_file_format(&container_format);
|
||||
+ if (img_info->ImageFileFormat == D3DX11_IFF_FORCE_DWORD)
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ WARN("Unsupported image file format %s.\n", debugstr_guid(&container_format));
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ if (img_info->ImageFileFormat == D3DX11_IFF_DDS)
|
||||
+ {
|
||||
+ hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICDdsDecoder, (void **)&dds_decoder);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ hr = IWICDdsDecoder_GetParameters(dds_decoder, &dds_params);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ img_info->Width = dds_params.Width;
|
||||
+ img_info->Height = dds_params.Height;
|
||||
+ img_info->ArraySize = dds_params.ArraySize;
|
||||
+ img_info->Depth = dds_params.Depth;
|
||||
+ img_info->MipLevels = dds_params.MipLevels;
|
||||
+ img_info->ResourceDimension = wic_dimension_to_d3dx11_dimension(dds_params.Dimension);
|
||||
+ img_info->Format = get_d3dx11_dds_format(dds_params.DxgiFormat);
|
||||
+ img_info->MiscFlags = 0;
|
||||
+ if (dds_params.Dimension == WICDdsTextureCube)
|
||||
+ {
|
||||
+ img_info->MiscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE;
|
||||
+ img_info->ArraySize *= 6;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("Unsupported image format %d\n", img_info->ImageFileFormat);
|
||||
+ img_info->Width = 1;
|
||||
+ img_info->Height = 1;
|
||||
+ img_info->ArraySize = 1;
|
||||
+ img_info->Depth = 1;
|
||||
+ img_info->MipLevels = 1;
|
||||
+ img_info->ResourceDimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
+ img_info->Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
+ img_info->MiscFlags = 0;
|
||||
+ }
|
||||
+
|
||||
+end:
|
||||
+ if (dds_decoder)
|
||||
+ IWICDdsDecoder_Release(dds_decoder);
|
||||
+ if (decoder)
|
||||
+ IWICBitmapDecoder_Release(decoder);
|
||||
+ if (stream)
|
||||
+ IWICStream_Release(stream);
|
||||
+ if (factory)
|
||||
+ IWICImagingFactory_Release(factory);
|
||||
+
|
||||
+ if (hr != S_OK)
|
||||
+ {
|
||||
+ WARN("Invalid or unsupported image file.\n");
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
HRESULT WINAPI D3DX11CreateShaderResourceViewFromMemory(ID3D11Device *device, const void *data,
|
||||
SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
|
||||
ID3D11ShaderResourceView **view, HRESULT *hresult)
|
||||
--
|
||||
2.40.1
|
||||
|
@@ -1,56 +0,0 @@
|
||||
From 30d677139afe2af3f72c68ba11f1bbaead6f1c11 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 2 Aug 2023 08:24:11 +1000
|
||||
Subject: [PATCH] d3dx11_43: D3DX11GetImageInfoFromMemory - Only use frame for
|
||||
non DDS images
|
||||
|
||||
---
|
||||
dlls/d3dx11_43/texture.c | 18 +++++++++++++++---
|
||||
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 10dedf30c0f..f3f7d350131 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -295,6 +295,7 @@ static const GUID *dxgi_format_to_wic_guid(DXGI_FORMAT format)
|
||||
HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
{
|
||||
+ IWICBitmapFrameDecode *frame = NULL;
|
||||
IWICImagingFactory *factory = NULL;
|
||||
IWICDdsDecoder *dds_decoder = NULL;
|
||||
IWICBitmapDecoder *decoder = NULL;
|
||||
@@ -358,9 +359,18 @@ HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_dat
|
||||
}
|
||||
else
|
||||
{
|
||||
- FIXME("Unsupported image format %d\n", img_info->ImageFileFormat);
|
||||
- img_info->Width = 1;
|
||||
- img_info->Height = 1;
|
||||
+ unsigned int frame_count;
|
||||
+
|
||||
+ hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
|
||||
+ if (FAILED(hr) || !frame_count)
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapFrameDecode_GetSize(frame, &img_info->Width, &img_info->Height);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+
|
||||
img_info->ArraySize = 1;
|
||||
img_info->Depth = 1;
|
||||
img_info->MipLevels = 1;
|
||||
@@ -372,6 +382,8 @@ HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_dat
|
||||
end:
|
||||
if (dds_decoder)
|
||||
IWICDdsDecoder_Release(dds_decoder);
|
||||
+ if (frame)
|
||||
+ IWICBitmapFrameDecode_Release(frame);
|
||||
if (decoder)
|
||||
IWICBitmapDecoder_Release(decoder);
|
||||
if (stream)
|
||||
--
|
||||
2.40.1
|
||||
|
@@ -1,4 +1,3 @@
|
||||
Fixes: [50210] - Implement D3DX11GetImageInfoFromMemory
|
||||
Fixes: [45533] - Implement D3DX11CreateTextureFromMemory
|
||||
|
||||
# This patchset will need to wait until the new wined3dx dll implemented.
|
||||
Disabled: true
|
||||
|
@@ -0,0 +1,93 @@
|
||||
From 78fcd523dff585ce007405bd75d459aa2c4fb13a Mon Sep 17 00:00:00 2001
|
||||
From: Connor McAdams <cmcadams@codeweavers.com>
|
||||
Date: Wed, 3 Sep 2025 13:04:51 -0400
|
||||
Subject: [PATCH] d3dx9: Implement
|
||||
ID3DXAnimationController::RegisterAnimationSet().
|
||||
|
||||
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
|
||||
---
|
||||
dlls/d3dx9_36/animation.c | 34 ++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 32 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/animation.c b/dlls/d3dx9_36/animation.c
|
||||
index 8a38c05ed0c..1bb775bc44a 100644
|
||||
--- a/dlls/d3dx9_36/animation.c
|
||||
+++ b/dlls/d3dx9_36/animation.c
|
||||
@@ -29,8 +29,13 @@ struct d3dx9_animation_controller
|
||||
LONG ref;
|
||||
|
||||
UINT max_outputs;
|
||||
+
|
||||
+ ID3DXAnimationSet **animation_sets;
|
||||
+ UINT num_sets;
|
||||
UINT max_sets;
|
||||
+
|
||||
UINT max_tracks;
|
||||
+
|
||||
UINT max_events;
|
||||
};
|
||||
|
||||
@@ -75,6 +80,14 @@ static ULONG WINAPI d3dx9_animation_controller_Release(ID3DXAnimationController
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < animation->max_sets; i++)
|
||||
+ {
|
||||
+ if (animation->animation_sets[i])
|
||||
+ animation->animation_sets[i]->lpVtbl->Release(animation->animation_sets[i]);
|
||||
+ }
|
||||
+ free(animation->animation_sets);
|
||||
free(animation);
|
||||
}
|
||||
|
||||
@@ -129,9 +142,17 @@ static HRESULT WINAPI d3dx9_animation_controller_RegisterAnimationOutput(ID3DXAn
|
||||
static HRESULT WINAPI d3dx9_animation_controller_RegisterAnimationSet(ID3DXAnimationController *iface,
|
||||
ID3DXAnimationSet *anim_set)
|
||||
{
|
||||
+ struct d3dx9_animation_controller *animation = impl_from_ID3DXAnimationController(iface);
|
||||
+
|
||||
FIXME("iface %p, anim_set %p stub.\n", iface, anim_set);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if (!anim_set || animation->num_sets >= animation->max_sets)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ animation->animation_sets[animation->num_sets++] = anim_set;
|
||||
+ anim_set->lpVtbl->AddRef(anim_set);
|
||||
+
|
||||
+ return D3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3dx9_animation_controller_UnregisterAnimationSet(ID3DXAnimationController *iface,
|
||||
@@ -144,9 +165,11 @@ static HRESULT WINAPI d3dx9_animation_controller_UnregisterAnimationSet(ID3DXAni
|
||||
|
||||
static UINT WINAPI d3dx9_animation_controller_GetNumAnimationSets(ID3DXAnimationController *iface)
|
||||
{
|
||||
+ struct d3dx9_animation_controller *animation = impl_from_ID3DXAnimationController(iface);
|
||||
+
|
||||
FIXME("iface %p stub.\n", iface);
|
||||
|
||||
- return 0;
|
||||
+ return animation->num_sets;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3dx9_animation_controller_GetAnimationSet(ID3DXAnimationController *iface,
|
||||
@@ -459,6 +482,13 @@ HRESULT WINAPI D3DXCreateAnimationController(UINT max_outputs, UINT max_sets,
|
||||
object->ID3DXAnimationController_iface.lpVtbl = &d3dx9_animation_controller_vtbl;
|
||||
object->ref = 1;
|
||||
object->max_outputs = max_outputs;
|
||||
+
|
||||
+ object->animation_sets = calloc(max_sets, sizeof(*object->animation_sets));
|
||||
+ if (!object->animation_sets)
|
||||
+ {
|
||||
+ free(object);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
object->max_sets = max_sets;
|
||||
object->max_tracks = max_tracks;
|
||||
object->max_events = max_events;
|
||||
--
|
||||
2.50.1
|
||||
|
@@ -0,0 +1,85 @@
|
||||
From ee45504fb838a5e7bfeec350c6a7c5a318400c68 Mon Sep 17 00:00:00 2001
|
||||
From: Connor McAdams <cmcadams@codeweavers.com>
|
||||
Date: Wed, 3 Sep 2025 13:31:04 -0400
|
||||
Subject: [PATCH] d3dx9: Implement
|
||||
ID3DXAnimationController::{Get,Set}TrackDesc().
|
||||
|
||||
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
|
||||
---
|
||||
dlls/d3dx9_36/animation.c | 30 ++++++++++++++++++++++++++++--
|
||||
1 file changed, 28 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/animation.c b/dlls/d3dx9_36/animation.c
|
||||
index 1bb775bc44a..6ded652930a 100644
|
||||
--- a/dlls/d3dx9_36/animation.c
|
||||
+++ b/dlls/d3dx9_36/animation.c
|
||||
@@ -23,6 +23,11 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
+struct d3dx9_track
|
||||
+{
|
||||
+ D3DXTRACK_DESC desc;
|
||||
+};
|
||||
+
|
||||
struct d3dx9_animation_controller
|
||||
{
|
||||
ID3DXAnimationController ID3DXAnimationController_iface;
|
||||
@@ -34,6 +39,7 @@ struct d3dx9_animation_controller
|
||||
UINT num_sets;
|
||||
UINT max_sets;
|
||||
|
||||
+ struct d3dx9_track *tracks;
|
||||
UINT max_tracks;
|
||||
|
||||
UINT max_events;
|
||||
@@ -269,17 +275,29 @@ static HRESULT WINAPI d3dx9_animation_controller_SetTrackEnable(ID3DXAnimationCo
|
||||
static HRESULT WINAPI d3dx9_animation_controller_SetTrackDesc(ID3DXAnimationController *iface,
|
||||
UINT track, D3DXTRACK_DESC *desc)
|
||||
{
|
||||
+ struct d3dx9_animation_controller *animation = impl_from_ID3DXAnimationController(iface);
|
||||
+
|
||||
FIXME("iface %p, track %u, desc %p stub.\n", iface, track, desc);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if (track > animation->max_tracks || !desc)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ animation->tracks[track].desc = *desc;
|
||||
+ return D3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3dx9_animation_controller_GetTrackDesc(ID3DXAnimationController *iface,
|
||||
UINT track, D3DXTRACK_DESC *desc)
|
||||
{
|
||||
+ struct d3dx9_animation_controller *animation = impl_from_ID3DXAnimationController(iface);
|
||||
+
|
||||
FIXME("iface %p, track %u, desc %p stub.\n", iface, track, desc);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if (track > animation->max_tracks || !desc)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ *desc = animation->tracks[track].desc;
|
||||
+ return D3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3dx9_animation_controller_SetPriorityBlend(ID3DXAnimationController *iface,
|
||||
@@ -490,6 +508,14 @@ HRESULT WINAPI D3DXCreateAnimationController(UINT max_outputs, UINT max_sets,
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
object->max_sets = max_sets;
|
||||
+
|
||||
+ object->tracks = calloc(max_tracks, sizeof(*object->tracks));
|
||||
+ if (!object->tracks)
|
||||
+ {
|
||||
+ free(object->animation_sets);
|
||||
+ free(object);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
object->max_tracks = max_tracks;
|
||||
object->max_events = max_events;
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
@@ -0,0 +1,93 @@
|
||||
From fa933a9493c8b4a2e9626c1815bb5ef4309627b4 Mon Sep 17 00:00:00 2001
|
||||
From: Connor McAdams <cmcadams@codeweavers.com>
|
||||
Date: Wed, 3 Sep 2025 13:33:16 -0400
|
||||
Subject: [PATCH] d3dx9: Implement
|
||||
ID3DXAnimationController::{Get,Set}TrackAnimationSet().
|
||||
|
||||
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
|
||||
---
|
||||
dlls/d3dx9_36/animation.c | 38 ++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 36 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/animation.c b/dlls/d3dx9_36/animation.c
|
||||
index 6ded652930a..ccd16778c3e 100644
|
||||
--- a/dlls/d3dx9_36/animation.c
|
||||
+++ b/dlls/d3dx9_36/animation.c
|
||||
@@ -26,6 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
struct d3dx9_track
|
||||
{
|
||||
D3DXTRACK_DESC desc;
|
||||
+ int set_idx;
|
||||
};
|
||||
|
||||
struct d3dx9_animation_controller
|
||||
@@ -219,17 +220,47 @@ static double WINAPI d3dx9_animation_controller_GetTime(ID3DXAnimationController
|
||||
static HRESULT WINAPI d3dx9_animation_controller_SetTrackAnimationSet(ID3DXAnimationController *iface,
|
||||
UINT track, ID3DXAnimationSet *anim_set)
|
||||
{
|
||||
+ struct d3dx9_animation_controller *animation = impl_from_ID3DXAnimationController(iface);
|
||||
+ unsigned int i;
|
||||
+ int idx;
|
||||
+
|
||||
FIXME("iface %p, track %u, anim_set %p stub.\n", iface, track, anim_set);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if (track > animation->max_tracks || !anim_set || (animation->tracks[track].set_idx >= 0))
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ idx = -1;
|
||||
+ for (i = 0; i < animation->num_sets; i++)
|
||||
+ {
|
||||
+ if (animation->animation_sets[i] == anim_set)
|
||||
+ {
|
||||
+ idx = i;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ animation->tracks[track].set_idx = idx;
|
||||
+
|
||||
+ return idx >= 0 ? D3D_OK : D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3dx9_animation_controller_GetTrackAnimationSet(ID3DXAnimationController *iface,
|
||||
UINT track, ID3DXAnimationSet **anim_set)
|
||||
{
|
||||
+ struct d3dx9_animation_controller *animation = impl_from_ID3DXAnimationController(iface);
|
||||
+ int set_idx;
|
||||
+
|
||||
FIXME("iface %p, track %u, anim_set %p stub.\n", iface, track, anim_set);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ if (track > animation->max_tracks || !anim_set)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ set_idx = animation->tracks[track].set_idx;
|
||||
+ *anim_set = set_idx >= 0 ? animation->animation_sets[set_idx] : NULL;
|
||||
+
|
||||
+ if (*anim_set)
|
||||
+ (*anim_set)->lpVtbl->AddRef(*anim_set);
|
||||
+ return D3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3dx9_animation_controller_SetTrackPriority(ID3DXAnimationController *iface,
|
||||
@@ -486,6 +517,7 @@ HRESULT WINAPI D3DXCreateAnimationController(UINT max_outputs, UINT max_sets,
|
||||
UINT max_tracks, UINT max_events, ID3DXAnimationController **controller)
|
||||
{
|
||||
struct d3dx9_animation_controller *object;
|
||||
+ unsigned int i;
|
||||
|
||||
TRACE("max_outputs %u, max_sets %u, max_tracks %u, max_events %u, controller %p.\n",
|
||||
max_outputs, max_sets, max_tracks, max_events, controller);
|
||||
@@ -516,6 +548,8 @@ HRESULT WINAPI D3DXCreateAnimationController(UINT max_outputs, UINT max_sets,
|
||||
free(object);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
+ for (i = 0; i < max_tracks; ++i)
|
||||
+ object->tracks[i].set_idx = -1;
|
||||
object->max_tracks = max_tracks;
|
||||
object->max_events = max_events;
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
1
patches/d3dx9_animation_TrackDesc/definition
Normal file
1
patches/d3dx9_animation_TrackDesc/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [48598] d3dx9: Improve ID3DXAnimationController Animation set support.
|
@@ -1,4 +1,4 @@
|
||||
From 5f5cfac7099cf4e5be912f07a66665f8217f57f3 Mon Sep 17 00:00:00 2001
|
||||
From 50f9168ed92d261de21615b250dfac115160cc2e Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 17:17:31 -0500
|
||||
Subject: [PATCH] ntdll, server: Implement alertable waits.
|
||||
@@ -15,10 +15,10 @@ Subject: [PATCH] ntdll, server: Implement alertable waits.
|
||||
8 files changed, 109 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 2844f9f760c..aeeea1731ce 100644
|
||||
index f805af251bb..a80019b76dd 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -599,17 +599,42 @@ static void update_grabbed_object( struct esync *obj )
|
||||
@@ -601,17 +601,42 @@ static void update_grabbed_object( struct esync *obj )
|
||||
static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_any,
|
||||
BOOLEAN alertable, const LARGE_INTEGER *timeout )
|
||||
{
|
||||
@@ -62,7 +62,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
NtQuerySystemTime( &now );
|
||||
if (timeout)
|
||||
{
|
||||
@@ -648,6 +673,8 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
@@ -650,6 +675,8 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
|
||||
if (msgwait)
|
||||
TRACE(" or driver events");
|
||||
@@ -71,7 +71,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
|
||||
if (!timeout)
|
||||
TRACE(", timeout = INFINITE.\n");
|
||||
@@ -684,12 +711,27 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
@@ -686,12 +713,27 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
fds[i].fd = obj ? obj->fd : -1;
|
||||
fds[i].events = POLLIN;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
/* Find out which object triggered the wait. */
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
@@ -763,6 +805,14 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
@@ -765,6 +807,14 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
tryagain:
|
||||
/* First step: try to poll on each object in sequence. */
|
||||
fds[0].events = POLLIN;
|
||||
@@ -115,7 +115,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
struct esync *obj = objs[i];
|
||||
@@ -778,9 +828,11 @@ tryagain:
|
||||
@@ -780,9 +830,11 @@ tryagain:
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
|
||||
if (fds[0].revents & (POLLHUP | POLLERR | POLLNVAL))
|
||||
{
|
||||
@@ -796,10 +848,12 @@ tryagain:
|
||||
@@ -798,10 +850,12 @@ tryagain:
|
||||
fds[i].fd = objs[i] ? objs[i]->fd : -1;
|
||||
fds[i].events = POLLIN;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
{
|
||||
/* Quick, grab everything. */
|
||||
for (i = 0; i < count; i++)
|
||||
@@ -865,6 +919,19 @@ err:
|
||||
@@ -867,6 +921,19 @@ err:
|
||||
ERR("ppoll failed: %s\n", strerror(errno));
|
||||
return errno_to_status( errno );
|
||||
}
|
||||
@@ -164,22 +164,22 @@ index 2844f9f760c..aeeea1731ce 100644
|
||||
|
||||
/* We need to let the server know when we are doing a message wait, and when we
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index b278ab8df84..a3f0368b731 100644
|
||||
index b9043351d57..283fd7d7ff6 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -93,6 +93,7 @@ struct ntdll_thread_data
|
||||
{
|
||||
void *cpu_data[16]; /* reserved for CPU-specific data */
|
||||
void *kernel_stack; /* stack for thread startup and kernel syscalls */
|
||||
+ int esync_apc_fd; /* fd to wait on for user APCs */
|
||||
int request_fd; /* fd for sending server requests */
|
||||
int reply_fd; /* fd for receiving server replies */
|
||||
int wait_fd[2]; /* fd for sleeping server requests */
|
||||
@@ -105,6 +105,7 @@ struct ntdll_thread_data
|
||||
SYSTEM_SERVICE_TABLE *syscall_table; /* 214/0370 syscall table */
|
||||
struct syscall_frame *syscall_frame; /* 218/0378 current syscall frame */
|
||||
int syscall_trace; /* 21c/0380 syscall trace flag */
|
||||
+ int esync_apc_fd; /* fd to wait on for user APCs */
|
||||
int request_fd; /* fd for sending server requests */
|
||||
int reply_fd; /* fd for receiving server replies */
|
||||
int wait_fd[2]; /* fd for sleeping server requests */
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 2116b677adb..a7d0bb7e8c8 100644
|
||||
index c797c89952f..0778ad73984 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -3646,6 +3646,7 @@ static TEB *init_teb( void *ptr, BOOL is_wow )
|
||||
@@ -4014,6 +4014,7 @@ static TEB *init_teb( void *ptr, BOOL is_wow )
|
||||
teb->StaticUnicodeString.Buffer = teb->StaticUnicodeBuffer;
|
||||
teb->StaticUnicodeString.MaximumLength = sizeof(teb->StaticUnicodeBuffer);
|
||||
thread_data = (struct ntdll_thread_data *)&teb->GdiTebBatch;
|
||||
@@ -244,10 +244,10 @@ index 689d8569b73..e1588d205d9 100644
|
||||
void esync_clear( int fd );
|
||||
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 8c728080d05..3ea700054c6 100644
|
||||
index 807298b6bab..a2dcdd37204 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3935,3 +3935,7 @@ enum esync_type
|
||||
@@ -4148,3 +4148,7 @@ enum esync_type
|
||||
@REPLY
|
||||
int enable; /* previous state of auto-repeat enable */
|
||||
@END
|
||||
@@ -256,10 +256,10 @@ index 8c728080d05..3ea700054c6 100644
|
||||
+@REQ(get_esync_apc_fd)
|
||||
+@END
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index fd6b91b228a..8d7c520ced7 100644
|
||||
index 11c36e49ae4..3a771838a98 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -232,6 +232,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
@@ -400,6 +400,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
thread->teb = 0;
|
||||
thread->entry_point = 0;
|
||||
thread->esync_fd = -1;
|
||||
@@ -267,7 +267,7 @@ index fd6b91b228a..8d7c520ced7 100644
|
||||
thread->system_regs = 0;
|
||||
thread->queue = NULL;
|
||||
thread->wait = NULL;
|
||||
@@ -380,7 +381,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
@@ -550,7 +551,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
}
|
||||
|
||||
if (do_esync())
|
||||
@@ -278,7 +278,7 @@ index fd6b91b228a..8d7c520ced7 100644
|
||||
|
||||
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
|
||||
add_process_thread( thread->process, thread );
|
||||
@@ -1174,8 +1178,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
@@ -1384,8 +1388,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
grab_object( apc );
|
||||
list_add_tail( queue, &apc->entry );
|
||||
if (!list_prev( queue, &apc->entry )) /* first one */
|
||||
@@ -292,7 +292,7 @@ index fd6b91b228a..8d7c520ced7 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1221,6 +1230,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system
|
||||
@@ -1431,6 +1440,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system
|
||||
apc = LIST_ENTRY( ptr, struct thread_apc, entry );
|
||||
list_remove( ptr );
|
||||
}
|
||||
@@ -304,10 +304,10 @@ index fd6b91b228a..8d7c520ced7 100644
|
||||
}
|
||||
|
||||
diff --git a/server/thread.h b/server/thread.h
|
||||
index 9129e473ba9..10e9e28b432 100644
|
||||
index e826a7a25de..c320ac83af7 100644
|
||||
--- a/server/thread.h
|
||||
+++ b/server/thread.h
|
||||
@@ -56,6 +56,7 @@ struct thread
|
||||
@@ -57,6 +57,7 @@ struct thread
|
||||
thread_id_t id; /* thread id */
|
||||
struct list mutex_list; /* list of currently owned mutexes */
|
||||
int esync_fd; /* esync file descriptor (signalled on exit) */
|
||||
@@ -316,5 +316,5 @@ index 9129e473ba9..10e9e28b432 100644
|
||||
struct msg_queue *queue; /* message queue */
|
||||
struct thread_wait *wait; /* current wait condition if sleeping */
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 9829e3c307e8019a3a2b9204d1133833863da5f1 Mon Sep 17 00:00:00 2001
|
||||
From b4f92dd9311882607cedd7d247ddf3069ae33d8b 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 6a1b89b0e54..8ba704344cf 100644
|
||||
index 737f7ee67b9..01a055f8b2d 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -97,6 +97,7 @@
|
||||
@@ -95,6 +95,7 @@
|
||||
#include "handle.h"
|
||||
#include "process.h"
|
||||
#include "request.h"
|
||||
@@ -22,7 +22,7 @@ index 6a1b89b0e54..8ba704344cf 100644
|
||||
|
||||
#include "winternl.h"
|
||||
#include "winioctl.h"
|
||||
@@ -198,6 +199,7 @@ struct fd
|
||||
@@ -159,6 +160,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 */
|
||||
@@ -40,7 +40,7 @@ index 6a1b89b0e54..8ba704344cf 100644
|
||||
}
|
||||
|
||||
/* check if the desired access is possible without violating */
|
||||
@@ -1784,6 +1789,7 @@ static struct fd *alloc_fd_object(void)
|
||||
@@ -1786,6 +1791,7 @@ static struct fd *alloc_fd_object(void)
|
||||
fd->poll_index = -1;
|
||||
fd->completion = NULL;
|
||||
fd->comp_flags = 0;
|
||||
@@ -48,7 +48,7 @@ index 6a1b89b0e54..8ba704344cf 100644
|
||||
init_async_queue( &fd->read_q );
|
||||
init_async_queue( &fd->write_q );
|
||||
init_async_queue( &fd->wait_q );
|
||||
@@ -1823,11 +1829,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
@@ -1827,11 +1833,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 6a1b89b0e54..8ba704344cf 100644
|
||||
return fd;
|
||||
}
|
||||
|
||||
@@ -2268,6 +2278,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
|
||||
@@ -2283,6 +2293,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 6a1b89b0e54..8ba704344cf 100644
|
||||
}
|
||||
|
||||
/* check if events are pending and if yes return which one(s) */
|
||||
@@ -2293,6 +2306,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
@@ -2324,6 +2337,15 @@ WCHAR *default_fd_get_full_name( struct object *obj, data_size_t max, data_size_
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -91,19 +91,19 @@ index 6a1b89b0e54..8ba704344cf 100644
|
||||
{
|
||||
int events = 0;
|
||||
diff --git a/server/file.h b/server/file.h
|
||||
index 0ffe0e2c8dc..b5b1e2a1077 100644
|
||||
index 7742e705e49..d86a9fc159d 100644
|
||||
--- a/server/file.h
|
||||
+++ b/server/file.h
|
||||
@@ -106,6 +106,7 @@ extern char *dup_fd_name( struct fd *root, const char *name );
|
||||
extern void get_nt_name( struct fd *fd, struct unicode_str *name );
|
||||
@@ -110,6 +110,7 @@ extern void get_nt_name( struct fd *fd, struct unicode_str *name );
|
||||
|
||||
extern int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
extern WCHAR *default_fd_get_full_name( struct object *obj, data_size_t max, data_size_t *ret_len );
|
||||
+extern int default_fd_get_esync_fd( struct object *obj, enum esync_type *type );
|
||||
extern int default_fd_get_poll_events( struct fd *fd );
|
||||
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 b8ec17a787a..e01b28f725a 100644
|
||||
index cdb27ed45c0..d4f8cf5e964 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 b8ec17a787a..e01b28f725a 100644
|
||||
no_signal, /* signal */
|
||||
pipe_end_get_fd, /* get_fd */
|
||||
--
|
||||
2.35.1
|
||||
2.47.2
|
||||
|
||||
|
@@ -2,3 +2,4 @@ Fixes: [36692] Many multi-threaded applications have poor performance due to hea
|
||||
Depends: ntdll-Junction_Points
|
||||
Depends: server-PeekMessage
|
||||
Depends: server-Signal_Thread
|
||||
Disabled: True
|
||||
|
@@ -0,0 +1,36 @@
|
||||
From 764a3b19afc7519fa9568a402e094a944d56055c Mon Sep 17 00:00:00 2001
|
||||
From: Akihiro Sagawa <sagawa.aki@gmail.com>
|
||||
Date: Sun, 1 Jun 2025 15:42:40 +1000
|
||||
Subject: [PATCH] kernel32: Limit old exe to 3MB available space
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=44931
|
||||
---
|
||||
dlls/kernel32/heap.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c
|
||||
index 1ec2f5cce0d..834f4d07e9b 100644
|
||||
--- a/dlls/kernel32/heap.c
|
||||
+++ b/dlls/kernel32/heap.c
|
||||
@@ -475,12 +475,15 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
|
||||
if ( lpBuffer->dwAvailPhys + lpBuffer->dwAvailPageFile >= 2U*1024*1024*1024)
|
||||
lpBuffer->dwAvailPageFile = 2U*1024*1024*1024 - lpBuffer->dwAvailPhys - 1;
|
||||
|
||||
- /* limit page file size for really old binaries */
|
||||
+ /* limit value for really old binaries */
|
||||
+ /* use MAXLONG/2, so that dwAvailPhys + dwAvailPageFile < MAXLONG */
|
||||
if (nt->OptionalHeader.MajorSubsystemVersion < 4 ||
|
||||
nt->OptionalHeader.MajorOperatingSystemVersion < 4)
|
||||
{
|
||||
- if (lpBuffer->dwTotalPageFile > MAXLONG) lpBuffer->dwTotalPageFile = MAXLONG;
|
||||
- if (lpBuffer->dwAvailPageFile > MAXLONG) lpBuffer->dwAvailPageFile = MAXLONG;
|
||||
+ lpBuffer->dwTotalPhys = min(lpBuffer->dwTotalPhys, MAXLONG / 2);
|
||||
+ lpBuffer->dwAvailPhys = min(lpBuffer->dwAvailPhys, MAXLONG / 2);
|
||||
+ lpBuffer->dwTotalPageFile = min(lpBuffer->dwTotalPageFile, MAXLONG / 2);
|
||||
+ lpBuffer->dwAvailPageFile = min(lpBuffer->dwAvailPageFile, MAXLONG / 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
--
|
||||
2.47.2
|
||||
|
1
patches/kernel32-limit_heap_old_exe/definition
Normal file
1
patches/kernel32-limit_heap_old_exe/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [44931] kernel32: Limit old exe to 3MB available space
|
@@ -1,14 +1,14 @@
|
||||
From 05dfee93e261b38037c370611ab0f63a2785a08c Mon Sep 17 00:00:00 2001
|
||||
From 956a8db76088ebaa82e0093ab0e62ed1ed2aa69b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 27 Feb 2016 00:04:10 +0100
|
||||
Subject: [PATCH] krnl386.exe16: Emulate GDT and LDT access.
|
||||
|
||||
---
|
||||
dlls/krnl386.exe16/instr.c | 65 ++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 56 insertions(+), 9 deletions(-)
|
||||
dlls/krnl386.exe16/instr.c | 57 +++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 50 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/krnl386.exe16/instr.c b/dlls/krnl386.exe16/instr.c
|
||||
index 666ef71363f..c6d05b7a0c9 100644
|
||||
index 6af3ca30d59..bc05db6a719 100644
|
||||
--- a/dlls/krnl386.exe16/instr.c
|
||||
+++ b/dlls/krnl386.exe16/instr.c
|
||||
@@ -60,7 +60,8 @@ static inline void *get_stack( CONTEXT *context )
|
||||
@@ -21,7 +21,7 @@ index 666ef71363f..c6d05b7a0c9 100644
|
||||
{
|
||||
WORD limit;
|
||||
BYTE *base;
|
||||
@@ -68,19 +69,41 @@ struct idtr
|
||||
@@ -68,12 +69,30 @@ struct idtr
|
||||
#pragma pack(pop)
|
||||
|
||||
static LDT_ENTRY idt[256];
|
||||
@@ -32,43 +32,30 @@ index 666ef71363f..c6d05b7a0c9 100644
|
||||
+static BOOL emulate_idtr( BYTE *data, unsigned int data_size, unsigned int *offset )
|
||||
{
|
||||
- struct idtr ret;
|
||||
#if defined(__i386__) && defined(__GNUC__)
|
||||
+ struct dtr ret;
|
||||
__asm__( "sidtl %0" : "=m" (ret) );
|
||||
- return ret;
|
||||
+ *offset = data - ret.base;
|
||||
+ return (*offset <= ret.limit + 1 - data_size);
|
||||
+#else
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static BOOL emulate_gdtr( BYTE *data, unsigned int data_size, unsigned int *offset )
|
||||
+{
|
||||
+#if defined(__i386__) && defined(__GNUC__)
|
||||
+ struct dtr ret;
|
||||
+ __asm__( "sgdtl %0" : "=m" (ret) );
|
||||
+ *offset = data - ret.base;
|
||||
+ return (*offset <= ret.limit + 1 - data_size);
|
||||
#else
|
||||
- ret.base = (BYTE *)idt;
|
||||
- ret.limit = sizeof(idt) - 1;
|
||||
+ return FALSE;
|
||||
#endif
|
||||
- return ret;
|
||||
}
|
||||
|
||||
+}
|
||||
+
|
||||
+static inline WORD get_ldt(void)
|
||||
+{
|
||||
+ WORD seg = 1;
|
||||
+#if defined(__i386__) && defined(__GNUC__)
|
||||
+ __asm__( "sldt %0" : "=m" (seg) );
|
||||
+#endif
|
||||
+ return seg;
|
||||
+}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* INSTR_ReplaceSelector
|
||||
@@ -705,10 +728,9 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
|
||||
@@ -700,10 +719,9 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
BYTE *data = INSTR_GetOperandAddr(context, instr + 1, long_addr,
|
||||
segprefix, &len);
|
||||
unsigned int data_size = (*instr == 0x8b) ? (long_op ? 4 : 2) : 1;
|
||||
@@ -81,7 +68,7 @@ index 666ef71363f..c6d05b7a0c9 100644
|
||||
{
|
||||
idt[1].LimitLow = 0x100; /* FIXME */
|
||||
idt[2].LimitLow = 0x11E; /* FIXME */
|
||||
@@ -722,6 +744,31 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
@@ -717,6 +735,31 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
context->Eip += prefixlen + len + 1;
|
||||
return ExceptionContinueExecution;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user