You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
52 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7881913b09 | ||
|
88a1a26f34 | ||
|
53aeae58ad | ||
|
33efbf2440 | ||
|
2a755a9b6f | ||
|
60e835b183 | ||
|
c32efc1a79 | ||
|
1119b4401a | ||
|
c55ebfa2a4 | ||
|
884a25c8bf | ||
|
81e2fbadc8 | ||
|
d9d5df9f73 | ||
|
9c5d1ebec9 | ||
|
6057508b9b | ||
|
1ff77100b8 | ||
|
60d570e5f1 | ||
|
76007a01a2 | ||
|
d924318742 | ||
|
1cc5d04346 | ||
|
ecf0d1c5c2 | ||
|
d834b49a37 | ||
|
230c30c8e3 | ||
|
89830856c3 | ||
|
5f82b6610f | ||
|
bdc0bd9ac4 | ||
|
2b415aff4f | ||
|
253835e7c3 | ||
|
29d851bf3a | ||
|
481488be9f | ||
|
74528271f3 | ||
|
06886567bc | ||
|
a12dca03ce | ||
|
f6d52a6a19 | ||
|
6ab46f2760 | ||
|
cc8133fd8c | ||
|
9392a75d90 | ||
|
91eac1310f | ||
|
0fb4e4b319 | ||
|
dbbf832f67 | ||
|
e6ff2b49ac | ||
|
e4754f827a | ||
|
e374d7a750 | ||
|
2e509b911f | ||
|
c8b29193db | ||
|
52f7df8325 | ||
|
25019ba42d | ||
|
72479040c5 | ||
|
8f474115cd | ||
|
4a6f3210c9 | ||
|
a6c14e35e7 | ||
|
db836be757 | ||
|
e7a0f0e60e |
@@ -1 +0,0 @@
|
||||
Depends: kernel32-BeingDebugged
|
@@ -1,185 +0,0 @@
|
||||
From 9904ee15d00d0809c12759446c09adc1981e3cf9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 29 Aug 2016 19:45:47 +0200
|
||||
Subject: advapi32: Implement AddMandatoryAce.
|
||||
|
||||
---
|
||||
dlls/advapi32/security.c | 6 ++++--
|
||||
dlls/advapi32/tests/security.c | 45 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/ntdll.spec | 1 +
|
||||
dlls/ntdll/sec.c | 25 +++++++++++++++++++++++
|
||||
include/winbase.h | 1 +
|
||||
include/winternl.h | 1 +
|
||||
6 files changed, 77 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index 28331df..45c0f7e 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -1711,10 +1711,12 @@ BOOL WINAPI AddAce(
|
||||
return set_ntstatus(RtlAddAce(pAcl, dwAceRevision, dwStartingAceIndex, pAceList, nAceListLength));
|
||||
}
|
||||
|
||||
+/******************************************************************************
|
||||
+ * AddMandatoryAce [ADVAPI32.@]
|
||||
+ */
|
||||
BOOL WINAPI AddMandatoryAce(ACL *acl, DWORD ace_revision, DWORD ace_flags, DWORD mandatory_policy, PSID label_sid)
|
||||
{
|
||||
- FIXME("%p %x %x %x %p - stub\n", acl, ace_revision, ace_flags, mandatory_policy, label_sid);
|
||||
- return FALSE;
|
||||
+ return set_ntstatus(RtlAddMandatoryAce(acl, ace_revision, ace_flags, mandatory_policy, SYSTEM_MANDATORY_LABEL_ACE_TYPE, label_sid));
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 18f4e04..cdbe4f8 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -65,6 +65,7 @@
|
||||
static BOOL (WINAPI *pAddAccessAllowedAceEx)(PACL, DWORD, DWORD, DWORD, PSID);
|
||||
static BOOL (WINAPI *pAddAccessDeniedAceEx)(PACL, DWORD, DWORD, DWORD, PSID);
|
||||
static BOOL (WINAPI *pAddAuditAccessAceEx)(PACL, DWORD, DWORD, DWORD, PSID, BOOL, BOOL);
|
||||
+static BOOL (WINAPI *pAddMandatoryAce)(PACL,DWORD,DWORD,DWORD,PSID);
|
||||
static VOID (WINAPI *pBuildTrusteeWithSidA)( PTRUSTEEA pTrustee, PSID pSid );
|
||||
static VOID (WINAPI *pBuildTrusteeWithNameA)( PTRUSTEEA pTrustee, LPSTR pName );
|
||||
static VOID (WINAPI *pBuildTrusteeWithObjectsAndNameA)( PTRUSTEEA pTrustee,
|
||||
@@ -199,6 +200,7 @@ static void init(void)
|
||||
pAddAccessAllowedAceEx = (void *)GetProcAddress(hmod, "AddAccessAllowedAceEx");
|
||||
pAddAccessDeniedAceEx = (void *)GetProcAddress(hmod, "AddAccessDeniedAceEx");
|
||||
pAddAuditAccessAceEx = (void *)GetProcAddress(hmod, "AddAuditAccessAceEx");
|
||||
+ pAddMandatoryAce = (void *)GetProcAddress(hmod, "AddMandatoryAce");
|
||||
pCheckTokenMembership = (void *)GetProcAddress(hmod, "CheckTokenMembership");
|
||||
pConvertStringSecurityDescriptorToSecurityDescriptorA =
|
||||
(void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorA" );
|
||||
@@ -6064,6 +6066,48 @@ static void test_default_dacl_owner_sid(void)
|
||||
CloseHandle( handle );
|
||||
}
|
||||
|
||||
+static void test_integrity(void)
|
||||
+{
|
||||
+ static SID low_level = {SID_REVISION, 1, {SECURITY_MANDATORY_LABEL_AUTHORITY},
|
||||
+ {SECURITY_MANDATORY_LOW_RID}};
|
||||
+ SYSTEM_MANDATORY_LABEL_ACE *ace;
|
||||
+ char buffer_acl[256];
|
||||
+ ACL *pAcl = (ACL*)&buffer_acl;
|
||||
+ BOOL ret, found;
|
||||
+ DWORD index;
|
||||
+
|
||||
+ if (!pAddMandatoryAce)
|
||||
+ {
|
||||
+ win_skip("Mandatory integrity labels not supported, skipping test\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ret = InitializeAcl(pAcl, 256, ACL_REVISION);
|
||||
+ ok(ret, "InitializeAcl failed with %u\n", GetLastError());
|
||||
+
|
||||
+ ret = pAddMandatoryAce(pAcl, ACL_REVISION, 0, 0x1234, &low_level);
|
||||
+ ok(!ret, "AddMandatoryAce succeeded\n");
|
||||
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER got %u\n", GetLastError());
|
||||
+
|
||||
+ ret = pAddMandatoryAce(pAcl, ACL_REVISION, 0, SYSTEM_MANDATORY_LABEL_NO_WRITE_UP, &low_level);
|
||||
+ ok(ret, "AddMandatoryAce failed with %u\n", GetLastError());
|
||||
+
|
||||
+ index = 0;
|
||||
+ found = FALSE;
|
||||
+ while (pGetAce( pAcl, index++, (void **)&ace ))
|
||||
+ {
|
||||
+ if (ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE)
|
||||
+ {
|
||||
+ found = TRUE;
|
||||
+ ok(ace->Header.AceFlags == 0, "Expected 0 as flags, got %x\n", ace->Header.AceFlags);
|
||||
+ ok(ace->Mask == SYSTEM_MANDATORY_LABEL_NO_WRITE_UP,
|
||||
+ "Expected SYSTEM_MANDATORY_LABEL_NO_WRITE_UP as flag, got %x\n", ace->Mask);
|
||||
+ ok(EqualSid(&ace->SidStart, &low_level), "Expected low integrity level\n");
|
||||
+ }
|
||||
+ }
|
||||
+ ok(found, "Could not find mandatory label\n");
|
||||
+}
|
||||
+
|
||||
static void test_AdjustTokenPrivileges(void)
|
||||
{
|
||||
TOKEN_PRIVILEGES tp, prev;
|
||||
@@ -6444,6 +6488,7 @@ START_TEST(security)
|
||||
test_CreateRestrictedToken();
|
||||
test_TokenIntegrityLevel();
|
||||
test_default_dacl_owner_sid();
|
||||
+ test_integrity();
|
||||
test_AdjustTokenPrivileges();
|
||||
test_AddAce();
|
||||
test_system_security_access();
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 28aa2df..f6f8eba 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -422,6 +422,7 @@
|
||||
@ stdcall RtlAddAuditAccessAceEx(ptr long long long ptr long long)
|
||||
@ stdcall RtlAddAuditAccessObjectAce(ptr long long long ptr ptr ptr long long)
|
||||
# @ stub RtlAddCompoundAce
|
||||
+@ stdcall RtlAddMandatoryAce(ptr long long long long ptr)
|
||||
# @ stub RtlAddRange
|
||||
@ cdecl -arch=arm,x86_64 RtlAddFunctionTable(ptr long long)
|
||||
@ stdcall RtlAddRefActivationContext(ptr)
|
||||
diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c
|
||||
index 3bc52ac..daa2cae 100644
|
||||
--- a/dlls/ntdll/sec.c
|
||||
+++ b/dlls/ntdll/sec.c
|
||||
@@ -1379,6 +1379,31 @@ NTSTATUS WINAPI RtlAddAuditAccessObjectAce(
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
+/**************************************************************************
|
||||
+ * RtlAddMandatoryAce [NTDLL.@]
|
||||
+ */
|
||||
+NTSTATUS WINAPI RtlAddMandatoryAce(
|
||||
+ IN OUT PACL pAcl,
|
||||
+ IN DWORD dwAceRevision,
|
||||
+ IN DWORD dwAceFlags,
|
||||
+ IN DWORD dwMandatoryFlags,
|
||||
+ IN DWORD dwAceType,
|
||||
+ IN PSID pSid)
|
||||
+{
|
||||
+ static DWORD valid_flags = SYSTEM_MANDATORY_LABEL_NO_WRITE_UP | SYSTEM_MANDATORY_LABEL_NO_READ_UP |
|
||||
+ SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP;
|
||||
+
|
||||
+ TRACE("(%p,%d,0x%08x,0x%08x,%u,%p)\n",pAcl,dwAceRevision,dwAceFlags,dwMandatoryFlags, dwAceType, pSid);
|
||||
+
|
||||
+ if (dwAceType != SYSTEM_MANDATORY_LABEL_ACE_TYPE)
|
||||
+ return STATUS_INVALID_PARAMETER;
|
||||
+
|
||||
+ if (dwMandatoryFlags & ~valid_flags)
|
||||
+ return STATUS_INVALID_PARAMETER;
|
||||
+
|
||||
+ return add_access_ace(pAcl, dwAceRevision, dwAceFlags, dwMandatoryFlags, pSid, dwAceType);
|
||||
+}
|
||||
+
|
||||
/******************************************************************************
|
||||
* RtlValidAcl [NTDLL.@]
|
||||
*/
|
||||
diff --git a/include/winbase.h b/include/winbase.h
|
||||
index eff5972..42c826d 100644
|
||||
--- a/include/winbase.h
|
||||
+++ b/include/winbase.h
|
||||
@@ -1693,6 +1693,7 @@ WINBASEAPI ATOM WINAPI AddAtomW(LPCWSTR);
|
||||
#define AddAtom WINELIB_NAME_AW(AddAtom)
|
||||
WINADVAPI BOOL WINAPI AddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
|
||||
WINADVAPI BOOL WINAPI AddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
|
||||
+WINADVAPI BOOL WINAPI AddMandatoryAce(PACL,DWORD,DWORD,DWORD,PSID);
|
||||
WINBASEAPI VOID WINAPI AddRefActCtx(HANDLE);
|
||||
WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
|
||||
WINADVAPI BOOL WINAPI AdjustTokenGroups(HANDLE,BOOL,PTOKEN_GROUPS,DWORD,PTOKEN_GROUPS,PDWORD);
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index f35091c..c104e6f 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -2405,6 +2405,7 @@ NTSYSAPI NTSTATUS WINAPI RtlAddAtomToAtomTable(RTL_ATOM_TABLE,const WCHAR*,RTL_
|
||||
NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessAceEx(PACL,DWORD,DWORD,DWORD,PSID,BOOL,BOOL);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlAddAuditAccessObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID,BOOL,BOOL);
|
||||
+NTSYSAPI NTSTATUS WINAPI RtlAddMandatoryAce(PACL,DWORD,DWORD,DWORD,DWORD,PSID);
|
||||
NTSYSAPI void WINAPI RtlAddRefActivationContext(HANDLE);
|
||||
NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
|
||||
NTSYSAPI NTSTATUS WINAPI RtlAdjustPrivilege(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
|
||||
--
|
||||
2.9.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: Implement advapi32.AddMandatoryAce
|
@@ -1,4 +1,4 @@
|
||||
From cb383abcb7d36d739092a93c1f276895622b6806 Mon Sep 17 00:00:00 2001
|
||||
From b4469d7a12637ef2b57df3f6aebbe65c9b52ef57 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 28 Aug 2016 21:56:41 +0200
|
||||
Subject: advapi32: Implement GetExplicitEntriesFromAclW.
|
||||
@@ -9,7 +9,7 @@ Subject: advapi32: Implement GetExplicitEntriesFromAclW.
|
||||
2 files changed, 221 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index 92a1789..c60aa4e 100644
|
||||
index 7e41c0a7361..ccd0bf64cab 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -4202,8 +4202,85 @@ DWORD WINAPI GetExplicitEntriesFromAclA( PACL pacl, PULONG pcCountOfExplicitEntr
|
||||
@@ -101,7 +101,7 @@ index 92a1789..c60aa4e 100644
|
||||
|
||||
/******************************************************************************
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index cf104ab..2bcb108 100644
|
||||
index c31dfbeace3..23cbff58117 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -133,6 +133,7 @@ static BOOL (WINAPI *pGetWindowsAccountDomainSid)(PSID,PSID,DWORD*);
|
||||
@@ -120,8 +120,8 @@ index cf104ab..2bcb108 100644
|
||||
|
||||
myARGC = winetest_get_mainargs( &myARGV );
|
||||
}
|
||||
@@ -6378,6 +6380,145 @@ static void test_pseudo_tokens(void)
|
||||
"Expected ERROR_NO_TOKEN, got %u\n", GetLastError());
|
||||
@@ -6451,6 +6453,145 @@ static void test_maximum_allowed(void)
|
||||
CloseHandle(handle);
|
||||
}
|
||||
|
||||
+static void test_GetExplicitEntriesFromAclW(void)
|
||||
@@ -266,12 +266,12 @@ index cf104ab..2bcb108 100644
|
||||
START_TEST(security)
|
||||
{
|
||||
init();
|
||||
@@ -6424,4 +6565,5 @@ START_TEST(security)
|
||||
test_system_security_access();
|
||||
@@ -6499,4 +6640,5 @@ START_TEST(security)
|
||||
test_GetSidIdentifierAuthority();
|
||||
test_pseudo_tokens();
|
||||
test_maximum_allowed();
|
||||
+ test_GetExplicitEntriesFromAclW();
|
||||
}
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@@ -0,0 +1,61 @@
|
||||
From bb079b53bc79d44987d5f7ac93d0e1d2c5b00698 Mon Sep 17 00:00:00 2001
|
||||
From: Austin English <austinenglish@gmail.com>
|
||||
Date: Wed, 9 Nov 2016 21:46:10 -0600
|
||||
Subject: advapi32: add LookupSecurityDescriptorPartsA/W stubs
|
||||
|
||||
Fixes https://bugs.winehq.org/show_bug.cgi?id=41682
|
||||
---
|
||||
dlls/advapi32/advapi32.spec | 4 ++--
|
||||
dlls/advapi32/security.c | 24 ++++++++++++++++++++++++
|
||||
2 files changed, 26 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
|
||||
index 6c57c88adf7..88d8634ef64 100644
|
||||
--- a/dlls/advapi32/advapi32.spec
|
||||
+++ b/dlls/advapi32/advapi32.spec
|
||||
@@ -415,8 +415,8 @@
|
||||
@ stdcall LookupPrivilegeNameW(wstr ptr ptr ptr)
|
||||
@ stdcall LookupPrivilegeValueA(ptr ptr ptr)
|
||||
@ stdcall LookupPrivilegeValueW(ptr ptr ptr)
|
||||
-# @ stub LookupSecurityDescriptorPartsA
|
||||
-# @ stub LookupSecurityDescriptorPartsW
|
||||
+@ stdcall LookupSecurityDescriptorPartsA(ptr ptr ptr ptr ptr ptr ptr)
|
||||
+@ stdcall LookupSecurityDescriptorPartsW(ptr ptr ptr ptr ptr ptr ptr)
|
||||
@ stdcall LsaAddAccountRights(ptr ptr ptr long)
|
||||
@ stub LsaAddPrivilegesToAccount
|
||||
# @ stub LsaClearAuditLog
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index 3b5d7a42b6f..01e8ea02706 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -6199,3 +6199,27 @@ BOOL WINAPI SaferSetLevelInformation(SAFER_LEVEL_HANDLE handle, SAFER_OBJECT_INF
|
||||
FIXME("(%p %u %p %u) stub\n", handle, infotype, buffer, size);
|
||||
return FALSE;
|
||||
}
|
||||
+
|
||||
+/******************************************************************************
|
||||
+ * LookupSecurityDescriptorPartsA [ADVAPI32.@]
|
||||
+ */
|
||||
+DWORD WINAPI LookupSecurityDescriptorPartsA(TRUSTEEA *owner, TRUSTEEA *group, ULONG *access_count,
|
||||
+ EXPLICIT_ACCESSA *access_list, ULONG *audit_count,
|
||||
+ EXPLICIT_ACCESSA *audit_list, SECURITY_DESCRIPTOR *descriptor)
|
||||
+{
|
||||
+ FIXME("(%p %p %p %p %p %p %p) stub\n", owner, group, access_count,
|
||||
+ access_list, audit_count, audit_list, descriptor);
|
||||
+ return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+/******************************************************************************
|
||||
+ * LookupSecurityDescriptorPartsW [ADVAPI32.@]
|
||||
+ */
|
||||
+DWORD WINAPI LookupSecurityDescriptorPartsW(TRUSTEEW *owner, TRUSTEEW *group, ULONG *access_count,
|
||||
+ EXPLICIT_ACCESSW *access_list, ULONG *audit_count,
|
||||
+ EXPLICIT_ACCESSW *audit_list, SECURITY_DESCRIPTOR *descriptor)
|
||||
+{
|
||||
+ FIXME("(%p %p %p %p %p %p %p) stub\n", owner, group, access_count,
|
||||
+ access_list, audit_count, audit_list, descriptor);
|
||||
+ return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
+}
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -0,0 +1 @@
|
||||
Fixes: [41682] Add stub for advapi32.LookupSecurityDescriptorPartsA/W
|
@@ -1,4 +1,4 @@
|
||||
From 616c17cc58a4943d3a367704943e737d5713740d Mon Sep 17 00:00:00 2001
|
||||
From 77d43d721793edda9b419f7426442a35f0cb5918 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 7 Apr 2015 11:23:34 +0800
|
||||
Subject: advapi32: Fallback to Sid string when LookupAccountSid fails.
|
||||
@@ -8,7 +8,7 @@ Subject: advapi32: Fallback to Sid string when LookupAccountSid fails.
|
||||
1 file changed, 31 insertions(+)
|
||||
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index 258b8ca..93afa20 100644
|
||||
index 1b270a80829..b8dedbd6d58 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -29,6 +29,7 @@
|
||||
@@ -19,8 +19,8 @@ index 258b8ca..93afa20 100644
|
||||
#include "advapi32_misc.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
@@ -554,6 +555,21 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
heap_free(name);
|
||||
@@ -562,6 +563,21 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
domain.MaximumLength = sizeof(WCHAR);
|
||||
}
|
||||
}
|
||||
+ else
|
||||
@@ -41,9 +41,9 @@ index 258b8ca..93afa20 100644
|
||||
}
|
||||
|
||||
/* now we have full length needed for both */
|
||||
@@ -593,6 +609,21 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
heap_free(domain.Buffer);
|
||||
}
|
||||
@@ -605,6 +621,21 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
(*Names)[i].DomainIndex = lsa_reflist_add_domain(*ReferencedDomains, &domain, &domain_data);
|
||||
heap_free(domain.Buffer);
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
@@ -64,5 +64,5 @@ index 258b8ca..93afa20 100644
|
||||
name_buffer += name_size;
|
||||
}
|
||||
--
|
||||
2.3.5
|
||||
2.11.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 51fb5229fdb33887fe25440defc8df09d1623abb Mon Sep 17 00:00:00 2001
|
||||
From 306414ced0169b9ee4de34706e9235acb1bd93d6 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.
|
||||
@@ -13,7 +13,7 @@ Subject: kernelbase: Add dll and add stub for QuirkIsEnabled.
|
||||
create mode 100644 dlls/kernelbase/misc.c
|
||||
|
||||
diff --git a/dlls/kernelbase/Makefile.in b/dlls/kernelbase/Makefile.in
|
||||
index b9caed0..2beb34b 100644
|
||||
index b9caed090b2..2beb34bafdb 100644
|
||||
--- a/dlls/kernelbase/Makefile.in
|
||||
+++ b/dlls/kernelbase/Makefile.in
|
||||
@@ -1 +1,4 @@
|
||||
@@ -22,7 +22,7 @@ index b9caed0..2beb34b 100644
|
||||
+C_SRCS = \
|
||||
+ misc.c
|
||||
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
|
||||
index f104030..e09112e 100644
|
||||
index f104030ab25..74ff728cbc8 100644
|
||||
--- a/dlls/kernelbase/kernelbase.spec
|
||||
+++ b/dlls/kernelbase/kernelbase.spec
|
||||
@@ -1,3 +1,6 @@
|
||||
@@ -96,7 +96,7 @@ index f104030..e09112e 100644
|
||||
-@ stub BaseReleaseProcessDllPath
|
||||
-@ stub BaseReleaseProcessExePath
|
||||
+@ stub BaseDumpAppcompatCache
|
||||
+@ stub BaseFlushAppcompatCache
|
||||
+@ stdcall BaseFlushAppcompatCache() kernel32.BaseFlushAppcompatCache
|
||||
+@ stub BaseFormatObjectAttributes
|
||||
+@ stub BaseFreeAppCompatDataForProcess
|
||||
+@ stub BaseGetNamedObjectDirectory
|
||||
@@ -244,7 +244,7 @@ index f104030..e09112e 100644
|
||||
+@ stdcall CreateWaitableTimerW(ptr long wstr) kernel32.CreateWaitableTimerW
|
||||
@ stdcall CreateWellKnownSid(long ptr ptr ptr) advapi32.CreateWellKnownSid
|
||||
+@ stub CtrlRoutine
|
||||
+@ stdcall DeactivateActCtx(long ptr) kernel32.DeactivateActCtx
|
||||
+@ stdcall DeactivateActCtx(long long) kernel32.DeactivateActCtx
|
||||
+@ stdcall DebugActiveProcess(long) kernel32.DebugActiveProcess
|
||||
+@ stdcall DebugActiveProcessStop(long) kernel32.DebugActiveProcessStop
|
||||
@ stdcall DebugBreak() kernel32.DebugBreak
|
||||
@@ -433,7 +433,7 @@ index f104030..e09112e 100644
|
||||
@ stub GetCalendar
|
||||
@ stdcall GetCalendarInfoEx(wstr long ptr long ptr long ptr) kernel32.GetCalendarInfoEx
|
||||
@ stdcall GetCalendarInfoW(long long long ptr long ptr) kernel32.GetCalendarInfoW
|
||||
+@ stdcall GetCommConfig(long ptr long) kernel32.GetCommConfig
|
||||
+@ stdcall GetCommConfig(long ptr ptr) kernel32.GetCommConfig
|
||||
+@ stdcall GetCommMask(long ptr) kernel32.GetCommMask
|
||||
+@ stdcall GetCommModemStatus(long ptr) kernel32.GetCommModemStatus
|
||||
+@ stdcall GetCommProperties(long ptr) kernel32.GetCommProperties
|
||||
@@ -1354,7 +1354,7 @@ index f104030..e09112e 100644
|
||||
+@ stub SetClientTimeZoneInformation
|
||||
+@ stdcall SetCommBreak(long) kernel32.SetCommBreak
|
||||
+@ stdcall SetCommConfig(long ptr long) kernel32.SetCommConfig
|
||||
+@ stdcall SetCommMask(long ptr) kernel32.SetCommMask
|
||||
+@ stdcall SetCommMask(long long) kernel32.SetCommMask
|
||||
+@ stdcall SetCommState(long ptr) kernel32.SetCommState
|
||||
+@ stdcall SetCommTimeouts(long ptr) kernel32.SetCommTimeouts
|
||||
+@ stdcall SetComputerNameA(str) kernel32.SetComputerNameA
|
||||
@@ -1715,7 +1715,7 @@ index f104030..e09112e 100644
|
||||
+@ stub wprintf
|
||||
diff --git a/dlls/kernelbase/misc.c b/dlls/kernelbase/misc.c
|
||||
new file mode 100644
|
||||
index 0000000..be1591a
|
||||
index 00000000000..be1591aee7e
|
||||
--- /dev/null
|
||||
+++ b/dlls/kernelbase/misc.c
|
||||
@@ -0,0 +1,37 @@
|
||||
@@ -1757,7 +1757,7 @@ index 0000000..be1591a
|
||||
+ return FALSE;
|
||||
+}
|
||||
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
|
||||
index 6b6ead2..7c2a9d1 100644
|
||||
index 6b6ead26968..7c2a9d117e0 100644
|
||||
--- a/dlls/shlwapi/shlwapi.spec
|
||||
+++ b/dlls/shlwapi/shlwapi.spec
|
||||
@@ -417,7 +417,7 @@
|
||||
@@ -1770,10 +1770,10 @@ 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 8e11529..eba8548 100755
|
||||
index 1e2400e4c7f..a245aefe406 100755
|
||||
--- a/tools/make_specfiles
|
||||
+++ b/tools/make_specfiles
|
||||
@@ -233,6 +233,7 @@ my @dll_groups =
|
||||
@@ -249,6 +249,7 @@ my @dll_groups =
|
||||
[
|
||||
"kernel32",
|
||||
"advapi32",
|
||||
@@ -1782,5 +1782,5 @@ index 8e11529..eba8548 100755
|
||||
"kernelbase",
|
||||
"api-ms-win-core-bem-l1-1-0",
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@@ -1,42 +0,0 @@
|
||||
From 64ce8c391c3706a2b3ce9b5f8f76710d5751a766 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 20 Oct 2016 17:48:24 +0800
|
||||
Subject: avifil32: AVIFileGetStream should set stream to NULL in case of an
|
||||
error.
|
||||
|
||||
---
|
||||
dlls/avifil32/avifile.c | 1 +
|
||||
dlls/avifil32/tests/api.c | 5 +++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c
|
||||
index f649d05..7a4caaa 100644
|
||||
--- a/dlls/avifil32/avifile.c
|
||||
+++ b/dlls/avifil32/avifile.c
|
||||
@@ -316,6 +316,7 @@ static HRESULT WINAPI IAVIFile_fnGetStream(IAVIFile *iface, IAVIStream **avis, D
|
||||
}
|
||||
|
||||
/* Sorry, but the specified stream doesn't exist */
|
||||
+ *avis = NULL;
|
||||
return AVIERR_NODATA;
|
||||
}
|
||||
|
||||
diff --git a/dlls/avifil32/tests/api.c b/dlls/avifil32/tests/api.c
|
||||
index b3d822d..8a00865 100644
|
||||
--- a/dlls/avifil32/tests/api.c
|
||||
+++ b/dlls/avifil32/tests/api.c
|
||||
@@ -373,6 +373,11 @@ static void test_default_data(void)
|
||||
res = AVIFileOpenA(&pFile, filename, OF_SHARE_DENY_WRITE, 0L);
|
||||
ok(res == 0, "Unable to open file: error=%u\n", res);
|
||||
|
||||
+ pStream0 = (void *)0xdeadbeef;
|
||||
+ res = AVIFileGetStream(pFile, &pStream0, ~0, 0);
|
||||
+ ok(res == AVIERR_NODATA, "expected AVIERR_NODATA, got %#x\n", res);
|
||||
+ ok(pStream0 == NULL, "AVIFileGetStream should set stream to NULL\n");
|
||||
+
|
||||
res = AVIFileGetStream(pFile, &pStream0, 0, 0);
|
||||
ok(res == 0, "Unable to open video stream: error=%u\n", res);
|
||||
|
||||
--
|
||||
2.9.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [41579] AVIFileGetStream should set stream to NULL in case of an error
|
@@ -1,4 +1,4 @@
|
||||
From c178117abacbf8644ae05429999ff8e8f8585a7e Mon Sep 17 00:00:00 2001
|
||||
From 489a67ec803b382248134be53f3449c206e208ff Mon Sep 17 00:00:00 2001
|
||||
From: Hans Leidekker <hans@codeweavers.com>
|
||||
Date: Mon, 19 Dec 2016 19:38:52 +0100
|
||||
Subject: bcrypt: Add AES provider.
|
||||
@@ -53,7 +53,7 @@ index e299fe0cce8..962953e509b 100644
|
||||
@ stub BCryptUnregisterConfigChangeNotify
|
||||
@ stub BCryptUnregisterProvider
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 6023c942e49..5e066283f6e 100644
|
||||
index 6023c942e49..5867dbdc3fa 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -49,6 +49,10 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
@@ -208,7 +208,7 @@ index 6023c942e49..5e066283f6e 100644
|
||||
return BCryptDestroyHash( handle );
|
||||
}
|
||||
|
||||
+#if defined(HAVE_GNUTLS_HASH)
|
||||
+#if defined(HAVE_GNUTLS_HASH) && !defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||
+struct key
|
||||
+{
|
||||
+ struct object hdr;
|
||||
|
@@ -1,248 +0,0 @@
|
||||
From 8b23d1c04949938de77466556f7caf9321687a33 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hater <7element@mail.bg>
|
||||
Date: Wed, 16 Sep 2015 15:49:58 +0300
|
||||
Subject: comctl32: Implement PROPSHEET_InsertPage based on PROPSHEET_AddPage
|
||||
|
||||
---
|
||||
dlls/comctl32/propsheet.c | 152 +++++++++++++++++++++++++---------------
|
||||
dlls/comctl32/tests/propsheet.c | 18 ++---
|
||||
2 files changed, 104 insertions(+), 66 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
|
||||
index ce7001c..fecb0e4 100644
|
||||
--- a/dlls/comctl32/propsheet.c
|
||||
+++ b/dlls/comctl32/propsheet.c
|
||||
@@ -172,6 +172,7 @@ static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psI
|
||||
static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg, const PropSheetInfo* psInfo);
|
||||
static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID);
|
||||
static BOOL PROPSHEET_RemovePage(HWND hwndDlg, int index, HPROPSHEETPAGE hpage);
|
||||
+static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter, HPROPSHEETPAGE hpage);
|
||||
|
||||
static INT_PTR CALLBACK
|
||||
PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
@@ -2259,60 +2260,9 @@ static LRESULT PROPSHEET_QuerySiblings(HWND hwndDlg,
|
||||
static BOOL PROPSHEET_AddPage(HWND hwndDlg,
|
||||
HPROPSHEETPAGE hpage)
|
||||
{
|
||||
- PropPageInfo * ppi;
|
||||
PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
|
||||
- HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
|
||||
- TCITEMW item;
|
||||
- LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)hpage;
|
||||
-
|
||||
TRACE("hpage %p\n", hpage);
|
||||
- /*
|
||||
- * Allocate and fill in a new PropPageInfo entry.
|
||||
- */
|
||||
- ppi = ReAlloc(psInfo->proppage, sizeof(PropPageInfo) * (psInfo->nPages + 1));
|
||||
- if (!ppi)
|
||||
- return FALSE;
|
||||
-
|
||||
- psInfo->proppage = ppi;
|
||||
- if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, psInfo->nPages, FALSE))
|
||||
- return FALSE;
|
||||
-
|
||||
- psInfo->proppage[psInfo->nPages].hpage = hpage;
|
||||
-
|
||||
- if (ppsp->dwFlags & PSP_PREMATURE)
|
||||
- {
|
||||
- /* Create the page but don't show it */
|
||||
- if(!PROPSHEET_CreatePage(hwndDlg, psInfo->nPages, psInfo, ppsp))
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Add a new tab to the tab control.
|
||||
- */
|
||||
- item.mask = TCIF_TEXT;
|
||||
- item.pszText = (LPWSTR) psInfo->proppage[psInfo->nPages].pszText;
|
||||
- item.cchTextMax = MAX_TABTEXT_LENGTH;
|
||||
-
|
||||
- if (psInfo->hImageList)
|
||||
- {
|
||||
- SendMessageW(hwndTabControl, TCM_SETIMAGELIST, 0, (LPARAM)psInfo->hImageList);
|
||||
- }
|
||||
-
|
||||
- if ( psInfo->proppage[psInfo->nPages].hasIcon )
|
||||
- {
|
||||
- item.mask |= TCIF_IMAGE;
|
||||
- item.iImage = psInfo->nPages;
|
||||
- }
|
||||
-
|
||||
- SendMessageW(hwndTabControl, TCM_INSERTITEMW, psInfo->nPages + 1,
|
||||
- (LPARAM)&item);
|
||||
-
|
||||
- psInfo->nPages++;
|
||||
-
|
||||
- /* If it is the only page - show it */
|
||||
- if(psInfo->nPages == 1)
|
||||
- PROPSHEET_SetCurSel(hwndDlg, 0, 1, 0);
|
||||
- return TRUE;
|
||||
+ return PROPSHEET_InsertPage(hwndDlg, (HPROPSHEETPAGE)(ULONG_PTR)psInfo->nPages, hpage);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -2473,11 +2423,99 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
||||
*/
|
||||
static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter, HPROPSHEETPAGE hpage)
|
||||
{
|
||||
- if (IS_INTRESOURCE(hpageInsertAfter))
|
||||
- FIXME("(%p, %d, %p): stub\n", hwndDlg, LOWORD(hpageInsertAfter), hpage);
|
||||
- else
|
||||
- FIXME("(%p, %p, %p): stub\n", hwndDlg, hpageInsertAfter, hpage);
|
||||
- return FALSE;
|
||||
+ PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
|
||||
+ PropPageInfo * ppi, * prev_ppi = psInfo->proppage;
|
||||
+ HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
|
||||
+ LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)hpage;
|
||||
+ TCITEMW item;
|
||||
+ int index;
|
||||
+
|
||||
+ TRACE("hwndDlg %p, hpageInsertAfter %p, hpage %p\n", hwndDlg, hpageInsertAfter, hpage);
|
||||
+
|
||||
+ if (IS_INTRESOURCE(hpageInsertAfter))
|
||||
+ index = LOWORD(hpageInsertAfter);
|
||||
+ else
|
||||
+ {
|
||||
+ index = PROPSHEET_GetPageIndex(hpageInsertAfter, psInfo, -1);
|
||||
+ if (index < 0)
|
||||
+ {
|
||||
+ TRACE("Could not find page to insert after!\n");
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ index++;
|
||||
+ }
|
||||
+
|
||||
+ if (index > psInfo->nPages)
|
||||
+ index = psInfo->nPages;
|
||||
+
|
||||
+ /*
|
||||
+ * Allocate a new PropPageInfo entry.
|
||||
+ */
|
||||
+ ppi = Alloc(sizeof(PropPageInfo) * (psInfo->nPages + 1));
|
||||
+ if (!ppi)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ /*
|
||||
+ * Fill in a new PropPageInfo entry.
|
||||
+ */
|
||||
+ if (index > 0)
|
||||
+ memcpy(ppi, prev_ppi, index * sizeof(PropPageInfo));
|
||||
+ memset(&ppi[index], 0, sizeof(PropPageInfo));
|
||||
+ if (index < psInfo->nPages)
|
||||
+ memcpy(&ppi[index + 1], &prev_ppi[index], (psInfo->nPages - index) * sizeof(PropPageInfo));
|
||||
+ psInfo->proppage = ppi;
|
||||
+
|
||||
+ if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, index, FALSE))
|
||||
+ {
|
||||
+ psInfo->proppage = prev_ppi;
|
||||
+ Free(ppi);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ psInfo->proppage[index].hpage = hpage;
|
||||
+
|
||||
+ if (ppsp->dwFlags & PSP_PREMATURE)
|
||||
+ {
|
||||
+ /* Create the page but don't show it */
|
||||
+ if(!PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppsp))
|
||||
+ {
|
||||
+ psInfo->proppage = prev_ppi;
|
||||
+ Free(ppi);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ Free(prev_ppi);
|
||||
+ psInfo->nPages++;
|
||||
+ if (index <= psInfo->active_page)
|
||||
+ psInfo->active_page++;
|
||||
+
|
||||
+ /*
|
||||
+ * Add a new tab to the tab control.
|
||||
+ */
|
||||
+ item.mask = TCIF_TEXT;
|
||||
+ item.pszText = (LPWSTR) psInfo->proppage[index].pszText;
|
||||
+ item.cchTextMax = MAX_TABTEXT_LENGTH;
|
||||
+
|
||||
+ if (psInfo->hImageList)
|
||||
+ {
|
||||
+ SendMessageW(hwndTabControl, TCM_SETIMAGELIST, 0, (LPARAM)psInfo->hImageList);
|
||||
+ }
|
||||
+
|
||||
+ if (psInfo->proppage[index].hasIcon)
|
||||
+ {
|
||||
+ item.mask |= TCIF_IMAGE;
|
||||
+ item.iImage = index;
|
||||
+ }
|
||||
+
|
||||
+ SendMessageW(hwndTabControl, TCM_INSERTITEMW, index,
|
||||
+ (LPARAM)&item);
|
||||
+
|
||||
+ /* If it is the only page - show it */
|
||||
+ if (psInfo->nPages == 1)
|
||||
+ PROPSHEET_SetCurSel(hwndDlg, 0, 1, 0);
|
||||
+
|
||||
+ return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c
|
||||
index cdbbca8..bcc89bb 100644
|
||||
--- a/dlls/comctl32/tests/propsheet.c
|
||||
+++ b/dlls/comctl32/tests/propsheet.c
|
||||
@@ -920,7 +920,7 @@ static void test_PSM_INSERTPAGE(void)
|
||||
|
||||
/* add pages one by one */
|
||||
ret = SendMessageA(hdlg, PSM_INSERTPAGE, 5, (LPARAM)hpsp[1]);
|
||||
- todo_wine ok(ret == TRUE, "got %d\n", ret);
|
||||
+ ok(ret == TRUE, "got %d\n", ret);
|
||||
|
||||
/* try with invalid values */
|
||||
ret = SendMessageA(hdlg, PSM_INSERTPAGE, 0, 0);
|
||||
@@ -939,34 +939,34 @@ if (0)
|
||||
tab = (HWND)SendMessageA(hdlg, PSM_GETTABCONTROL, 0, 0);
|
||||
|
||||
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
|
||||
- todo_wine ok(r == 2, "got %d\n", r);
|
||||
+ ok(r == 2, "got %d\n", r);
|
||||
|
||||
ret = SendMessageA(hdlg, PSM_INSERTPAGE, (WPARAM)hpsp[1], (LPARAM)hpsp[2]);
|
||||
- todo_wine ok(ret == TRUE, "got %d\n", ret);
|
||||
+ ok(ret == TRUE, "got %d\n", ret);
|
||||
|
||||
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
|
||||
- todo_wine ok(r == 3, "got %d\n", r);
|
||||
+ ok(r == 3, "got %d\n", r);
|
||||
|
||||
/* add property sheet page that can't be created */
|
||||
ret = SendMessageA(hdlg, PSM_INSERTPAGE, 1, (LPARAM)hpsp[3]);
|
||||
- todo_wine ok(ret == TRUE, "got %d\n", ret);
|
||||
+ ok(ret == TRUE, "got %d\n", ret);
|
||||
|
||||
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
|
||||
- todo_wine ok(r == 4, "got %d\n", r);
|
||||
+ ok(r == 4, "got %d\n", r);
|
||||
|
||||
/* select page that can't be created */
|
||||
ret = SendMessageA(hdlg, PSM_SETCURSEL, 1, 0);
|
||||
- todo_wine ok(ret == TRUE, "got %d\n", ret);
|
||||
+ ok(ret == TRUE, "got %d\n", ret);
|
||||
|
||||
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
|
||||
- todo_wine ok(r == 3, "got %d\n", r);
|
||||
+ ok(r == 3, "got %d\n", r);
|
||||
|
||||
/* test PSP_PREMATURE flag with incorrect property sheet page */
|
||||
ret = SendMessageA(hdlg, PSM_INSERTPAGE, 0, (LPARAM)hpsp[4]);
|
||||
ok(ret == FALSE, "got %d\n", ret);
|
||||
|
||||
r = SendMessageA(tab, TCM_GETITEMCOUNT, 0, 0);
|
||||
- todo_wine ok(r == 3, "got %d\n", r);
|
||||
+ ok(r == 3, "got %d\n", r);
|
||||
|
||||
DestroyPropertySheetPage(hpsp[4]);
|
||||
DestroyWindow(hdlg);
|
||||
--
|
||||
2.6.1
|
||||
|
@@ -0,0 +1,60 @@
|
||||
From da747c61c2cee3712c061fa75b462228ffdee12d Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 10 Feb 2017 00:34:37 +0800
|
||||
Subject: comctl32: Add support for PSPCB_ADDREF/PSPCB_RELEASE callback
|
||||
notifications. (v2)
|
||||
|
||||
---
|
||||
dlls/comctl32/propsheet.c | 9 +++++++++
|
||||
include/prsht.h | 1 +
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
|
||||
index 654b06fbcec..78afaa924ef 100644
|
||||
--- a/dlls/comctl32/propsheet.c
|
||||
+++ b/dlls/comctl32/propsheet.c
|
||||
@@ -2991,6 +2991,9 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
|
||||
else
|
||||
ppsp->pszHeaderSubTitle = NULL;
|
||||
|
||||
+ if ((ppsp->dwFlags & PSH_USECALLBACK) && ppsp->pfnCallback)
|
||||
+ ppsp->pfnCallback(0, PSPCB_ADDREF, ppsp);
|
||||
+
|
||||
return (HPROPSHEETPAGE)ppsp;
|
||||
}
|
||||
|
||||
@@ -3047,6 +3050,9 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
|
||||
else
|
||||
ppsp->pszHeaderSubTitle = NULL;
|
||||
|
||||
+ if ((ppsp->dwFlags & PSH_USECALLBACK) && ppsp->pfnCallback)
|
||||
+ ppsp->pfnCallback(0, PSPCB_ADDREF, ppsp);
|
||||
+
|
||||
return (HPROPSHEETPAGE)ppsp;
|
||||
}
|
||||
|
||||
@@ -3068,6 +3074,9 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
|
||||
if (!psp)
|
||||
return FALSE;
|
||||
|
||||
+ if ((psp->dwFlags & PSH_USECALLBACK) && psp->pfnCallback)
|
||||
+ psp->pfnCallback(0, PSPCB_RELEASE, psp);
|
||||
+
|
||||
if (!(psp->dwFlags & PSP_DLGINDIRECT) && !IS_INTRESOURCE( psp->u.pszTemplate ))
|
||||
Free ((LPVOID)psp->u.pszTemplate);
|
||||
|
||||
diff --git a/include/prsht.h b/include/prsht.h
|
||||
index 21fc266447c..75ccc7c2917 100644
|
||||
--- a/include/prsht.h
|
||||
+++ b/include/prsht.h
|
||||
@@ -293,6 +293,7 @@ DECL_PRSHT_TYPE_AW(LPCPROPSHEETPAGE, LATEST)
|
||||
#define PSP_USEFUSIONCONTEXT 0x00004000
|
||||
#define PSP_COMMANDLINKS 0x00040000
|
||||
|
||||
+#define PSPCB_ADDREF 0
|
||||
#define PSPCB_RELEASE 1
|
||||
#define PSPCB_CREATE 2
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1 +1 @@
|
||||
Fixes: [25625] Add implementation for comctl32.PROPSHEET_InsertPage.
|
||||
Fixes: Add support for PSPCB_ADDREF/PSPCB_RELEASE callback notifications
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From 6a2fdc55c5d480b3bd0a26d3aaed1b31e4a7f8bb Mon Sep 17 00:00:00 2001
|
||||
From a30b83149208635d5e114f553c98ea8af569cbeb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 25 Aug 2016 20:06:28 +0200
|
||||
Subject: d3d11/tests: Prepare test_texture for non 2d textures.
|
||||
|
||||
---
|
||||
dlls/d3d11/tests/d3d11.c | 131 +++++++++++++++++++++++++++++------------------
|
||||
1 file changed, 81 insertions(+), 50 deletions(-)
|
||||
dlls/d3d11/tests/d3d11.c | 137 +++++++++++++++++++++++++++++------------------
|
||||
1 file changed, 85 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 0dd286d..7768cdb 100644
|
||||
index 21c5627b862..1a3adee346f 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -5671,6 +5671,7 @@ static void test_texture(void)
|
||||
@@ -5955,6 +5955,7 @@ static void test_texture(void)
|
||||
};
|
||||
struct texture
|
||||
{
|
||||
@@ -19,7 +19,7 @@ index 0dd286d..7768cdb 100644
|
||||
UINT width;
|
||||
UINT height;
|
||||
UINT miplevel_count;
|
||||
@@ -5682,7 +5683,7 @@ static void test_texture(void)
|
||||
@@ -5966,7 +5967,7 @@ static void test_texture(void)
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc;
|
||||
struct d3d11_test_context test_context;
|
||||
const struct texture *current_texture;
|
||||
@@ -28,7 +28,7 @@ index 0dd286d..7768cdb 100644
|
||||
D3D11_SAMPLER_DESC sampler_desc;
|
||||
const struct shader *current_ps;
|
||||
D3D_FEATURE_LEVEL feature_level;
|
||||
@@ -5690,7 +5691,7 @@ static void test_texture(void)
|
||||
@@ -5974,7 +5975,7 @@ static void test_texture(void)
|
||||
ID3D11DeviceContext *context;
|
||||
ID3D11SamplerState *sampler;
|
||||
struct resource_readback rb;
|
||||
@@ -37,7 +37,7 @@ index 0dd286d..7768cdb 100644
|
||||
struct vec4 ps_constant;
|
||||
ID3D11PixelShader *ps;
|
||||
ID3D11Device *device;
|
||||
@@ -6030,6 +6031,7 @@ static void test_texture(void)
|
||||
@@ -6328,6 +6329,7 @@ static void test_texture(void)
|
||||
};
|
||||
static const struct texture rgba_texture =
|
||||
{
|
||||
@@ -45,7 +45,7 @@ index 0dd286d..7768cdb 100644
|
||||
4, 4, 3, 1, DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||
{
|
||||
{rgba_level_0, 4 * sizeof(*rgba_level_0), 0},
|
||||
@@ -6037,33 +6039,51 @@ static void test_texture(void)
|
||||
@@ -6335,33 +6337,51 @@ static void test_texture(void)
|
||||
{rgba_level_2, sizeof(*rgba_level_2), 0},
|
||||
}
|
||||
};
|
||||
@@ -120,7 +120,21 @@ index 0dd286d..7768cdb 100644
|
||||
4, 4, 1, 3, DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||
{
|
||||
{red_data, 6 * sizeof(*red_data)},
|
||||
@@ -6338,12 +6358,12 @@ static void test_texture(void)
|
||||
@@ -6369,9 +6389,11 @@ static void test_texture(void)
|
||||
{blue_data, 5 * sizeof(*blue_data)},
|
||||
}
|
||||
};
|
||||
- static const struct texture r32f_typeless = {4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
+ static const struct texture r32f_typeless = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
+ 4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
{{r32_float, 4 * sizeof(*r32_float)}}};
|
||||
- static const struct texture r32u_typeless = {4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
+ static const struct texture r32u_typeless = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
+ 4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
{{r32_uint, 4 * sizeof(*r32_uint)}}};
|
||||
static const DWORD red_colors[] =
|
||||
{
|
||||
@@ -6660,12 +6682,12 @@ static void test_texture(void)
|
||||
|
||||
ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb);
|
||||
|
||||
@@ -139,7 +153,7 @@ index 0dd286d..7768cdb 100644
|
||||
|
||||
sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
|
||||
sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
@@ -6401,7 +6421,7 @@ static void test_texture(void)
|
||||
@@ -6723,7 +6745,7 @@ static void test_texture(void)
|
||||
if (current_texture != test->texture)
|
||||
{
|
||||
if (texture)
|
||||
@@ -148,7 +162,7 @@ index 0dd286d..7768cdb 100644
|
||||
if (srv)
|
||||
ID3D11ShaderResourceView_Release(srv);
|
||||
|
||||
@@ -6409,16 +6429,23 @@ static void test_texture(void)
|
||||
@@ -6731,16 +6753,23 @@ static void test_texture(void)
|
||||
|
||||
if (current_texture)
|
||||
{
|
||||
@@ -166,21 +180,21 @@ index 0dd286d..7768cdb 100644
|
||||
+ texture2d_desc.MipLevels = current_texture->miplevel_count;
|
||||
+ texture2d_desc.ArraySize = current_texture->array_size;
|
||||
+ texture2d_desc.Format = current_texture->format;
|
||||
+
|
||||
|
||||
- hr = ID3D11Device_CreateTexture2D(device, &texture_desc, current_texture->data, &texture);
|
||||
- ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr);
|
||||
+ hr = ID3D11Device_CreateTexture2D(device, &texture2d_desc, current_texture->data, &texture2d);
|
||||
+ ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr);
|
||||
+ texture = (ID3D11Resource *)texture2d;
|
||||
+ }
|
||||
|
||||
- hr = ID3D11Device_CreateTexture2D(device, &texture_desc, current_texture->data, &texture);
|
||||
- ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr);
|
||||
|
||||
- hr = ID3D11Device_CreateShaderResourceView(device, (ID3D11Resource *)texture, NULL, &srv);
|
||||
+
|
||||
+ hr = ID3D11Device_CreateShaderResourceView(device, texture, NULL, &srv);
|
||||
ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr);
|
||||
}
|
||||
else
|
||||
@@ -6472,7 +6499,7 @@ static void test_texture(void)
|
||||
@@ -6794,7 +6823,7 @@ static void test_texture(void)
|
||||
ID3D11ShaderResourceView_Release(srv);
|
||||
ID3D11SamplerState_Release(sampler);
|
||||
if (texture)
|
||||
@@ -189,7 +203,7 @@ index 0dd286d..7768cdb 100644
|
||||
ID3D11PixelShader_Release(ps);
|
||||
|
||||
if (is_warp_device(device) && feature_level < D3D_FEATURE_LEVEL_10_1)
|
||||
@@ -6517,26 +6544,30 @@ static void test_texture(void)
|
||||
@@ -6839,26 +6868,30 @@ static void test_texture(void)
|
||||
|
||||
if (current_texture != test->texture)
|
||||
{
|
||||
@@ -228,7 +242,7 @@ index 0dd286d..7768cdb 100644
|
||||
ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr);
|
||||
|
||||
ID3D11DeviceContext_PSSetShaderResources(context, 0, 1, &srv);
|
||||
@@ -6561,7 +6592,7 @@ static void test_texture(void)
|
||||
@@ -6883,7 +6916,7 @@ static void test_texture(void)
|
||||
release_resource_readback(&rb);
|
||||
}
|
||||
ID3D11PixelShader_Release(ps);
|
||||
@@ -238,5 +252,5 @@ index 0dd286d..7768cdb 100644
|
||||
ID3D11SamplerState_Release(sampler);
|
||||
|
||||
--
|
||||
2.8.1
|
||||
2.11.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 90cf55bb0be99d5e1244e4c5ec2ff0b7aecb39ef Mon Sep 17 00:00:00 2001
|
||||
From b2cf9ce61714a32e5f1727711b349a42b372bf10 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 25 Aug 2016 20:15:54 +0200
|
||||
Subject: d3d11/tests: Add some basic 1d texture tests in test_texture.
|
||||
@@ -8,13 +8,13 @@ Subject: d3d11/tests: Add some basic 1d texture tests in test_texture.
|
||||
1 file changed, 109 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 50dc3b9..f5279ea 100644
|
||||
index 268ba4cc77d..28802d3ea8f 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -5732,6 +5732,37 @@ static void test_texture(void)
|
||||
0x00000000, 0x00100e46, 0x00000000, 0x0700002d, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000,
|
||||
@@ -6017,6 +6017,38 @@ static void test_texture(void)
|
||||
0x00107e46, 0x00000000, 0x0100003e,
|
||||
};
|
||||
static const struct shader ps_ld = {ps_ld_code, sizeof(ps_ld_code)};
|
||||
+ static const DWORD ps_ld_1d_code[] =
|
||||
+ {
|
||||
+#if 0
|
||||
@@ -46,13 +46,14 @@ index 50dc3b9..f5279ea 100644
|
||||
+ 0x00000000, 0x00100e46, 0x00000000, 0x0700002d, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000,
|
||||
+ 0x00107e46, 0x00000000, 0x0100003e,
|
||||
+ };
|
||||
+ static const struct shader ps_ld_1d = {ps_ld_1d_code, sizeof(ps_ld_1d_code)};
|
||||
static const DWORD ps_ld_sint8_code[] =
|
||||
{
|
||||
#if 0
|
||||
@@ -5916,13 +5947,46 @@ static void test_texture(void)
|
||||
0x0020800a, 0x00000000, 0x00000000, 0x09000045, 0x001020f2, 0x00000000, 0x00100246, 0x00000000,
|
||||
0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0100003e,
|
||||
@@ -6175,6 +6207,38 @@ static void test_texture(void)
|
||||
0x0020800a, 0x00000000, 0x00000000, 0x0100003e,
|
||||
};
|
||||
static const struct shader ps_sample_l = {ps_sample_l_code, sizeof(ps_sample_l_code)};
|
||||
+ static const DWORD ps_sample_1d_array_code[] =
|
||||
+ {
|
||||
+#if 0
|
||||
@@ -84,19 +85,11 @@ index 50dc3b9..f5279ea 100644
|
||||
+ 0x09000045, 0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000,
|
||||
+ 0x00000000, 0x0100003e,
|
||||
+ };
|
||||
static const struct shader ps_ld = {ps_ld_code, sizeof(ps_ld_code)};
|
||||
+ static const struct shader ps_ld_1d = {ps_ld_1d_code, sizeof(ps_ld_1d_code)};
|
||||
static const struct shader ps_ld_sint8 = {ps_ld_sint8_code, sizeof(ps_ld_sint8_code)};
|
||||
static const struct shader ps_ld_uint8 = {ps_ld_uint8_code, sizeof(ps_ld_uint8_code)};
|
||||
static const struct shader ps_sample = {ps_sample_code, sizeof(ps_sample_code)};
|
||||
static const struct shader ps_sample_b = {ps_sample_b_code, sizeof(ps_sample_b_code)};
|
||||
static const struct shader ps_sample_l = {ps_sample_l_code, sizeof(ps_sample_l_code)};
|
||||
static const struct shader ps_sample_2d_array = {ps_sample_2d_array_code, sizeof(ps_sample_2d_array_code)};
|
||||
+ static const struct shader ps_sample_1d_array = {ps_sample_1d_array_code, sizeof(ps_sample_1d_array_code)};
|
||||
static const DWORD red_data[] =
|
||||
static const DWORD ps_sample_2d_array_code[] =
|
||||
{
|
||||
0xff0000ff, 0xff0000ff, 0xff0000ff, 0xff0000ff, 0x00000000, 0x00000000,
|
||||
@@ -6040,8 +6104,20 @@ static void test_texture(void)
|
||||
#if 0
|
||||
@@ -6338,8 +6402,20 @@ static void test_texture(void)
|
||||
{rgba_level_2, sizeof(*rgba_level_2), 0},
|
||||
}
|
||||
};
|
||||
@@ -117,7 +110,7 @@ index 50dc3b9..f5279ea 100644
|
||||
static const struct texture srgb_typeless = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
4, 4, 1, 1, DXGI_FORMAT_R8G8B8A8_TYPELESS, {{srgb_data, 4 * sizeof(*srgb_data)}}};
|
||||
static const struct texture a8_texture = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
@@ -6092,6 +6168,16 @@ static void test_texture(void)
|
||||
@@ -6390,6 +6466,16 @@ static void test_texture(void)
|
||||
{blue_data, 5 * sizeof(*blue_data)},
|
||||
}
|
||||
};
|
||||
@@ -131,10 +124,10 @@ index 50dc3b9..f5279ea 100644
|
||||
+ {blue_data, 0},
|
||||
+ }
|
||||
+ };
|
||||
static const DWORD red_colors[] =
|
||||
{
|
||||
0xff0000ff, 0xff0000ff, 0xff0000ff, 0xff0000ff,
|
||||
@@ -6195,6 +6281,11 @@ static void test_texture(void)
|
||||
static const struct texture r32f_typeless = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
{{r32_float, 4 * sizeof(*r32_float)}}};
|
||||
@@ -6513,6 +6599,11 @@ static void test_texture(void)
|
||||
#define POINT D3D11_FILTER_MIN_MAG_MIP_POINT
|
||||
#define POINT_LINEAR D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR
|
||||
#define MIP_MAX D3D11_FLOAT32_MAX
|
||||
@@ -146,7 +139,7 @@ index 50dc3b9..f5279ea 100644
|
||||
{&ps_ld, &rgba_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, rgba_level_0},
|
||||
{&ps_ld, &rgba_texture, POINT, 0.0f, 0.0f, 0.0f, 1.0f, level_1_colors},
|
||||
{&ps_ld, &rgba_texture, POINT, 0.0f, 0.0f, 0.0f, 2.0f, level_2_colors},
|
||||
@@ -6280,6 +6371,24 @@ static void test_texture(void)
|
||||
@@ -6598,6 +6689,24 @@ static void test_texture(void)
|
||||
{&ps_sample_l, NULL, POINT, 2.0f, 2.0f, 0.0f, 1.0f, zero_colors},
|
||||
{&ps_sample_l, NULL, POINT, 2.0f, 2.0f, MIP_MAX, 0.0f, zero_colors},
|
||||
{&ps_sample_l, NULL, POINT, 2.0f, 2.0f, MIP_MAX, 1.0f, zero_colors},
|
||||
@@ -172,5 +165,5 @@ index 50dc3b9..f5279ea 100644
|
||||
{&ps_sample_2d_array, &array_2d_texture, POINT, 0.0f, 0.0f, MIP_MAX, -1.0f, red_colors},
|
||||
{&ps_sample_2d_array, &array_2d_texture, POINT, 0.0f, 0.0f, MIP_MAX, 0.0f, red_colors},
|
||||
--
|
||||
2.8.1
|
||||
2.11.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From ff83c3ee1b422915d690411cda05db19ceacbdf1 Mon Sep 17 00:00:00 2001
|
||||
From 68c5c27b4867a08482774a506095736107631d38 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 3 Jun 2015 22:57:21 +0200
|
||||
Subject: winex11.drv: Allow changing the opengl pixel format on the desktop
|
||||
@@ -43,10 +43,10 @@ index e1d6d4c97c2..bf6a9a138dd 100644
|
||||
swapchain = (IDXGISwapChain *)0xdeadbeef;
|
||||
device = (ID3D10Device1 *)0xdeadbeef;
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index ac4393dd3b3..49356b398c1 100644
|
||||
index 0d473344c2c..a077ce0aaa9 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -1451,10 +1451,22 @@ static void test_create_device(void)
|
||||
@@ -1517,10 +1517,22 @@ static void test_create_device(void)
|
||||
hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, NULL, 0, D3D11_SDK_VERSION,
|
||||
&swapchain_desc, &swapchain, &device, &feature_level, &immediate_context);
|
||||
todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D11CreateDeviceAndSwapChain returned %#x.\n", hr);
|
||||
@@ -74,10 +74,10 @@ index ac4393dd3b3..49356b398c1 100644
|
||||
swapchain = (IDXGISwapChain *)0xdeadbeef;
|
||||
device = (ID3D11Device *)0xdeadbeef;
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index aa266a5186e..986000d0278 100644
|
||||
index feb1efcb94b..19bfcb5bc3c 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -11401,6 +11401,21 @@ static void test_render_target_device_mismatch(void)
|
||||
@@ -11506,6 +11506,21 @@ static void test_format_unknown(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@@ -99,19 +99,19 @@ index aa266a5186e..986000d0278 100644
|
||||
START_TEST(device)
|
||||
{
|
||||
WNDCLASSA wc = {0};
|
||||
@@ -11518,6 +11533,7 @@ START_TEST(device)
|
||||
test_miptree_layout();
|
||||
@@ -11624,6 +11639,7 @@ START_TEST(device)
|
||||
test_get_render_target_data();
|
||||
test_render_target_device_mismatch();
|
||||
test_format_unknown();
|
||||
+ test_desktop_window();
|
||||
|
||||
UnregisterClassA("d3d9_test_wc", GetModuleHandleA(NULL));
|
||||
}
|
||||
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
|
||||
index d89a19330f7..b5faac56ade 100644
|
||||
index 3dab687197e..72056adb7c9 100644
|
||||
--- a/dlls/winex11.drv/opengl.c
|
||||
+++ b/dlls/winex11.drv/opengl.c
|
||||
@@ -1469,12 +1469,15 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
|
||||
@@ -1473,12 +1473,15 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
|
||||
|
||||
TRACE("(%p,%d)\n", hdc, format);
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
From 5c5620766e4e3be85bdec4aab689b9f5b42b2f2b Mon Sep 17 00:00:00 2001
|
||||
From: Matteo Bruni <mbruni@codeweavers.com>
|
||||
Date: Wed, 18 Jan 2017 21:35:28 +0100
|
||||
Subject: d3d9: Fix DrawIndexedPrimitiveUP with non-zero min_vertex_idx.
|
||||
|
||||
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
|
||||
---
|
||||
dlls/d3d9/device.c | 14 ++++++--------
|
||||
1 file changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
|
||||
index e0bc5859c61..e646cb76c76 100644
|
||||
--- a/dlls/d3d9/device.c
|
||||
+++ b/dlls/d3d9/device.c
|
||||
@@ -2485,18 +2485,16 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa
|
||||
UINT primitive_count, const void *index_data, D3DFORMAT index_format,
|
||||
const void *vertex_data, UINT vertex_stride)
|
||||
{
|
||||
- struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||
- HRESULT hr;
|
||||
UINT idx_count = vertex_count_from_primitive_count(primitive_type, primitive_count);
|
||||
+ struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||
UINT idx_fmt_size = index_format == D3DFMT_INDEX16 ? 2 : 4;
|
||||
+ UINT vtx_size = vertex_count * vertex_stride;
|
||||
UINT idx_size = idx_count * idx_fmt_size;
|
||||
struct wined3d_map_desc wined3d_map_desc;
|
||||
struct wined3d_box wined3d_box = {0};
|
||||
struct wined3d_resource *ib, *vb;
|
||||
- UINT ib_pos;
|
||||
-
|
||||
- UINT vtx_size = vertex_count * vertex_stride;
|
||||
- UINT vb_pos, align;
|
||||
+ UINT vb_pos, ib_pos, align;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, primitive_count %u, "
|
||||
"index_data %p, index_format %#x, vertex_data %p, vertex_stride %u.\n",
|
||||
@@ -2536,7 +2534,7 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa
|
||||
if (FAILED(hr = wined3d_resource_map(vb, 0, &wined3d_map_desc, &wined3d_box,
|
||||
vb_pos ? WINED3D_MAP_NOOVERWRITE : WINED3D_MAP_DISCARD)))
|
||||
goto done;
|
||||
- memcpy(wined3d_map_desc.data, vertex_data, vtx_size);
|
||||
+ memcpy(wined3d_map_desc.data, (char *)vertex_data + min_vertex_idx * vertex_stride, vtx_size);
|
||||
wined3d_resource_unmap(vb, 0);
|
||||
device->vertex_buffer_pos = vb_pos + vtx_size;
|
||||
|
||||
@@ -2568,7 +2566,7 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa
|
||||
|
||||
wined3d_device_set_index_buffer(device->wined3d_device, device->index_buffer,
|
||||
wined3dformat_from_d3dformat(index_format), 0);
|
||||
- wined3d_device_set_base_vertex_index(device->wined3d_device, vb_pos / vertex_stride);
|
||||
+ wined3d_device_set_base_vertex_index(device->wined3d_device, vb_pos / vertex_stride - min_vertex_idx);
|
||||
|
||||
wined3d_device_set_primitive_type(device->wined3d_device, primitive_type);
|
||||
hr = wined3d_device_draw_indexed_primitive(device->wined3d_device, ib_pos / idx_fmt_size, idx_count);
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,58 +0,0 @@
|
||||
From 6ab43f9745b48a8646b54c1a072a07ddd96e333b Mon Sep 17 00:00:00 2001
|
||||
From: Matteo Bruni <mbruni@codeweavers.com>
|
||||
Date: Wed, 18 Jan 2017 21:35:29 +0100
|
||||
Subject: d3d8: Fix DrawIndexedPrimitiveUP with non-zero min_vertex_idx.
|
||||
|
||||
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
|
||||
---
|
||||
dlls/d3d8/device.c | 14 ++++++--------
|
||||
1 file changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
|
||||
index 43b8e2be4bb..805694b8536 100644
|
||||
--- a/dlls/d3d8/device.c
|
||||
+++ b/dlls/d3d8/device.c
|
||||
@@ -2124,18 +2124,16 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface
|
||||
UINT primitive_count, const void *index_data, D3DFORMAT index_format,
|
||||
const void *vertex_data, UINT vertex_stride)
|
||||
{
|
||||
- struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
|
||||
- HRESULT hr;
|
||||
UINT idx_count = vertex_count_from_primitive_count(primitive_type, primitive_count);
|
||||
+ struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
|
||||
UINT idx_fmt_size = index_format == D3DFMT_INDEX16 ? 2 : 4;
|
||||
+ UINT vtx_size = vertex_count * vertex_stride;
|
||||
UINT idx_size = idx_count * idx_fmt_size;
|
||||
struct wined3d_map_desc wined3d_map_desc;
|
||||
struct wined3d_box wined3d_box = {0};
|
||||
struct wined3d_resource *ib, *vb;
|
||||
- UINT ib_pos;
|
||||
-
|
||||
- UINT vtx_size = vertex_count * vertex_stride;
|
||||
- UINT vb_pos, align;
|
||||
+ UINT vb_pos, ib_pos, align;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, primitive_count %u, "
|
||||
"index_data %p, index_format %#x, vertex_data %p, vertex_stride %u.\n",
|
||||
@@ -2168,7 +2166,7 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface
|
||||
if (FAILED(hr = wined3d_resource_map(vb, 0, &wined3d_map_desc, &wined3d_box,
|
||||
vb_pos ? WINED3D_MAP_NOOVERWRITE : WINED3D_MAP_DISCARD)))
|
||||
goto done;
|
||||
- memcpy(wined3d_map_desc.data, vertex_data, vtx_size);
|
||||
+ memcpy(wined3d_map_desc.data, (char *)vertex_data + min_vertex_idx * vertex_stride, vtx_size);
|
||||
wined3d_resource_unmap(vb, 0);
|
||||
device->vertex_buffer_pos = vb_pos + vtx_size;
|
||||
|
||||
@@ -2200,7 +2198,7 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface
|
||||
|
||||
wined3d_device_set_index_buffer(device->wined3d_device, device->index_buffer,
|
||||
wined3dformat_from_d3dformat(index_format), 0);
|
||||
- wined3d_device_set_base_vertex_index(device->wined3d_device, vb_pos / vertex_stride);
|
||||
+ wined3d_device_set_base_vertex_index(device->wined3d_device, vb_pos / vertex_stride - min_vertex_idx);
|
||||
|
||||
wined3d_device_set_primitive_type(device->wined3d_device, primitive_type);
|
||||
hr = wined3d_device_draw_indexed_primitive(device->wined3d_device, ib_pos / idx_fmt_size, idx_count);
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,123 +0,0 @@
|
||||
From c50f96ff6353cc65ed3e39b43fd7e46cf2678c69 Mon Sep 17 00:00:00 2001
|
||||
From: Matteo Bruni <mbruni@codeweavers.com>
|
||||
Date: Wed, 18 Jan 2017 21:35:30 +0100
|
||||
Subject: d3d9/tests: Add a test for DrawIndexedPrimitiveUP().
|
||||
|
||||
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
|
||||
---
|
||||
dlls/d3d9/tests/visual.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 94 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index a1064127d5a..be544f3b5c7 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -22244,6 +22244,99 @@ done:
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_drawindexedprimitiveup(void)
|
||||
+{
|
||||
+ static const struct vertex
|
||||
+ {
|
||||
+ struct vec3 position;
|
||||
+ DWORD diffuse;
|
||||
+ }
|
||||
+ quad[] =
|
||||
+ {
|
||||
+ {{-1.0f, -1.0f, 0.1f}, 0xff00ff00},
|
||||
+ {{-1.0f, 1.0f, 0.1f}, 0xff0000ff},
|
||||
+ {{ 1.0f, -1.0f, 0.1f}, 0xffff0000},
|
||||
+ {{ 1.0f, 1.0f, 0.1f}, 0xff0000ff},
|
||||
+
|
||||
+ {{-1.0f, -1.0f, 0.1f}, 0xff0000ff},
|
||||
+ {{-1.0f, 1.0f, 0.1f}, 0xff00ff00},
|
||||
+ {{ 1.0f, -1.0f, 0.1f}, 0xffff0000},
|
||||
+ {{ 1.0f, 1.0f, 0.1f}, 0xff00ff00},
|
||||
+ };
|
||||
+ static const unsigned short indices[] = {0, 1, 2, 3, 4, 5, 6, 7};
|
||||
+ IDirect3DDevice9 *device;
|
||||
+ IDirect3D9 *d3d;
|
||||
+ ULONG refcount;
|
||||
+ D3DCOLOR color;
|
||||
+ HWND window;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ window = create_window();
|
||||
+ d3d = Direct3DCreate9(D3D_SDK_VERSION);
|
||||
+ ok(!!d3d, "Failed to create a D3D object.\n");
|
||||
+
|
||||
+ if (!(device = create_device(d3d, window, window, TRUE)))
|
||||
+ {
|
||||
+ skip("Failed to create a D3D device.\n");
|
||||
+ IDirect3D9_Release(d3d);
|
||||
+ DestroyWindow(window);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPING, FALSE);
|
||||
+ ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, FALSE);
|
||||
+ ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE);
|
||||
+ ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE);
|
||||
+ ok(SUCCEEDED(hr), "Failed to set FVF, hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0);
|
||||
+ ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = IDirect3DDevice9_BeginScene(device);
|
||||
+ ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 4, 4, 2, indices + 4, D3DFMT_INDEX16, quad, sizeof(*quad));
|
||||
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice9_EndScene(device);
|
||||
+ ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
|
||||
+
|
||||
+ color = getPixelColor(device, 160, 120);
|
||||
+ ok(color_match(color, 0x0040bf00, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
+ color = getPixelColor(device, 480, 120);
|
||||
+ ok(color_match(color, 0x0040bf00, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
+ color = getPixelColor(device, 160, 360);
|
||||
+ ok(color_match(color, 0x00404080, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
+ color = getPixelColor(device, 480, 360);
|
||||
+ ok(color_match(color, 0x00bf4000, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
+
|
||||
+ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0);
|
||||
+ ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = IDirect3DDevice9_BeginScene(device);
|
||||
+ ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 0, 4, 2, indices, D3DFMT_INDEX16, quad, sizeof(*quad));
|
||||
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice9_EndScene(device);
|
||||
+ ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
|
||||
+
|
||||
+ color = getPixelColor(device, 160, 120);
|
||||
+ ok(color_match(color, 0x004000bf, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
+ color = getPixelColor(device, 480, 120);
|
||||
+ ok(color_match(color, 0x004000bf, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
+ color = getPixelColor(device, 160, 360);
|
||||
+ ok(color_match(color, 0x00408040, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
+ color = getPixelColor(device, 480, 360);
|
||||
+ ok(color_match(color, 0x00bf0040, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
+
|
||||
+ refcount = IDirect3DDevice9_Release(device);
|
||||
+ ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
+ IDirect3D9_Release(d3d);
|
||||
+ DestroyWindow(window);
|
||||
+}
|
||||
+
|
||||
START_TEST(visual)
|
||||
{
|
||||
D3DADAPTER_IDENTIFIER9 identifier;
|
||||
@@ -22372,4 +22465,5 @@ START_TEST(visual)
|
||||
test_evict_bound_resources();
|
||||
test_max_index16();
|
||||
test_backbuffer_resize();
|
||||
+ test_drawindexedprimitiveup();
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user