Compare commits

...

70 Commits

Author SHA1 Message Date
Sebastian Lackner
089f367941 Release 1.9.3. 2016-02-08 17:39:38 +01:00
Sebastian Lackner
4ffcf184bb gitapply.sh: Fix parsing of 'deleted file mode' git header. 2016-02-08 16:28:56 +01:00
Sebastian Lackner
0978242195 widl-SLTG_Typelib_Support: Fix a compiler warning on x86_64. 2016-02-08 16:19:44 +01:00
Sebastian Lackner
988fe3e9e1 patchupdate.py: Add an additional default CC contact. 2016-02-08 14:35:57 +01:00
Sebastian Lackner
80ff81b4d1 Added patch to correctly handle compressed frames when desired format is specified. 2016-02-08 14:22:21 +01:00
Sebastian Lackner
731dde08ca Added patch to convert between AVISTREAMINFO (16 bit) and AVISTREAMINFOA in avifile.dll16. 2016-02-08 14:08:32 +01:00
Sebastian Lackner
24adcdb199 Added patch to correctly convert result of AVIStreamGetFrame to a segptr in avifile.dll16. 2016-02-08 05:01:10 +01:00
Sebastian Lackner
c0124477e9 Added patch to fix argument order in mmsystem.dll16 GlobalAlloc16 call. 2016-02-08 03:25:35 +01:00
Sebastian Lackner
3948744e12 Added patch to divide values returned by SO_RCVBUF and SO_SNDBUF getsockopt options by two. 2016-02-08 02:33:27 +01:00
Sebastian Lackner
20a201f51a Added patches to revert "move mip-level dimensions fixup" (causes regressions in multiple games). 2016-02-07 18:56:22 +01:00
Sebastian Lackner
1e5b8f9940 Added patch to implement support for AVIFile interface proxies. 2016-02-07 07:01:34 +01:00
Sebastian Lackner
8a350d004c Added patches to improve detection of MPEG2 streams. 2016-02-07 05:39:32 +01:00
Sebastian Lackner
9c77e0bb82 Added patch to allow to pass NULL as old protection in VirtualProtect for Win9X. 2016-02-06 21:40:54 +01:00
Sebastian Lackner
6d4294d7e5 Added patch to return additional properties for display devices in dxdiagn. 2016-02-06 19:10:55 +01:00
Sebastian Lackner
bbb85b6916 Added patch to strip invalid characters from mask in FindFirstFileExW. 2016-02-06 18:35:22 +01:00
Sebastian Lackner
759fd000ad Added patch to translate 16 bit address in MCIWNDM_SETTIMEFORMATA MCIWndProc16 command. 2016-02-06 04:52:52 +01:00
Sebastian Lackner
312843a2c2 Added patch to avoid setting HWTRANSFORMANDLIGHT flag on d3d7 RGB device. 2016-02-06 04:49:22 +01:00
Sebastian Lackner
74ac55e7d9 Added patch to implement proper refcounting and locking for HGLOBAL based IStream. 2016-02-06 04:29:28 +01:00
Sebastian Lackner
8e6776a691 Added patch for shcore.GetProcessDpiAwareness stub. 2016-02-06 02:40:14 +01:00
Sebastian Lackner
bcc980d580 api-ms-win-Stub_DLLs: Synchronize spec file of kernelbase. 2016-02-05 21:23:05 +01:00
Sebastian Lackner
9a6a0c49f5 Added patch for kernelbase.QuirkIsEnabled3 stub. 2016-02-05 21:20:46 +01:00
Sebastian Lackner
5289f77aad Rebase against c266d373deb417abef4883f59daa5d517b77e76c.
[user32-MOUSEHOOKSTRUCTEX]
Removed patch to pass MOUSEHOOKSTRUCTEX struct to mouse hook callback (accepted
upstream).
2016-02-05 20:03:58 +01:00
Sebastian Lackner
750454d6f1 Rebase against b21a3240705fdaf9f70a0eb1d2ff4736efcd35c9. 2016-02-05 19:58:05 +01:00
Sebastian Lackner
f6e35db051 Rebase against f55db7882db25019e1af1a497bd7723d10541989. 2016-02-05 18:35:11 +01:00
Sebastian Lackner
661976a145 Rebase against 36b38b8a203c2cca77b101810770afe952f7164a. 2016-02-05 18:18:04 +01:00
Sebastian Lackner
31fe5d3167 Rebase against 46317e0cb1af2f0b2a07532903677dd412bde3c4. 2016-02-05 17:43:27 +01:00
Sebastian Lackner
5d71a4eff3 Rebase against 6037179f6b48a9becdc9e8328ee3b4cc45a8f8eb. 2016-02-05 16:45:33 +01:00
Sebastian Lackner
e369069feb Rebase against 9c526b41314359c52954f7f367cb9d7b4a26c3ac. 2016-02-05 15:33:31 +01:00
Sebastian Lackner
883297db76 Rebase against 44f2589e7c239243b587e2d7ff92f4cdde61c3b6. 2016-02-05 15:31:30 +01:00
Sebastian Lackner
7f4d6429ad Rebase against 36187987ed92f1e6662cfd739e0f67d7ff58a9f3. 2016-02-05 15:30:47 +01:00
Sebastian Lackner
ec3240b174 Rebase against b922b55182ca2b51bf2599369c471b3920bfb635.
[user32-WM_CAPTURECHANGE]
Removed patch to send WM_CAPTURECHANGE also when capture has not changed
(accepted upstream).
2016-02-05 15:29:13 +01:00
Sebastian Lackner
dbb0795dd4 Rebase against 6b2a080372ae49cdde6b7752de5de20142ce2a70. 2016-02-05 15:28:23 +01:00
Sebastian Lackner
21ac67b551 Rebase against 9bdab23bf7a57e92656782907ae2ac67ed292f0b. 2016-02-05 15:26:56 +01:00
Sebastian Lackner
b8de48bb3a Rebase against 7e57924d322e6c15bbfc8c505c2a0817d9e5ad2e. 2016-02-04 01:27:13 +01:00
Sebastian Lackner
03d86bd0d4 Rebase against 83a147d98a9c944dae63de251efda9744a539f5c. 2016-02-04 01:27:13 +01:00
Sebastian Lackner
e8595a8305 Rebase against 7561f343815a34c3445238047e1742baec05fdb7.
[mshtml-Wine_Gecko_2.44]
Removed patch to update Wine-Gecko to 2.44-beta1 (released).
2016-02-04 01:25:53 +01:00
Sebastian Lackner
be6712245c Rebase against 59116f833ea29839b186617b625bb3aa01927944. 2016-02-03 23:10:27 +01:00
Sebastian Lackner
345d3789cc Rebase against f7e9604c3eb9082d3a1b0172ec7e3b21234fe7b7. 2016-02-03 18:37:53 +01:00
Sebastian Lackner
901c33023f Rebase against 257ee8cc6e63acc54576f60ad09de5b4051f8045. 2016-02-03 14:51:18 +01:00
Sebastian Lackner
d55612ab9c Rebase against 37503be65497b97fe5197c2c5c28486e3ff73e59. 2016-02-03 14:13:14 +01:00
Sebastian Lackner
ad65139e3d Rebase against 80ea5a01ef42b0e9e0b6c872f8f5bbbf393c0ae7. 2016-02-01 05:02:03 +01:00
Sebastian Lackner
89a3c598c3 Rebase against a96abff8082d3c6ac7f1acb57727656a94a6bde9. 2016-02-01 04:49:58 +01:00
Sebastian Lackner
da7ef4474e Rebase against ed268bbf9183392e21e771f64bd91c19316f8361. 2016-02-01 04:49:41 +01:00
Sebastian Lackner
164e63ad82 Rebase against fe0924625fc138d84dccb056f86f46ce23c346d9.
[ntdll-NtOpenSection]
Removed patch to avoid crash in om tests when NULL attr is passed to
NtOpenSection (fixed upstream).
2016-02-01 04:49:22 +01:00
Sebastian Lackner
558b4dcc4b Rebase against b3064d748b1cab6464e8b92a558b2d4ba4fe3909. 2016-02-01 04:48:56 +01:00
Sebastian Lackner
c853702845 Rebase against a124064ce5e1c83fa453da5610712b303e65de30.
[ntdll-NtQuerySystemInformationEx]
Removed patch to change return value of GetLogicalProcessorInformationEx to
TRUE (fixed upstream).

[wined3d-Invalid_Render_States]
Removed patch to ignore invalid render states in
wined3d_device_set_render_state (accepted upstream).
2016-02-01 04:48:06 +01:00
Sebastian Lackner
08db287ce8 Rebase against 8b2ba27c860da63c503f5d7dee08e2c9c01efd74. 2016-02-01 04:47:33 +01:00
Sebastian Lackner
6d36eb2fdc Rebase against 7371c44336b46ecc7eeafbc8368790bb60a18bc9. 2016-02-01 04:43:57 +01:00
Sebastian Lackner
74a1d8d0fb Rebase against 7afeec4bf2908d92be30220871fc70c0b981211f. 2016-02-01 04:42:50 +01:00
Sebastian Lackner
7a8203d691 Added patch to forward CreateTypeLib to CreateTypeLib2. 2016-01-28 10:17:22 +01:00
Sebastian Lackner
f6a285ccfc widl-SLTG_Typelib_Support: Added patch for minor/cosmetic clean up. 2016-01-28 10:17:22 +01:00
Sebastian Lackner
692def9754 Added patches to show more correct memory usage in taskmgr. 2016-01-28 10:17:21 +01:00
Sebastian Lackner
8ca2de22a0 Rebase against bb29a9bf5b42a9848faae749b6d0bd79576f665a. 2016-01-28 10:17:21 +01:00
Sebastian Lackner
44aeaade64 Rebase against a25c47f59a600d7da819869b643b0b17720c07c6.
[wined3d-Multisampling]
Removed patch to allow to override number of quality levels for
D3DMULTISAMPLE_NONMASKABLE (fixed upstream).
2016-01-28 10:17:21 +01:00
Sebastian Lackner
8ebf32fb69 Rebase against d178301b723b0a05d8dc0c04b185e39f3ac8ba14. 2016-01-28 10:17:21 +01:00
Sebastian Lackner
e9bb99ec93 Rebase against ad11f38db92b425e8df84dc4f7ea58366b73e32a. 2016-01-28 10:17:21 +01:00
Sebastian Lackner
b1a1c80a0d Rebase against dafaae77308be415e024739f227fea64ae85d6d2. 2016-01-28 10:17:21 +01:00
Sebastian Lackner
716fa1dbcb uxtheme-GTK_Theming: Validate theme handles before accessing private data. 2016-01-28 10:17:21 +01:00
Sebastian Lackner
08e2798f66 uxtheme-GTK_Theming: Fix some incorrect error codes. 2016-01-28 10:17:20 +01:00
Sebastian Lackner
53d43e05b3 uxtheme-GTK_Theming: Update patchset and add export for OpenThemeDataEx. 2016-01-28 10:17:20 +01:00
Sebastian Lackner
c344dcf96e Added patch to avoid crash when INVALID_HANDLE_VALUE is passed to CloseThemeData. 2016-01-28 10:17:16 +01:00
Sebastian Lackner
5e0122ae53 Added patch to avoid inheriting QT_* environment variables to Windows environment. 2016-01-27 06:59:38 +01:00
Sebastian Lackner
8b24f43d5e Rebase against b0140f8ee22ad0f4a627f396b760e4a7833e474a. 2016-01-26 18:13:06 +01:00
Sebastian Lackner
8d7e0791fe Added patch to implement semi-stub for shcore.GetDpiForMonitor. 2016-01-26 15:41:13 +01:00
Sebastian Lackner
cf5a12527f widl-SLTG_Typelib_Support: Implement decoding of SLTG help strings. 2016-01-26 14:25:05 +01:00
Sebastian Lackner
8981e5a344 widl-SLTG_Typelib_Support: Add support for function parameter flags to SLTG typelib generator. 2016-01-25 21:34:35 +01:00
Sebastian Lackner
cd8442e4c4 widl-SLTG_Typelib_Support: Set the lowest bit in the param name to indicate whether type description follows the name. 2016-01-25 21:24:20 +01:00
Sebastian Lackner
5e7f75370b widl-SLTG_Typelib_Support: Move patch to compile stdole32.tlb as SLTG typelib into separate patchset. 2016-01-25 19:59:47 +01:00
Sebastian Lackner
124b8035a4 Rebase against d575e0afe304d0096f8014f7f411bf28c126cc0b.
[kernel32-Codepage_Conversion]
Removed patch to make sure codepage conversion fails when destination length
is < 0 (accepted upstream).

[server-Coverity]
Removed patches to fix multiple possible invalid memory accesses detected by
Coverity (accepted upstream).

[user32-SetCaretPos]
Removed patch to avoid corruption of caret when SetCaretPos() is called
(accepted upstream).
2016-01-25 19:24:40 +01:00
Sebastian Lackner
f2d347b897 Added patch to implement stub for shcore.SetProcessDpiAwareness. 2016-01-24 16:23:31 +01:00
220 changed files with 7794 additions and 5890 deletions

View File

@@ -1,4 +1,4 @@
From 8794d625750d35293adecbedc32cc02257817b05 Mon Sep 17 00:00:00 2001
From 8e79e9494a7d4c9173066772b09afa26e643ef33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 20 Jul 2014 22:22:14 +0200
Subject: wined3d: allow changing strict drawing through an exported function
@@ -9,23 +9,23 @@ Subject: wined3d: allow changing strict drawing through an exported function
2 files changed, 7 insertions(+)
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 7a77003..5519a48 100644
index 49041bb..8c253cd 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -219,6 +219,8 @@
@@ -222,6 +222,8 @@
@ cdecl wined3d_stateblock_decref(ptr)
@ cdecl wined3d_stateblock_incref(ptr)
+@ cdecl wined3d_strictdrawing_set(long)
+
@ cdecl wined3d_surface_blt(ptr ptr ptr ptr long ptr long)
@ cdecl wined3d_surface_decref(ptr)
@ cdecl wined3d_surface_from_resource(ptr)
@ cdecl wined3d_surface_get_overlay_position(ptr ptr ptr)
@ cdecl wined3d_surface_get_parent(ptr)
@ cdecl wined3d_surface_get_pitch(ptr)
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 758ba43..7ccd3a1 100644
index 0543d97..78cc3a2 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -505,6 +505,11 @@ void wined3d_unregister_window(HWND window)
@@ -515,6 +515,11 @@ void wined3d_unregister_window(HWND window)
wined3d_wndproc_mutex_unlock();
}
@@ -38,5 +38,5 @@ index 758ba43..7ccd3a1 100644
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
{
--
2.1.3
2.7.0

View File

@@ -1,4 +1,4 @@
From 1e410019e0bed6db36906ade6dbab10416730556 Mon Sep 17 00:00:00 2001
From d15b2a48d5caa7e642e66d3fb1e4bdbe56b8b8f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 15 Jan 2016 13:01:15 +0100
Subject: kernelbase: Add dll and add stub for QuirkIsEnabled.
@@ -16,10 +16,10 @@ Subject: kernelbase: Add dll and add stub for QuirkIsEnabled.
create mode 100644 dlls/kernelbase/misc.c
diff --git a/configure.ac b/configure.ac
index 5f178ee..0fbb0bf 100644
index c47c0fd..dc89f99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2980,6 +2980,7 @@ WINE_CONFIG_TEST(dlls/jscript/tests)
@@ -2989,6 +2989,7 @@ WINE_CONFIG_TEST(dlls/jscript/tests)
WINE_CONFIG_DLL(jsproxy,,[implib])
WINE_CONFIG_DLL(kernel32,,[clean,implib,mc])
WINE_CONFIG_TEST(dlls/kernel32/tests)
@@ -39,7 +39,7 @@ index 0000000..2beb34b
+ misc.c
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
new file mode 100644
index 0000000..83fff3e
index 0000000..392637b
--- /dev/null
+++ b/dlls/kernelbase/kernelbase.spec
@@ -0,0 +1,1726 @@
@@ -752,7 +752,7 @@ index 0000000..83fff3e
+@ stdcall GetTimeFormatEx(wstr long ptr wstr ptr long) kernel32.GetTimeFormatEx
+@ stdcall GetTimeFormatW(long long ptr wstr ptr long) kernel32.GetTimeFormatW
+@ stdcall GetTimeZoneInformation(ptr) kernel32.GetTimeZoneInformation
+@ stub GetTimeZoneInformationForYear
+@ stdcall GetTimeZoneInformationForYear(long ptr ptr) kernel32.GetTimeZoneInformationForYear
+@ stdcall GetTokenInformation(long long ptr long ptr) advapi32.GetTokenInformation
+@ stdcall GetTraceEnableFlags(int64) advapi32.GetTraceEnableFlags
+@ stdcall GetTraceEnableLevel(int64) advapi32.GetTraceEnableLevel
@@ -1826,7 +1826,7 @@ index 6b6ead2..7c2a9d1 100644
422 stdcall -noname SHGlobalCounterCreateNamedA(str long)
423 stdcall -noname SHGlobalCounterCreateNamedW(wstr long)
diff --git a/tools/make_specfiles b/tools/make_specfiles
index e50ba18..3ff47f1 100755
index 808d159..ae316a0 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -221,6 +221,13 @@ my @dll_groups =
@@ -1844,5 +1844,5 @@ index e50ba18..3ff47f1 100755
"api-ms-win-downlevel-ole32-l1-1-0",
"api-ms-win-core-com-l1-1-0",
--
2.6.4
2.7.0

View File

@@ -0,0 +1,141 @@
From f84cb2913cb755152d98c278f3ed6927167c9b2b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 24 Jan 2016 16:06:47 +0100
Subject: shcore: Add SetProcessDpiAwareness stub.
---
dlls/shcore/Makefile.in | 3 +++
dlls/shcore/main.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++
dlls/shcore/shcore.spec | 2 +-
include/Makefile.in | 1 +
include/shellscalingapi.h | 29 ++++++++++++++++++++++++++++
5 files changed, 83 insertions(+), 1 deletion(-)
create mode 100644 dlls/shcore/main.c
create mode 100644 include/shellscalingapi.h
diff --git a/dlls/shcore/Makefile.in b/dlls/shcore/Makefile.in
index dd5f08f..ec2e95f 100644
--- a/dlls/shcore/Makefile.in
+++ b/dlls/shcore/Makefile.in
@@ -1 +1,4 @@
MODULE = shcore.dll
+
+C_SRCS = \
+ main.c
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c
new file mode 100644
index 0000000..0e59d38
--- /dev/null
+++ b/dlls/shcore/main.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2016 Sebastian Lackner
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "shellscalingapi.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shcore);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
+
+HRESULT WINAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value)
+{
+ FIXME("(%u): stub\n", value);
+ return E_NOTIMPL;
+}
diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec
index 12a4ef3..1624319 100644
--- a/dlls/shcore/shcore.spec
+++ b/dlls/shcore/shcore.spec
@@ -78,6 +78,6 @@
@ stdcall SHUnicodeToAnsi(wstr ptr ptr) shlwapi.SHUnicodeToAnsi
@ stdcall SHUnicodeToUnicode(wstr ptr long) shlwapi.SHUnicodeToUnicode
@ stdcall SetCurrentProcessExplicitAppUserModelID(wstr) shell32.SetCurrentProcessExplicitAppUserModelID
-@ stub SetProcessDpiAwareness
+@ stdcall SetProcessDpiAwareness(long)
@ stub SetProcessReference
@ stub UnregisterScaleChangeEvent
diff --git a/include/Makefile.in b/include/Makefile.in
index 199de7a..c907afe4 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -570,6 +570,7 @@ HEADER_SRCS = \
sfc.h \
shdispid.h \
shellapi.h \
+ shellscalingapi.h \
shlguid.h \
shlobj.h \
shlwapi.h \
diff --git a/include/shellscalingapi.h b/include/shellscalingapi.h
new file mode 100644
index 0000000..6d7a167
--- /dev/null
+++ b/include/shellscalingapi.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 Sebastian Lackner
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_SHELLSCALINGAPI_H
+#define __WINE_SHELLSCALINGAPI_H
+
+typedef enum PROCESS_DPI_AWARENESS
+{
+ PROCESS_DPI_UNAWARE = 0,
+ PROCESS_SYSTEM_DPI_AWARE = 1,
+ PROCESS_PER_MONITOR_DPI_AWARE = 2,
+} PROCESS_DPI_AWARENESS;
+
+#endif /* __WINE_SHELLSCALINGAPI_H */
--
2.6.4

View File

@@ -0,0 +1,86 @@
From 0effbe0e3eeb84626ec6b64848fe6cfb1279dc02 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 26 Jan 2016 15:39:10 +0100
Subject: shcore: Implement stub for GetDpiForMonitor.
---
dlls/shcore/Makefile.in | 1 +
dlls/shcore/main.c | 16 ++++++++++++++++
dlls/shcore/shcore.spec | 2 +-
include/shellscalingapi.h | 8 ++++++++
4 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/dlls/shcore/Makefile.in b/dlls/shcore/Makefile.in
index ec2e95f..0b172fc 100644
--- a/dlls/shcore/Makefile.in
+++ b/dlls/shcore/Makefile.in
@@ -1,4 +1,5 @@
MODULE = shcore.dll
+IMPORTS = gdi32 user32
C_SRCS = \
main.c
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c
index 0e59d38..ce0d9ed 100644
--- a/dlls/shcore/main.c
+++ b/dlls/shcore/main.c
@@ -21,6 +21,8 @@
#include "windef.h"
#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
#include "shellscalingapi.h"
#include "wine/debug.h"
@@ -47,3 +49,17 @@ HRESULT WINAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value)
FIXME("(%u): stub\n", value);
return E_NOTIMPL;
}
+
+HRESULT WINAPI GetDpiForMonitor(HMONITOR monitor, MONITOR_DPI_TYPE type, UINT *x, UINT *y)
+{
+ HDC hDC;
+
+ TRACE("(%p, %u, %p, %p): semi-stub\n", monitor, type, x, y);
+
+ hDC = GetDC(0);
+ if (x) *x = GetDeviceCaps(hDC, LOGPIXELSX);
+ if (y) *y = GetDeviceCaps(hDC, LOGPIXELSY);
+ ReleaseDC(0, hDC);
+
+ return S_OK;
+}
diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec
index 1624319..4d6e845 100644
--- a/dlls/shcore/shcore.spec
+++ b/dlls/shcore/shcore.spec
@@ -6,7 +6,7 @@
@ stub DllGetActivationFactory
@ stdcall -private DllGetClassObject(ptr ptr ptr) shell32.DllGetClassObject
@ stdcall GetCurrentProcessExplicitAppUserModelID(ptr) shell32.GetCurrentProcessExplicitAppUserModelID
-@ stub GetDpiForMonitor
+@ stdcall GetDpiForMonitor(long long ptr ptr)
@ stub GetDpiForShellUIComponent
@ stub GetProcessDpiAwareness
@ stub GetProcessReference
diff --git a/include/shellscalingapi.h b/include/shellscalingapi.h
index 6d7a167..56ae94a 100644
--- a/include/shellscalingapi.h
+++ b/include/shellscalingapi.h
@@ -26,4 +26,12 @@ typedef enum PROCESS_DPI_AWARENESS
PROCESS_PER_MONITOR_DPI_AWARE = 2,
} PROCESS_DPI_AWARENESS;
+typedef enum MONITOR_DPI_TYPE
+{
+ MDT_EFFECTIVE_DPI = 0,
+ MDT_ANGULAR_DPI = 1,
+ MDT_RAW_DPI = 2,
+ MDT_DEFAULT = MDT_EFFECTIVE_DPI,
+} MONITOR_DPI_TYPE;
+
#endif /* __WINE_SHELLSCALINGAPI_H */
--
2.6.4

View File

@@ -0,0 +1,58 @@
From d1cb153363aec82f8b7c5dbb0f382880e01fc2d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 4 Feb 2016 06:19:57 +0100
Subject: kernelbase: Add stub for QuirkIsEnabled3.
---
.../api-ms-win-core-quirks-l1-1-0.spec | 2 +-
dlls/kernelbase/kernelbase.spec | 2 +-
dlls/kernelbase/misc.c | 10 ++++++++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
index 54ce373..1485512 100644
--- a/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
+++ b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
@@ -2,7 +2,7 @@
@ stub QuirkGetData2
@ stdcall QuirkIsEnabled(ptr) kernelbase.QuirkIsEnabled
@ stub QuirkIsEnabled2
-@ stub QuirkIsEnabled3
+@ stdcall QuirkIsEnabled3(ptr ptr) kernelbase.QuirkIsEnabled3
@ stub QuirkIsEnabledForPackage
@ stub QuirkIsEnabledForPackage2
@ stub QuirkIsEnabledForProcess
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 83fff3e..dbba3cc 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1188,7 +1188,7 @@
@ stub QuirkGetData2
@ stub QuirkGetData
@ stub QuirkIsEnabled2
-@ stub QuirkIsEnabled3
+@ stdcall QuirkIsEnabled3(ptr ptr)
@ stdcall QuirkIsEnabled(ptr)
@ stub QuirkIsEnabledForPackage2
@ stub QuirkIsEnabledForPackage3
diff --git a/dlls/kernelbase/misc.c b/dlls/kernelbase/misc.c
index be1591a..e703e6d 100644
--- a/dlls/kernelbase/misc.c
+++ b/dlls/kernelbase/misc.c
@@ -35,3 +35,13 @@ BOOL WINAPI QuirkIsEnabled(void *arg)
FIXME("(%p): stub\n", arg);
return FALSE;
}
+
+/***********************************************************************
+ * QuirkIsEnabled3 (KERNELBASE.@)
+ */
+BOOL WINAPI QuirkIsEnabled3(void *arg1, void *arg2)
+{
+ static int once;
+ if (!once++) FIXME("(%p, %p): stub\n", arg1, arg2);
+ return FALSE;
+}
--
2.7.0

View File

@@ -0,0 +1,44 @@
From 3d855b15e9f99f1cc3168cc9e606cb698e078a4b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 6 Feb 2016 02:38:14 +0100
Subject: shcore: Add stub for GetProcessDpiAwareness.
---
dlls/shcore/main.c | 7 +++++++
dlls/shcore/shcore.spec | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c
index ce0d9ed..f2d362d 100644
--- a/dlls/shcore/main.c
+++ b/dlls/shcore/main.c
@@ -50,6 +50,13 @@ HRESULT WINAPI SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value)
return E_NOTIMPL;
}
+HRESULT WINAPI GetProcessDpiAwareness(HANDLE process, PROCESS_DPI_AWARENESS *value)
+{
+ FIXME("(%p, %p): stub\n", process, value);
+ if (value) *value = PROCESS_DPI_UNAWARE;
+ return S_OK;
+}
+
HRESULT WINAPI GetDpiForMonitor(HMONITOR monitor, MONITOR_DPI_TYPE type, UINT *x, UINT *y)
{
HDC hDC;
diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec
index 4d6e845..34f989f 100644
--- a/dlls/shcore/shcore.spec
+++ b/dlls/shcore/shcore.spec
@@ -8,7 +8,7 @@
@ stdcall GetCurrentProcessExplicitAppUserModelID(ptr) shell32.GetCurrentProcessExplicitAppUserModelID
@ stdcall GetDpiForMonitor(long long ptr ptr)
@ stub GetDpiForShellUIComponent
-@ stub GetProcessDpiAwareness
+@ stdcall GetProcessDpiAwareness(long ptr)
@ stub GetProcessReference
@ stub GetScaleFactorForDevice
@ stub GetScaleFactorForMonitor
--
2.7.0

View File

@@ -0,0 +1,239 @@
From a33160eef805e950e8b3c36c74f0688ca9e2328e Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 7 Feb 2016 12:52:26 +0800
Subject: avifil32: Add support for AVIFile interface proxies. [v2]
---
dlls/avifil32/Makefile.in | 4 +-
dlls/avifil32/avifil32.idl | 25 ++++++----
dlls/avifil32/avifile_ifaces.idl | 105 +++++++++++++++++++++++++++++++++++++++
dlls/avifil32/avifile_private.h | 1 +
dlls/avifil32/factory.c | 8 ++-
5 files changed, 130 insertions(+), 13 deletions(-)
create mode 100644 dlls/avifil32/avifile_ifaces.idl
diff --git a/dlls/avifil32/Makefile.in b/dlls/avifil32/Makefile.in
index 81d2ff8..4030514 100644
--- a/dlls/avifil32/Makefile.in
+++ b/dlls/avifil32/Makefile.in
@@ -1,6 +1,6 @@
MODULE = avifil32.dll
IMPORTLIB = avifil32
-IMPORTS = uuid msacm32 msvfw32 winmm ole32 user32 advapi32
+IMPORTS = uuid msacm32 msvfw32 winmm ole32 user32 advapi32 rpcrt4
C_SRCS = \
acmstream.c \
@@ -17,3 +17,5 @@ C_SRCS = \
IDL_SRCS = avifil32.idl
RC_SRCS = avifil32.rc
+
+dlldata_EXTRADEFS = -DENTRY_PREFIX=avifil32_
diff --git a/dlls/avifil32/avifil32.idl b/dlls/avifil32/avifil32.idl
index 1f50f15..e23c176 100644
--- a/dlls/avifil32/avifil32.idl
+++ b/dlls/avifil32/avifil32.idl
@@ -18,39 +18,42 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#pragma makedep proxy
#pragma makedep register
+#include "avifile_ifaces.idl"
+
+[
+ helpstring("IAVIStream & IAVIFile Proxy"),
+ threading(both),
+ uuid(0002000d-0000-0000-c000-000000000046)
+]
+coclass PSFactoryBuffer { interface IFactoryBuffer; }
+
[
helpstring("Microsoft AVI Files"),
- threading(apartment),
+ threading(both),
uuid(00020000-0000-0000-C000-000000000046)
]
coclass AVIFile { interface IAVIFile; }
[
helpstring("AVI Compressed Stream"),
- threading(apartment),
+ threading(both),
uuid(00020001-0000-0000-c000-000000000046)
]
coclass ICMStream { interface IAVIStream; }
[
helpstring("Microsoft Wave File"),
- threading(apartment),
+ threading(both),
uuid(00020003-0000-0000-c000-000000000046)
]
coclass WAVFile { interface IAVIFile; }
[
- helpstring("IAVIStream & IAVIFile Proxy"),
- threading(apartment),
- uuid(0002000d-0000-0000-c000-000000000046)
-]
-coclass AVIProxy { }
-
-[
helpstring("ACM Compressed Audio Stream"),
- threading(apartment),
+ threading(both),
uuid(0002000f-0000-0000-c000-000000000046)
]
coclass ACMStream { interface IAVIStream; }
diff --git a/dlls/avifil32/avifile_ifaces.idl b/dlls/avifil32/avifile_ifaces.idl
new file mode 100644
index 0000000..f9280e5
--- /dev/null
+++ b/dlls/avifil32/avifile_ifaces.idl
@@ -0,0 +1,105 @@
+/*
+ * Proxy support for avifil32
+ *
+ * Copyright 2016 Dmitry Timoshkov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * These interface descriptions are supposed to be used for automatic proxy
+ * generation by an IDL compiler.
+ *
+ * While it's possible to convert include/vfw.h to an .idl, that's proved to
+ * be a major waste of an effort because the resulting interface descriptions
+ * can't be used for automatic proxy generation since they are not compatible
+ * with IDL compiler restrictions for proxies, and fixing them up would make
+ * generated vfw.h source incompatible with PSDK's equivalent.
+ */
+
+import "wtypes.idl";
+import "unknwn.idl";
+
+typedef struct _AVISTREAMINFOW
+{
+ DWORD fccType;
+ DWORD fccHandler;
+ DWORD dwFlags;
+ DWORD dwCaps;
+ WORD wPriority;
+ WORD wLanguage;
+ DWORD dwScale;
+ DWORD dwRate;
+ DWORD dwStart;
+ DWORD dwLength;
+ DWORD dwInitialFrames;
+ DWORD dwSuggestedBufferSize;
+ DWORD dwQuality;
+ DWORD dwSampleSize;
+ RECT rcFrame;
+ DWORD dwEditCount;
+ DWORD dwFormatChangeCount;
+ WCHAR szName[64];
+} AVISTREAMINFOW;
+
+[
+ object,
+ uuid(00020021-0000-0000-c000-000000000046)
+]
+interface IAVIStream : IUnknown
+{
+ HRESULT Create(LPARAM lParam1, LPARAM lParam2);
+ HRESULT Info(AVISTREAMINFOW *psi, LONG lSize);
+ LONG FindSample(LONG lPos, LONG lFlags);
+ HRESULT ReadFormat(LONG lPos, [out,size_is(*lpcbFormat)] char *lpFormat, [in,out] LONG *lpcbFormat);
+ HRESULT SetFormat(LONG lPos, [in,size_is(cbFormat)] char *lpFormat, LONG cbFormat);
+ HRESULT Read(LONG lStart, LONG lSamples, [out,size_is(cbBuffer)] char *lpBuffer, LONG cbBuffer, LONG *plBytes, LONG *plSamples);
+ HRESULT Write(LONG lStart, LONG lSamples, [in,size_is(cbBuffer)] char *lpBuffer, LONG cbBuffer, DWORD dwFlags, LONG *plSampWritten, LONG *plBytesWritten);
+ HRESULT Delete(LONG lStart, LONG lSamples);
+ HRESULT ReadData(DWORD fcc, [out,size_is(*lpcbBuffer)] char *lpBuffer, [in,out] LONG *lpcbBuffer);
+ HRESULT WriteData(DWORD fcc, [in,size_is(cbBuffer)] char *lpBuffer, LONG cbBuffer);
+ HRESULT SetInfo(AVISTREAMINFOW *plInfo, LONG cbInfo);
+};
+
+typedef struct _AVIFILEINFOW
+{
+ DWORD dwMaxBytesPerSec;
+ DWORD dwFlags;
+ DWORD dwCaps;
+ DWORD dwStreams;
+ DWORD dwSuggestedBufferSize;
+ DWORD dwWidth;
+ DWORD dwHeight;
+ DWORD dwScale;
+ DWORD dwRate;
+ DWORD dwLength;
+ DWORD dwEditCount;
+ WCHAR szFileType[64];
+} AVIFILEINFOW;
+
+[
+ object,
+ uuid(00020020-0000-0000-c000-000000000046)
+]
+interface IAVIFile : IUnknown
+{
+ HRESULT Info(AVIFILEINFOW *pfi, LONG lSize);
+ HRESULT GetStream(IAVIStream **ppStream, DWORD fccType, LONG lParam);
+ HRESULT CreateStream(IAVIStream **ppStream, AVISTREAMINFOW *psi);
+ HRESULT WriteData(DWORD fcc, [in,size_is(cbBuffer)] char *lpBuffer, LONG cbBuffer);
+ HRESULT ReadData(DWORD fcc, [out,size_is(*lpcbBuffer)] char *lpBuffer, [in,out] LONG *lpcbBuffer);
+ HRESULT EndRecord(void);
+ HRESULT DeleteStream(DWORD fccType, LONG lParam);
+};
diff --git a/dlls/avifil32/avifile_private.h b/dlls/avifil32/avifile_private.h
index 0fd74c4..9cce2d3 100644
--- a/dlls/avifil32/avifile_private.h
+++ b/dlls/avifil32/avifile_private.h
@@ -67,5 +67,6 @@ extern PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pstream) DECLSPEC_HIDDEN;
extern PAVIFILE AVIFILE_CreateAVITempFile(int nStreams, const PAVISTREAM *ppStreams) DECLSPEC_HIDDEN;
extern LPCWSTR AVIFILE_BasenameW(LPCWSTR szFileName) DECLSPEC_HIDDEN;
+extern HRESULT WINAPI avifil32_DllGetClassObject(REFCLSID pclsid, REFIID piid, LPVOID *ppv) DECLSPEC_HIDDEN;
#endif
diff --git a/dlls/avifil32/factory.c b/dlls/avifil32/factory.c
index c74a716..1b8988d 100644
--- a/dlls/avifil32/factory.c
+++ b/dlls/avifil32/factory.c
@@ -195,12 +195,18 @@ LPCWSTR AVIFILE_BasenameW(LPCWSTR szPath)
*/
HRESULT WINAPI DllGetClassObject(REFCLSID pclsid, REFIID piid, LPVOID *ppv)
{
+ HRESULT hr;
+
TRACE("(%s,%s,%p)\n", debugstr_guid(pclsid), debugstr_guid(piid), ppv);
if (pclsid == NULL || piid == NULL || ppv == NULL)
return E_FAIL;
- return AVIFILE_CreateClassFactory(pclsid,piid,ppv);
+ hr = AVIFILE_CreateClassFactory(pclsid,piid,ppv);
+ if (SUCCEEDED(hr))
+ return hr;
+
+ return avifil32_DllGetClassObject(pclsid,piid,ppv);
}
/*****************************************************************************
--
2.7.0

View File

@@ -0,0 +1 @@
Fixes: [38564] Add support for AVIFile interface proxies

View File

@@ -0,0 +1,141 @@
From 23ce6bcd9ebd67d6b5ed991bad555ecbc014a08d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 8 Feb 2016 04:55:07 +0100
Subject: avifil32: Correctly handle compressed frames when desired format is
specified.
---
dlls/avifil32/getframe.c | 102 +++++++++++++++++++++++------------------------
1 file changed, 50 insertions(+), 52 deletions(-)
diff --git a/dlls/avifil32/getframe.c b/dlls/avifil32/getframe.c
index 46b1683..7d98d2e 100644
--- a/dlls/avifil32/getframe.c
+++ b/dlls/avifil32/getframe.c
@@ -406,8 +406,6 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
lpbi->biSize + lpbi->biClrUsed * sizeof(RGBQUAD));
if (lpbi->biBitCount <= 8)
ICDecompressGetPalette(This->hic, This->lpInFormat, This->lpOutFormat);
-
- return AVIERR_OK;
} else {
if (bBestDisplay) {
ICGetDisplayFormat(This->hic, This->lpInFormat,
@@ -417,64 +415,64 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
AVIFILE_CloseCompressor(This);
return AVIERR_NOCOMPRESSOR;
}
+ }
- /* check output format */
- if (This->lpOutFormat->biClrUsed == 0 &&
- This->lpOutFormat->biBitCount <= 8)
- This->lpOutFormat->biClrUsed = 1u << This->lpOutFormat->biBitCount;
- if (This->lpOutFormat->biSizeImage == 0 &&
- This->lpOutFormat->biCompression == BI_RGB) {
- This->lpOutFormat->biSizeImage =
- DIBWIDTHBYTES(*This->lpOutFormat) * This->lpOutFormat->biHeight;
- }
+ /* check output format */
+ if (This->lpOutFormat->biClrUsed == 0 &&
+ This->lpOutFormat->biBitCount <= 8)
+ This->lpOutFormat->biClrUsed = 1u << This->lpOutFormat->biBitCount;
+ if (This->lpOutFormat->biSizeImage == 0 &&
+ This->lpOutFormat->biCompression == BI_RGB) {
+ This->lpOutFormat->biSizeImage =
+ DIBWIDTHBYTES(*This->lpOutFormat) * This->lpOutFormat->biHeight;
+ }
- if (lpBits == NULL) {
- DWORD size = This->lpOutFormat->biClrUsed * sizeof(RGBQUAD);
+ if (lpBits == NULL) {
+ DWORD size = This->lpOutFormat->biClrUsed * sizeof(RGBQUAD);
- size += This->lpOutFormat->biSize + This->lpOutFormat->biSizeImage;
- This->lpOutFormat = HeapReAlloc(GetProcessHeap(), 0, This->lpOutFormat, size);
- if (This->lpOutFormat == NULL) {
- AVIFILE_CloseCompressor(This);
- return AVIERR_MEMORY;
- }
- This->lpOutBuffer = DIBPTR(This->lpOutFormat);
- } else
- This->lpOutBuffer = lpBits;
-
- /* for user size was irrelevant */
- if (dx == -1)
- dx = This->lpOutFormat->biWidth;
- if (dy == -1)
- dy = This->lpOutFormat->biHeight;
-
- /* need to resize? */
- if (x != 0 || y != 0) {
- if (dy == This->lpOutFormat->biHeight &&
- dx == This->lpOutFormat->biWidth)
- This->bResize = FALSE;
- else
- This->bResize = TRUE;
+ size += This->lpOutFormat->biSize + This->lpOutFormat->biSizeImage;
+ This->lpOutFormat = HeapReAlloc(GetProcessHeap(), 0, This->lpOutFormat, size);
+ if (This->lpOutFormat == NULL) {
+ AVIFILE_CloseCompressor(This);
+ return AVIERR_MEMORY;
}
+ This->lpOutBuffer = DIBPTR(This->lpOutFormat);
+ } else
+ This->lpOutBuffer = lpBits;
+
+ /* for user size was irrelevant */
+ if (dx == -1)
+ dx = This->lpOutFormat->biWidth;
+ if (dy == -1)
+ dy = This->lpOutFormat->biHeight;
+
+ /* need to resize? */
+ if (x != 0 || y != 0) {
+ if (dy == This->lpOutFormat->biHeight &&
+ dx == This->lpOutFormat->biWidth)
+ This->bResize = FALSE;
+ else
+ This->bResize = TRUE;
+ }
- if (This->bResize) {
- This->x = x;
- This->y = y;
- This->dx = dx;
- This->dy = dy;
-
- if (ICDecompressExBegin(This->hic,0,This->lpInFormat,This->lpInBuffer,0,
- 0,This->lpInFormat->biWidth,
- This->lpInFormat->biHeight,This->lpOutFormat,
- This->lpOutBuffer, x, y, dx, dy) == ICERR_OK)
- return AVIERR_OK;
- } else if (ICDecompressBegin(This->hic, This->lpInFormat,
- This->lpOutFormat) == ICERR_OK)
+ if (This->bResize) {
+ This->x = x;
+ This->y = y;
+ This->dx = dx;
+ This->dy = dy;
+
+ if (ICDecompressExBegin(This->hic,0,This->lpInFormat,This->lpInBuffer,0,
+ 0,This->lpInFormat->biWidth,
+ This->lpInFormat->biHeight,This->lpOutFormat,
+ This->lpOutBuffer, x, y, dx, dy) == ICERR_OK)
return AVIERR_OK;
+ } else if (ICDecompressBegin(This->hic, This->lpInFormat,
+ This->lpOutFormat) == ICERR_OK)
+ return AVIERR_OK;
- AVIFILE_CloseCompressor(This);
+ AVIFILE_CloseCompressor(This);
- return AVIERR_COMPRESSOR;
- }
+ return AVIERR_COMPRESSOR;
}
static const struct IGetFrameVtbl igetframeVtbl = {
--
2.7.0

View File

@@ -0,0 +1 @@
Fixes: Correctly handle compressed frames when desired format is specified

View File

@@ -0,0 +1,186 @@
From e68b9f65a4f9c7f9c10b11152cac04bcdf6facf9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 8 Feb 2016 04:44:24 +0100
Subject: avifile.dll16: Correctly convert result of AVIStreamGetFrame to a segptr.
---
dlls/avifile.dll16/Makefile.in | 3 +
dlls/avifile.dll16/avifile.dll16.spec | 6 +-
dlls/avifile.dll16/main.c | 137 ++++++++++++++++++++++++++++++++++
3 files changed, 143 insertions(+), 3 deletions(-)
create mode 100644 dlls/avifile.dll16/main.c
diff --git a/dlls/avifile.dll16/Makefile.in b/dlls/avifile.dll16/Makefile.in
index 6050c6c..4152c2f 100644
--- a/dlls/avifile.dll16/Makefile.in
+++ b/dlls/avifile.dll16/Makefile.in
@@ -1,3 +1,6 @@
MODULE = avifile.dll16
IMPORTS = avifil32
EXTRADLLFLAGS = -m16 -Wb,--main-module,avifil32.dll
+
+C_SRCS = \
+ main.c
diff --git a/dlls/avifile.dll16/avifile.dll16.spec b/dlls/avifile.dll16/avifile.dll16.spec
index 71a6c74..0e19413 100644
--- a/dlls/avifile.dll16/avifile.dll16.spec
+++ b/dlls/avifile.dll16/avifile.dll16.spec
@@ -20,9 +20,9 @@
105 stub AVIMAKECOMPRESSEDSTREAM
106 stub AVIMAKEFILEFROMSTREAMS
107 stub AVIMAKESTREAMFROMCLIPBOARD
-110 pascal AVIStreamGetFrame(long long) AVIStreamGetFrame
-111 pascal AVIStreamGetFrameClose(long) AVIStreamGetFrameClose
-112 pascal AVIStreamGetFrameOpen(long ptr) AVIStreamGetFrameOpen
+110 pascal AVIStreamGetFrame(long long) AVIStreamGetFrame16
+111 pascal AVIStreamGetFrameClose(long) AVIStreamGetFrameClose16
+112 pascal AVIStreamGetFrameOpen(long ptr) AVIStreamGetFrameOpen16
120 stub _AVISAVE
121 stub AVISAVEV
122 stub AVISAVEOPTIONS
diff --git a/dlls/avifile.dll16/main.c b/dlls/avifile.dll16/main.c
new file mode 100644
index 0000000..f780c43
--- /dev/null
+++ b/dlls/avifile.dll16/main.c
@@ -0,0 +1,137 @@
+/*
+ * Wrapper for 16 bit avifile functions
+ *
+ * Copyright 2016 Michael MĂĽller
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "wine/winbase16.h"
+#include "winternl.h"
+#include "wingdi.h"
+#include "vfw.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(avifile16);
+
+struct frame_wrapper16
+{
+ PGETFRAME pg;
+ PVOID ptr;
+ DWORD size;
+ WORD sel;
+ WORD count;
+};
+
+static void free_segptr_frame(struct frame_wrapper16 *wrapper)
+{
+ int i;
+
+ if (!wrapper->sel)
+ return;
+
+ for (i = 0; i < wrapper->count; i++)
+ FreeSelector16(wrapper->sel + (i << __AHSHIFT));
+
+ wrapper->sel = 0;
+}
+
+static SEGPTR alloc_segptr_frame(struct frame_wrapper16 *wrapper, void *ptr, DWORD size)
+{
+ int i;
+
+ if (wrapper->sel)
+ {
+ if (wrapper->ptr == ptr && wrapper->size == size)
+ return MAKESEGPTR(wrapper->sel, 0);
+ free_segptr_frame(wrapper);
+ }
+
+ wrapper->ptr = ptr;
+ wrapper->size = size;
+ wrapper->count = (size + 0xffff) / 0x10000;
+ wrapper->sel = AllocSelectorArray16(wrapper->count);
+ if (!wrapper->sel)
+ return 0;
+
+ for (i = 0; i < wrapper->count; i++)
+ {
+ SetSelectorBase(wrapper->sel + (i << __AHSHIFT), (DWORD)ptr + i * 0x10000);
+ SetSelectorLimit16(wrapper->sel + (i << __AHSHIFT), size - 1);
+ size -= 0x10000;
+ }
+
+ return MAKESEGPTR(wrapper->sel, 0);
+}
+
+/***********************************************************************
+ * AVIStreamGetFrameOpen (AVIFILE.112)
+ */
+PGETFRAME WINAPI AVIStreamGetFrameOpen16(PAVISTREAM pstream, LPBITMAPINFOHEADER lpbiWanted)
+{
+ struct frame_wrapper16 *wrapper;
+ PGETFRAME pg;
+
+ pg = AVIStreamGetFrameOpen(pstream, lpbiWanted);
+ if (!pg) return NULL;
+
+ wrapper = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wrapper));
+ if (!wrapper)
+ {
+ AVIStreamGetFrameClose(pg);
+ return NULL;
+ }
+
+ wrapper->pg = pg;
+ return (PGETFRAME)wrapper;
+}
+
+/***********************************************************************
+ * AVIStreamGetFrame (AVIFILE.110)
+ */
+SEGPTR WINAPI AVIStreamGetFrame16(PGETFRAME pg, LONG pos)
+{
+ struct frame_wrapper16 *wrapper = (void *)pg;
+ BITMAPINFOHEADER *bih;
+
+ if (!pg) return 0;
+
+ bih = AVIStreamGetFrame(wrapper->pg, pos);
+ if (bih)
+ {
+ DWORD size = bih->biSize + bih->biSizeImage;
+ return alloc_segptr_frame(wrapper, bih, size);
+ }
+
+ return 0;
+}
+
+
+/***********************************************************************
+ * AVIStreamGetFrameClose (AVIFILE.111)
+ */
+HRESULT WINAPI AVIStreamGetFrameClose16(PGETFRAME pg)
+{
+ struct frame_wrapper16 *wrapper = (void *)pg;
+ HRESULT hr;
+
+ if (!pg) return S_OK;
+
+ hr = AVIStreamGetFrameClose(wrapper->pg);
+ free_segptr_frame(wrapper);
+ HeapFree(GetProcessHeap(), 0, wrapper);
+ return hr;
+}
--
2.7.0

View File

@@ -0,0 +1,148 @@
From 3cdd530b2c17ee0cdc6a1fcc37b28c180310656a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 8 Feb 2016 14:02:09 +0100
Subject: avifile.dll16: Convert between AVISTREAMINFO (16 bit) and AVISTREAMINFOA.
---
dlls/avifile.dll16/avifile.dll16.spec | 4 +-
dlls/avifile.dll16/main.c | 100 ++++++++++++++++++++++++++++++++++
2 files changed, 102 insertions(+), 2 deletions(-)
diff --git a/dlls/avifile.dll16/avifile.dll16.spec b/dlls/avifile.dll16/avifile.dll16.spec
index 0e19413..7a1aaea 100644
--- a/dlls/avifile.dll16/avifile.dll16.spec
+++ b/dlls/avifile.dll16/avifile.dll16.spec
@@ -36,13 +36,13 @@
141 pascal AVIFileRelease(long) AVIFileRelease
142 pascal AVIFileInfo(long ptr long) AVIFileInfoA
143 pascal AVIFileGetStream(long ptr long long) AVIFileGetStream
-144 pascal AVIFileCreateStream(long ptr ptr) AVIFileCreateStreamA
+144 pascal AVIFileCreateStream(long ptr ptr) AVIFileCreateStream16
146 pascal AVIFileWriteData(long long ptr long) AVIFileWriteData
147 pascal AVIFileReadData(long long ptr ptr) AVIFileReadData
148 pascal AVIFileEndRecord(long) AVIFileEndRecord
160 pascal AVIStreamAddRef(long) AVIStreamAddRef
161 pascal AVIStreamRelease(long) AVIStreamRelease
-162 pascal AVIStreamInfo(long ptr long) AVIStreamInfoA
+162 pascal AVIStreamInfo(long ptr long) AVIStreamInfo16
163 pascal AVIStreamFindSample(long long long) AVIStreamFindSample
164 pascal AVIStreamReadFormat(long long ptr ptr) AVIStreamReadFormat
165 pascal AVIStreamReadData(long long ptr ptr) AVIStreamReadData
diff --git a/dlls/avifile.dll16/main.c b/dlls/avifile.dll16/main.c
index f780c43..8df1fe5 100644
--- a/dlls/avifile.dll16/main.c
+++ b/dlls/avifile.dll16/main.c
@@ -27,6 +27,27 @@
WINE_DEFAULT_DEBUG_CHANNEL(avifile16);
+typedef struct _AVISTREAMINFO16 {
+ DWORD fccType;
+ DWORD fccHandler;
+ DWORD dwFlags;
+ DWORD dwCaps;
+ WORD wPriority;
+ WORD wLanguage;
+ DWORD dwScale;
+ DWORD dwRate;
+ DWORD dwStart;
+ DWORD dwLength;
+ DWORD dwInitialFrames;
+ DWORD dwSuggestedBufferSize;
+ DWORD dwQuality;
+ DWORD dwSampleSize;
+ RECT16 rcFrame;
+ DWORD dwEditCount;
+ DWORD dwFormatChangeCount;
+ CHAR szName[64];
+} AVISTREAMINFO16, *LPAVISTREAMINFO16, *PAVISTREAMINFO16;
+
struct frame_wrapper16
{
PGETFRAME pg;
@@ -135,3 +156,82 @@ HRESULT WINAPI AVIStreamGetFrameClose16(PGETFRAME pg)
HeapFree(GetProcessHeap(), 0, wrapper);
return hr;
}
+
+/***********************************************************************
+ * AVIFileCreateStream (AVIFILE.144)
+ */
+HRESULT WINAPI AVIFileCreateStream16(PAVIFILE pfile, PAVISTREAM *ppavi, LPAVISTREAMINFO16 asi16)
+{
+ AVISTREAMINFOA asi;
+
+ if (!asi16)
+ return AVIFileCreateStreamA(pfile, ppavi, NULL);
+
+ asi.fccType = asi16->fccType;
+ asi.fccHandler = asi16->fccHandler;
+ asi.dwFlags = asi16->dwFlags;
+ asi.dwCaps = asi16->dwCaps;
+ asi.wPriority = asi16->wPriority;
+ asi.wLanguage = asi16->wLanguage;
+ asi.dwScale = asi16->dwScale;
+ asi.dwRate = asi16->dwRate;
+ asi.dwStart = asi16->dwStart;
+ asi.dwLength = asi16->dwLength;
+ asi.dwInitialFrames = asi16->dwInitialFrames;
+ asi.dwSuggestedBufferSize = asi16->dwSuggestedBufferSize;
+ asi.dwQuality = asi16->dwQuality;
+ asi.dwSampleSize = asi16->dwSampleSize;
+ asi.rcFrame.left = asi16->rcFrame.left;
+ asi.rcFrame.top = asi16->rcFrame.top;
+ asi.rcFrame.right = asi16->rcFrame.right;
+ asi.rcFrame.bottom = asi16->rcFrame.bottom;
+ asi.dwEditCount = asi16->dwEditCount;
+ asi.dwFormatChangeCount = asi16->dwFormatChangeCount;
+ memcpy(&asi.szName, &asi16->szName, sizeof(asi.szName));
+
+ return AVIFileCreateStreamA(pfile, ppavi, &asi);
+}
+
+
+/***********************************************************************
+ * AVIStreamInfo (AVIFILE.162)
+ */
+HRESULT WINAPI AVIStreamInfo16(PAVISTREAM pstream, LPAVISTREAMINFO16 asi16, LONG size)
+{
+ AVISTREAMINFOA asi;
+ HRESULT hr;
+
+ if (!asi16)
+ return AVIStreamInfoA(pstream, NULL, size);
+
+ if (size < sizeof(AVISTREAMINFO16))
+ return AVIERR_BADSIZE;
+
+ hr = AVIStreamInfoA(pstream, &asi, sizeof(asi));
+ if (SUCCEEDED(hr))
+ {
+ asi16->fccType = asi.fccType;
+ asi16->fccHandler = asi.fccHandler;
+ asi16->dwFlags = asi.dwFlags;
+ asi16->dwCaps = asi.dwCaps;
+ asi16->wPriority = asi.wPriority;
+ asi16->wLanguage = asi.wLanguage;
+ asi16->dwScale = asi.dwScale;
+ asi16->dwRate = asi.dwRate;
+ asi16->dwStart = asi.dwStart;
+ asi16->dwLength = asi.dwLength;
+ asi16->dwInitialFrames = asi.dwInitialFrames;
+ asi16->dwSuggestedBufferSize = asi.dwSuggestedBufferSize;
+ asi16->dwQuality = asi.dwQuality;
+ asi16->dwSampleSize = asi.dwSampleSize;
+ asi16->rcFrame.left = asi.rcFrame.left;
+ asi16->rcFrame.top = asi.rcFrame.top;
+ asi16->rcFrame.right = asi.rcFrame.right;
+ asi16->rcFrame.bottom = asi.rcFrame.bottom;
+ asi16->dwEditCount = asi.dwEditCount;
+ asi16->dwFormatChangeCount = asi.dwFormatChangeCount;
+ memcpy(&asi16->szName, &asi.szName, sizeof(asi.szName));
+ }
+
+ return hr;
+}
--
2.7.0

View File

@@ -0,0 +1,2 @@
Fixes: Correctly convert result of AVIStreamGetFrame to a segptr in avifile.dll16
Fixes: Convert between AVISTREAMINFO (16 bit) and AVISTREAMINFOA in avifile.dll16

View File

@@ -0,0 +1,116 @@
From 63d0af4a9607ae31514604032a5504457ad84097 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: 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 89ce07a..64548a0 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -48,6 +48,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 */
@@ -55,6 +56,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 */
@@ -62,6 +64,7 @@ static struct enum_device_entry
"WINE Direct3D7 Hardware acceleration using WineD3D",
"Direct3D HAL",
&IID_IDirect3DHALDevice,
+ 0,
},
/* RGB device */
@@ -69,6 +72,7 @@ static struct enum_device_entry
"WINE Direct3D7 RGB Software Emulation using WineD3D",
"Wine D3D7 RGB",
&IID_IDirect3DRGBDevice,
+ D3DDEVCAPS_HWTRANSFORMANDLIGHT,
},
};
@@ -3565,6 +3569,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;
@@ -3581,11 +3586,15 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
return hr;
}
+ dev_caps = device_desc7.dwDevCaps;
+
for (i = 0; i < sizeof(device_list7)/sizeof(device_list7[0]); 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 34167c1..76dabee 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -230,6 +230,19 @@ static HRESULT WINAPI enum_devtype_cb(char *desc_str, char *name, D3DDEVICEDESC7
return DDENUMRET_OK;
}
+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)
{
IDirectDrawSurface7 *surface, *ds;
@@ -240,6 +253,7 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
IDirect3D7 *d3d7;
HRESULT hr;
BOOL hal_ok = FALSE;
+ BOOL software_ok = FALSE;
const GUID *devtype = &IID_IDirect3DHALDevice;
if (!(ddraw = create_ddraw()))
@@ -283,6 +297,10 @@ static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr);
if (hal_ok) devtype = &IID_IDirect3DTnLHalDevice;
+ hr = IDirect3D7_EnumDevices(d3d7, 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(d3d7, devtype, enum_z_fmt, &z_fmt);
if (FAILED(hr) || !z_fmt.dwSize)
--
2.7.0

View File

@@ -0,0 +1 @@
Fixes: Don't set HWTRANSFORMANDLIGHT flag on d3d7 RGB device

View File

@@ -1,17 +1,17 @@
From f1ad7b7975ed611a4989986f35ea3695eca0f26c Mon Sep 17 00:00:00 2001
From aee6d79ac93aecb6eb7927e42736609d0d473c31 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:55:03 +0200
Subject: ddraw: Allow size and format conversions in IDirect3DTexture2::Load.
---
dlls/ddraw/surface.c | 147 ++++++++++++++++++++++++++-------------------------
1 file changed, 76 insertions(+), 71 deletions(-)
dlls/ddraw/surface.c | 151 +++++++++++++++++++++++++++------------------------
1 file changed, 80 insertions(+), 71 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 8a10eff..cb71a65 100644
index 6a07cd7..cacf14c 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5062,6 +5062,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
@@ -5041,6 +5041,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
return impl_from_IDirectDrawSurface7(next_level);
}
@@ -58,10 +58,22 @@ index 8a10eff..cb71a65 100644
/*****************************************************************************
* IDirect3DTexture2::Load
*
@@ -5095,90 +5135,56 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5062,7 +5102,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
{
struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture2(iface);
struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture2(src_texture);
- struct wined3d_resource *dst_resource, *src_resource;
+ RECT src_rect, dst_rect;
HRESULT hr;
TRACE("iface %p, src_texture %p.\n", iface, src_texture);
@@ -5075,90 +5115,60 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
wined3d_mutex_lock();
- dst_resource = wined3d_texture_get_resource(dst_surface->wined3d_texture);
- src_resource = wined3d_texture_get_resource(src_surface->wined3d_texture);
-
- if (((src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
- != (dst_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP))
- || (src_surface->surface_desc.u2.dwMipMapCount != dst_surface->surface_desc.u2.dwMipMapCount))
@@ -143,37 +155,37 @@ index 8a10eff..cb71a65 100644
+ return E_FAIL;
+ }
- /* Copy the main memory texture into the surface that corresponds
- * to the OpenGL texture object. */
-
- hr = wined3d_surface_map(src_surface->wined3d_surface, &src_map_desc, NULL, 0);
- if (FAILED(hr))
- if (FAILED(hr = wined3d_resource_sub_resource_map(src_resource,
- src_surface->sub_resource_idx, &src_map_desc, NULL, 0)))
- {
- ERR("Failed to lock source surface, hr %#x.\n", hr);
- wined3d_mutex_unlock();
- return D3DERR_TEXTURE_LOAD_FAILED;
- }
-
- hr = wined3d_surface_map(dst_surface->wined3d_surface, &dst_map_desc, NULL, 0);
- if (FAILED(hr))
- if (FAILED(hr = wined3d_resource_sub_resource_map(dst_resource,
- dst_surface->sub_resource_idx, &dst_map_desc, NULL, 0)))
- {
- ERR("Failed to lock destination surface, hr %#x.\n", hr);
- wined3d_surface_unmap(src_surface->wined3d_surface);
- wined3d_resource_sub_resource_unmap(src_resource, src_surface->sub_resource_idx);
- wined3d_mutex_unlock();
- return D3DERR_TEXTURE_LOAD_FAILED;
- }
-
+ /* Suppress the ALLOCONLOAD flag */
+ dst_surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
- if (dst_surface->surface_desc.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC)
- memcpy(dst_map_desc.data, src_map_desc.data, src_surface->surface_desc.u1.dwLinearSize);
- else
- memcpy(dst_map_desc.data, src_map_desc.data, src_map_desc.row_pitch * src_desc->dwHeight);
+ /* Suppress the ALLOCONLOAD flag */
+ dst_surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
+ SetRect(&src_rect, 0, 0, src_surface->surface_desc.dwWidth, src_surface->surface_desc.dwHeight);
+ SetRect(&dst_rect, 0, 0, dst_surface->surface_desc.dwWidth, dst_surface->surface_desc.dwHeight);
- wined3d_surface_unmap(src_surface->wined3d_surface);
- wined3d_surface_unmap(dst_surface->wined3d_surface);
+ hr = wined3d_surface_blt(dst_surface->wined3d_surface, NULL, src_surface->wined3d_surface,
+ NULL, 0, NULL, WINED3D_TEXF_LINEAR);
- wined3d_resource_sub_resource_unmap(dst_resource, dst_surface->sub_resource_idx);
- wined3d_resource_sub_resource_unmap(src_resource, src_surface->sub_resource_idx);
+ hr = wined3d_texture_blt(dst_surface->wined3d_texture, dst_surface->sub_resource_idx, &dst_rect,
+ src_surface->wined3d_texture, src_surface->sub_resource_idx, &src_rect,
+ 0, NULL, WINED3D_TEXF_LINEAR);
+ if (FAILED(hr))
+ {
+ ERR("Failed to blit surface, hr %#x.\n", hr);
@@ -182,7 +194,7 @@ index 8a10eff..cb71a65 100644
}
if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
@@ -5191,12 +5197,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5171,12 +5181,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
else
dst_surface = NULL;
@@ -199,5 +211,5 @@ index 8a10eff..cb71a65 100644
wined3d_mutex_unlock();
--
2.6.2
2.7.0

View File

@@ -1 +1,2 @@
Fixes: Fix scaling behaviour of images and mipmap levels in IDirect3DTexture2_Load (needed for example by Prezzie Hunt)
Depends: wined3d-resource_map

View File

@@ -0,0 +1,90 @@
From 4227226984e3726aba1b0570db87679776842c5a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 7 Feb 2016 18:52:16 +0100
Subject: Revert "ddraw: Use wined3d_texture_get_sub_resource() in
ddraw_surface7_Flip()."
This reverts commit b1709522307a160a7c151f5293095a3c26ab998f.
---
dlls/ddraw/surface.c | 6 +++---
dlls/wined3d/surface.c | 7 +++++++
dlls/wined3d/wined3d.spec | 1 +
include/wine/wined3d.h | 1 +
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index f1ba858..a6fbceb 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -1268,7 +1268,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
wined3d_device_set_rendertarget_view(dst_impl->ddraw->wined3d_device, 0, src_rtv, FALSE);
wined3d_rendertarget_view_set_parent(src_rtv, dst_impl);
dst_impl->wined3d_rtv = src_rtv;
- wined3d_resource_set_parent(wined3d_texture_get_sub_resource(src_impl->wined3d_texture, 0), dst_impl);
+ wined3d_resource_set_parent(wined3d_surface_get_resource(src_impl->wined3d_surface), dst_impl);
dst_impl->wined3d_surface = src_impl->wined3d_surface;
prev_ddraw_texture = wined3d_texture_get_parent(src_impl->wined3d_texture);
wined3d_resource_set_parent(wined3d_texture_get_resource(src_impl->wined3d_texture), ddraw_texture);
@@ -1300,7 +1300,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
wined3d_device_set_rendertarget_view(dst_impl->ddraw->wined3d_device, 0, src_rtv, FALSE);
wined3d_rendertarget_view_set_parent(src_rtv, dst_impl);
dst_impl->wined3d_rtv = src_rtv;
- wined3d_resource_set_parent(wined3d_texture_get_sub_resource(src_impl->wined3d_texture, 0), dst_impl);
+ wined3d_resource_set_parent(wined3d_surface_get_resource(src_impl->wined3d_surface), dst_impl);
dst_impl->wined3d_surface = src_impl->wined3d_surface;
prev_ddraw_texture = wined3d_texture_get_parent(src_impl->wined3d_texture);
wined3d_resource_set_parent(wined3d_texture_get_resource(src_impl->wined3d_texture), ddraw_texture);
@@ -1318,7 +1318,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
wined3d_device_set_rendertarget_view(dst_impl->ddraw->wined3d_device, 0, tmp_rtv, FALSE);
wined3d_rendertarget_view_set_parent(tmp_rtv, src_impl);
src_impl->wined3d_rtv = tmp_rtv;
- wined3d_resource_set_parent(wined3d_texture_get_sub_resource(texture, 0), src_impl);
+ wined3d_resource_set_parent(wined3d_surface_get_resource(tmp), src_impl);
src_impl->wined3d_surface = tmp;
wined3d_resource_set_parent(wined3d_texture_get_resource(texture), ddraw_texture);
src_impl->wined3d_texture = texture;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 2a36619..e6c6258 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1890,6 +1890,13 @@ void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
return surface->resource.parent;
}
+struct wined3d_resource * CDECL wined3d_surface_get_resource(struct wined3d_surface *surface)
+{
+ TRACE("surface %p.\n", surface);
+
+ return &surface->resource;
+}
+
DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
{
unsigned int alignment;
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 86d03f0..c07e0ca 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -225,6 +225,7 @@
@ cdecl wined3d_surface_get_overlay_position(ptr ptr ptr)
@ cdecl wined3d_surface_get_parent(ptr)
@ cdecl wined3d_surface_get_pitch(ptr)
+@ cdecl wined3d_surface_get_resource(ptr)
@ cdecl wined3d_surface_set_overlay_position(ptr long long)
@ cdecl wined3d_surface_update_overlay(ptr ptr ptr ptr long ptr)
@ cdecl wined3d_surface_update_overlay_z_order(ptr long ptr)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 8f9d80a..1b13a20 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2477,6 +2477,7 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
HRESULT __cdecl wined3d_surface_get_overlay_position(const struct wined3d_surface *surface, LONG *x, LONG *y);
void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface);
DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface);
+struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface);
HRESULT __cdecl wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y);
HRESULT __cdecl wined3d_surface_update_overlay(struct wined3d_surface *surface, const RECT *src_rect,
struct wined3d_surface *dst_surface, const RECT *dst_rect, DWORD flags, const WINEDDOVERLAYFX *fx);
--
2.7.0

View File

@@ -0,0 +1,64 @@
From e70e6047539d266d0b7101e92ba789eed5cf9928 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 7 Feb 2016 18:52:49 +0100
Subject: Revert "ddraw: Move the mip-level dimensions fix-up from
ddraw_surface_init() to ddraw_surface_create()."
This reverts commit 7d45318aeac41e2efabb9ddfbf95ecbea103e67d.
---
dlls/ddraw/surface.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index a6fbceb..923a935 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5643,8 +5643,8 @@ static HRESULT CDECL ddraw_reset_enum_callback(struct wined3d_resource *resource
HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc,
struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version)
{
- struct wined3d_resource_desc wined3d_desc, wined3d_mip_desc;
struct ddraw_surface *root, *mip, **attach;
+ struct wined3d_resource_desc wined3d_desc;
struct wined3d_texture *wined3d_texture;
struct wined3d_resource *resource;
struct wined3d_display_mode mode;
@@ -6103,17 +6103,9 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
mip_desc = &mip->surface_desc;
if (j)
- {
- wined3d_resource_get_desc(resource, &wined3d_mip_desc);
- mip_desc->dwWidth = wined3d_mip_desc.width;
- mip_desc->dwHeight = wined3d_mip_desc.height;
-
mip_desc->ddsCaps.dwCaps2 |= DDSCAPS2_MIPMAPSUBLEVEL;
- }
else
- {
mip_desc->ddsCaps.dwCaps2 &= ~DDSCAPS2_MIPMAPSUBLEVEL;
- }
if (mip_desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
{
@@ -6241,6 +6233,7 @@ void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw,
{
struct ddraw_texture *texture = wined3d_texture_get_parent(wined3d_texture);
DDSURFACEDESC2 *desc = &surface->surface_desc;
+ struct wined3d_resource_desc wined3d_desc;
unsigned int version = texture->version;
surface->IDirectDrawSurface7_iface.lpVtbl = &ddraw_surface7_vtbl;
@@ -6272,6 +6265,9 @@ void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw,
}
*desc = texture->surface_desc;
+ wined3d_resource_get_desc(wined3d_surface_get_resource(wined3d_surface), &wined3d_desc);
+ desc->dwWidth = wined3d_desc.width;
+ desc->dwHeight = wined3d_desc.height;
surface->first_attached = surface;
if (format_is_compressed(&desc->u4.ddpfPixelFormat))
--
2.7.0

View File

@@ -0,0 +1 @@
Fixes: [40094] Revert patches to move mip-level dimensions fixup (causes regressions in multiple games)

Some files were not shown because too many files have changed in this diff Show More