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
27 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 |
@@ -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
|
||||
|
||||
|
@@ -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,29 +0,0 @@
|
||||
From ee74f6d71079cda75ba94841e4369c519489c879 Mon Sep 17 00:00:00 2001
|
||||
From: Henri Verbeet <hverbeet@codeweavers.com>
|
||||
Date: Tue, 11 Nov 2014 22:32:00 +0100
|
||||
Subject: d3d9: Don't decrease surface refcount when its already zero.
|
||||
|
||||
---
|
||||
dlls/d3d9/surface.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c
|
||||
index e5eb11f..2aab5f3 100644
|
||||
--- a/dlls/d3d9/surface.c
|
||||
+++ b/dlls/d3d9/surface.c
|
||||
@@ -91,6 +91,12 @@ static ULONG WINAPI d3d9_surface_Release(IDirect3DSurface9 *iface)
|
||||
return IDirect3DBaseTexture9_Release(&surface->texture->IDirect3DBaseTexture9_iface);
|
||||
}
|
||||
|
||||
+ if (!surface->resource.refcount)
|
||||
+ {
|
||||
+ ERR("Surface doesn't have any references.\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
refcount = InterlockedDecrement(&surface->resource.refcount);
|
||||
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
|
||||
|
||||
--
|
||||
2.1.3
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [18477] Avoid crashing when broken app tries to release surface although refcount is zero
|
@@ -0,0 +1,64 @@
|
||||
From e0161e996c9a748d285111b5f30e56e73a808c43 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 18 Feb 2017 21:50:33 +0100
|
||||
Subject: d3d11/tests: Avoid test failures.
|
||||
|
||||
---
|
||||
dlls/d3d10core/tests/device.c | 2 ++
|
||||
dlls/d3d11/tests/d3d11.c | 4 ++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
|
||||
index 7b27d9f6a4c..a4b6355d6b9 100644
|
||||
--- a/dlls/d3d10core/tests/device.c
|
||||
+++ b/dlls/d3d10core/tests/device.c
|
||||
@@ -7821,6 +7821,7 @@ float4 main(const ps_in v) : SV_TARGET
|
||||
ID3D10Device_Draw(device, 4, 0);
|
||||
|
||||
color = get_texture_color(test_context.backbuffer, 319, 239);
|
||||
+ todo_wine_if(test_data[i].index == 1)
|
||||
ok(compare_color(color, test_data[i].expected, 1),
|
||||
"Got unexpected color 0x%08x for index %d.\n", color, test_data[i].index);
|
||||
}
|
||||
@@ -9989,6 +9990,7 @@ static void test_line_antialiasing_blending(void)
|
||||
|
||||
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, &green.x);
|
||||
draw_color_quad(&test_context, &red);
|
||||
+ todo_wine
|
||||
check_texture_color(test_context.backbuffer, 0xe2007fcc, 1);
|
||||
|
||||
ID3D10Device_OMSetBlendState(device, NULL, NULL, D3D10_DEFAULT_SAMPLE_MASK);
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index a1561610dca..bcaa5df3f39 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -9776,6 +9776,7 @@ float4 main(const ps_in v) : SV_TARGET
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)index_cb, 0, NULL, &index, 0, 0);
|
||||
|
||||
draw_quad(&test_context);
|
||||
+ todo_wine_if(test_data[i].index == 1)
|
||||
check_texture_color(test_context.backbuffer, test_data[i].expected, 1);
|
||||
}
|
||||
|
||||
@@ -12027,6 +12028,7 @@ static void test_line_antialiasing_blending(void)
|
||||
|
||||
ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, &green.x);
|
||||
draw_color_quad(&test_context, &red);
|
||||
+ todo_wine
|
||||
check_texture_color(test_context.backbuffer, 0xe2007fcc, 1);
|
||||
|
||||
ID3D11DeviceContext_OMSetBlendState(context, NULL, NULL, D3D11_DEFAULT_SAMPLE_MASK);
|
||||
@@ -15265,8 +15267,10 @@ static void test_unaligned_raw_buffer_access(void)
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
get_buffer_readback(raw_buffer, &rb);
|
||||
data = get_readback_color(&rb, 0, 0);
|
||||
+ todo_wine
|
||||
ok(data == 0xffff, "Got unexpected result %#x.\n", data);
|
||||
data = get_readback_color(&rb, 1, 0);
|
||||
+ todo_wine
|
||||
ok(data == 0xa, "Got unexpected result %#x.\n", data);
|
||||
release_resource_readback(&rb);
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From bbe000942fadd116e85bd64abd6633fa1d9df382 Mon Sep 17 00:00:00 2001
|
||||
From 336cf41969e853ca0044261f00ed55ac6f668ff1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Mar 2016 22:22:42 +0100
|
||||
Subject: ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
@@ -12,10 +12,10 @@ Subject: ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
5 files changed, 106 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 8bf38ee930f..01a9a904ef5 100644
|
||||
index fb91722943e..4b9d9fbf876 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -1536,6 +1536,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
@@ -1554,6 +1554,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
|
||||
caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT;
|
||||
|
||||
@@ -25,11 +25,11 @@ index 8bf38ee930f..01a9a904ef5 100644
|
||||
|
||||
if(DriverCaps)
|
||||
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
|
||||
index 5acbee61e00..bb873da220f 100644
|
||||
index 278b9c60069..e1a7a1a4d1c 100644
|
||||
--- a/dlls/ddraw/tests/ddraw1.c
|
||||
+++ b/dlls/ddraw/tests/ddraw1.c
|
||||
@@ -9953,6 +9953,31 @@ static void test_surface_desc_size(void)
|
||||
ok(!refcount, "DirectDraw has %u references left.\n", refcount);
|
||||
@@ -10163,6 +10163,31 @@ static void test_texture_load(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
@@ -60,17 +60,17 @@ index 5acbee61e00..bb873da220f 100644
|
||||
START_TEST(ddraw1)
|
||||
{
|
||||
IDirectDraw *ddraw;
|
||||
@@ -10038,4 +10063,5 @@ START_TEST(ddraw1)
|
||||
test_transform_vertices();
|
||||
@@ -10249,4 +10274,5 @@ START_TEST(ddraw1)
|
||||
test_display_mode_surface_pixel_format();
|
||||
test_surface_desc_size();
|
||||
test_texture_load();
|
||||
+ test_caps();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
|
||||
index dc8801c3e12..9afd5e8e681 100644
|
||||
index db09e5d8975..53279059105 100644
|
||||
--- a/dlls/ddraw/tests/ddraw2.c
|
||||
+++ b/dlls/ddraw/tests/ddraw2.c
|
||||
@@ -11444,6 +11444,31 @@ static void test_surface_desc_size(void)
|
||||
@@ -11487,6 +11487,31 @@ static void test_surface_desc_size(void)
|
||||
ok(!refcount, "DirectDraw has %u references left.\n", refcount);
|
||||
}
|
||||
|
||||
@@ -102,18 +102,18 @@ index dc8801c3e12..9afd5e8e681 100644
|
||||
START_TEST(ddraw2)
|
||||
{
|
||||
IDirectDraw2 *ddraw;
|
||||
@@ -11538,4 +11563,5 @@ START_TEST(ddraw2)
|
||||
@@ -11581,4 +11606,5 @@ START_TEST(ddraw2)
|
||||
test_transform_vertices();
|
||||
test_display_mode_surface_pixel_format();
|
||||
test_surface_desc_size();
|
||||
+ test_caps();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index f2b3e0cf63b..fbefe8425b3 100644
|
||||
index 830da89bba2..7ba77be3406 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -12729,6 +12729,31 @@ static void test_surface_desc_size(void)
|
||||
ok(!refcount, "DirectDraw has %u references left.\n", refcount);
|
||||
@@ -12885,6 +12885,31 @@ static void test_get_surface_from_dc(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
@@ -144,18 +144,18 @@ index f2b3e0cf63b..fbefe8425b3 100644
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
IDirectDraw4 *ddraw;
|
||||
@@ -12831,4 +12856,5 @@ START_TEST(ddraw4)
|
||||
test_transform_vertices();
|
||||
@@ -12988,4 +13013,5 @@ START_TEST(ddraw4)
|
||||
test_display_mode_surface_pixel_format();
|
||||
test_surface_desc_size();
|
||||
test_get_surface_from_dc();
|
||||
+ test_caps();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index 7b88824920e..7957f1733d5 100644
|
||||
index ba0e4a96e0f..be70456555e 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -12424,6 +12424,31 @@ static void test_surface_desc_size(void)
|
||||
ok(!refcount, "DirectDraw has %u references left.\n", refcount);
|
||||
@@ -12576,6 +12576,31 @@ static void test_get_surface_from_dc(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
@@ -186,10 +186,10 @@ index 7b88824920e..7957f1733d5 100644
|
||||
START_TEST(ddraw7)
|
||||
{
|
||||
HMODULE module = GetModuleHandleA("ddraw.dll");
|
||||
@@ -12536,4 +12561,5 @@ START_TEST(ddraw7)
|
||||
test_edge_antialiasing_blending();
|
||||
@@ -12689,4 +12714,5 @@ START_TEST(ddraw7)
|
||||
test_display_mode_surface_pixel_format();
|
||||
test_surface_desc_size();
|
||||
test_get_surface_from_dc();
|
||||
+ test_caps();
|
||||
}
|
||||
--
|
||||
|
@@ -1,37 +0,0 @@
|
||||
From 28c420fc650438718b2fdb2c61e1a7188c404b90 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Mon, 19 Dec 2016 14:17:23 -0700
|
||||
Subject: dsound: Clear the temporary mixing buffer after allocation.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@wine-staging.com>
|
||||
---
|
||||
dlls/dsound/mixer.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
|
||||
index 309c338cd10..880b29c43b2 100644
|
||||
--- a/dlls/dsound/mixer.c
|
||||
+++ b/dlls/dsound/mixer.c
|
||||
@@ -429,6 +429,9 @@ static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
|
||||
dsb->device->tmp_buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes);
|
||||
}
|
||||
|
||||
+ if(dsb->put_aux == putieee32_sum)
|
||||
+ memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
|
||||
+
|
||||
cp_fields(dsb, frames, &dsb->freqAccNum);
|
||||
|
||||
if (size_bytes > 0) {
|
||||
@@ -506,9 +509,6 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, float *mix_buffer,
|
||||
|
||||
/* Resample buffer to temporary buffer specifically allocated for this purpose, if needed */
|
||||
oldpos = dsb->sec_mixpos;
|
||||
-
|
||||
- if(dsb->put_aux == putieee32_sum)
|
||||
- memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
|
||||
DSOUND_MixToTemporary(dsb, frames);
|
||||
ibuf = dsb->device->tmp_buffer;
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: Clear the dsound mixing buffer after allocation
|
@@ -1,4 +1,4 @@
|
||||
From b23019f93121d8a1a57912c4ca335fa1c534c8d7 Mon Sep 17 00:00:00 2001
|
||||
From f6d6015507f7706db9db58b851b3032c56f4b3ed Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 28 Mar 2015 08:18:10 +0100
|
||||
Subject: dsound: Apply filters before sound is multiplied to speakers.
|
||||
@@ -7,8 +7,8 @@ Based on a patch by Mark Harmstone.
|
||||
---
|
||||
dlls/dsound/dsound.c | 1 +
|
||||
dlls/dsound/dsound_private.h | 4 +-
|
||||
dlls/dsound/mixer.c | 108 ++++++++++++++++++++++++++++++-------------
|
||||
3 files changed, 79 insertions(+), 34 deletions(-)
|
||||
dlls/dsound/mixer.c | 110 ++++++++++++++++++++++++++++++-------------
|
||||
3 files changed, 80 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
|
||||
index 4d515adcaf3..65a00787098 100644
|
||||
@@ -38,7 +38,7 @@ index 8e1e2dafc7c..f22849fb0a2 100644
|
||||
DSVOLUMEPAN volpan;
|
||||
|
||||
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
|
||||
index 1a99eebf30c..5b4af70093f 100644
|
||||
index 8413588edfb..a11d6c9e798 100644
|
||||
--- a/dlls/dsound/mixer.c
|
||||
+++ b/dlls/dsound/mixer.c
|
||||
@@ -278,23 +278,22 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
|
||||
@@ -146,7 +146,7 @@ index 1a99eebf30c..5b4af70093f 100644
|
||||
/**
|
||||
* Mix at most the given amount of data into the allocated temporary buffer
|
||||
* of the given secondary buffer, starting from the dsb's first currently
|
||||
@@ -458,35 +473,64 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
@@ -458,34 +473,63 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
*/
|
||||
static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
|
||||
{
|
||||
@@ -172,22 +172,18 @@ index 1a99eebf30c..5b4af70093f 100644
|
||||
dsb->device->tmp_buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes);
|
||||
+ dsb->device->tmp_buffer_len = size_bytes;
|
||||
}
|
||||
|
||||
- if(dsb->put_aux == putieee32_sum)
|
||||
- memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
|
||||
-
|
||||
- cp_fields(dsb, frames, &dsb->freqAccNum);
|
||||
+ if(dsb->put_aux == putieee32_sum)
|
||||
+ memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
|
||||
|
||||
- cp_fields(dsb, frames, &dsb->freqAccNum);
|
||||
+
|
||||
+ if (using_filters) {
|
||||
+ put = putieee32_dsp;
|
||||
+ ostride = dsb->mix_channels * sizeof(float);
|
||||
+ size_bytes = frames * ostride;
|
||||
|
||||
- if (size_bytes > 0) {
|
||||
- for (i = 0; i < dsb->num_filters; i++) {
|
||||
- if (dsb->filters[i].inplace) {
|
||||
- hr = IMediaObjectInPlace_Process(dsb->filters[i].inplace, size_bytes, (BYTE*)dsb->device->tmp_buffer, 0, DMO_INPLACE_NORMAL);
|
||||
+
|
||||
+ if (dsb->device->dsp_buffer_len < size_bytes || !dsb->device->dsp_buffer) {
|
||||
+ if (dsb->device->dsp_buffer)
|
||||
+ dsb->device->dsp_buffer = HeapReAlloc(GetProcessHeap(), 0, dsb->device->dsp_buffer, size_bytes);
|
||||
@@ -197,12 +193,10 @@ index 1a99eebf30c..5b4af70093f 100644
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (FAILED(hr))
|
||||
- WARN("IMediaObjectInPlace_Process failed for filter %u\n", i);
|
||||
- } else
|
||||
- WARN("filter %u has no inplace object - unsupported\n", i);
|
||||
- }
|
||||
- }
|
||||
- if (size_bytes > 0) {
|
||||
- for (i = 0; i < dsb->num_filters; i++) {
|
||||
- if (dsb->filters[i].inplace) {
|
||||
- hr = IMediaObjectInPlace_Process(dsb->filters[i].inplace, size_bytes, (BYTE*)dsb->device->tmp_buffer, 0, DMO_INPLACE_NORMAL);
|
||||
+ cp_fields(dsb, put, ostride, frames, &dsb->freqAccNum);
|
||||
+
|
||||
+ if (using_filters) {
|
||||
@@ -217,7 +211,13 @@ index 1a99eebf30c..5b4af70093f 100644
|
||||
+ WARN("filter %u has no inplace object - unsupported\n", i);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
- if (FAILED(hr))
|
||||
- WARN("IMediaObjectInPlace_Process failed for filter %u\n", i);
|
||||
- } else
|
||||
- WARN("filter %u has no inplace object - unsupported\n", i);
|
||||
- }
|
||||
- }
|
||||
+ istride = ostride;
|
||||
+ ostride = dsb->device->pwfx->nChannels * sizeof(float);
|
||||
+ for (i = 0; i < frames; i++) {
|
||||
|
@@ -1,4 +1,3 @@
|
||||
Fixes: Software support for Environmental Audio Extensions (EAX)
|
||||
Depends: dsound-Fast_Mixer
|
||||
Depends: dsound-Revert_Cleanup
|
||||
Depends: dsound-Clear_Mixing_Buffer
|
||||
|
@@ -1,10 +1,9 @@
|
||||
From b861a3f2d105bca65ade87b8dde7a683bc853b89 Mon Sep 17 00:00:00 2001
|
||||
From 1db0b7784f49f336ba7243fde42f5ff67eb67fa8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 5 Sep 2016 15:31:29 +0200
|
||||
Subject: inseng: Implement CIF reader and download functions.
|
||||
|
||||
FIXME: Needs splitting.
|
||||
|
||||
---
|
||||
dlls/inseng/Makefile.in | 7 +-
|
||||
dlls/inseng/icif.c | 1745 ++++++++++++++++++++++++++++++++++++++++++
|
||||
@@ -19,7 +18,7 @@ FIXME: Needs splitting.
|
||||
create mode 100644 dlls/inseng/inseng_private.h
|
||||
|
||||
diff --git a/dlls/inseng/Makefile.in b/dlls/inseng/Makefile.in
|
||||
index 652e06b..d0aaa66 100644
|
||||
index 652e06b0f25..d0aaa663b08 100644
|
||||
--- a/dlls/inseng/Makefile.in
|
||||
+++ b/dlls/inseng/Makefile.in
|
||||
@@ -1,6 +1,9 @@
|
||||
@@ -36,7 +35,7 @@ index 652e06b..d0aaa66 100644
|
||||
IDL_SRCS = inseng_classes.idl
|
||||
diff --git a/dlls/inseng/icif.c b/dlls/inseng/icif.c
|
||||
new file mode 100644
|
||||
index 0000000..177f1b8
|
||||
index 00000000000..177f1b892ce
|
||||
--- /dev/null
|
||||
+++ b/dlls/inseng/icif.c
|
||||
@@ -0,0 +1,1745 @@
|
||||
@@ -1787,7 +1786,7 @@ index 0000000..177f1b8
|
||||
+}
|
||||
diff --git a/dlls/inseng/inf.c b/dlls/inseng/inf.c
|
||||
new file mode 100644
|
||||
index 0000000..4e164cc
|
||||
index 00000000000..4e164cc7b85
|
||||
--- /dev/null
|
||||
+++ b/dlls/inseng/inf.c
|
||||
@@ -0,0 +1,443 @@
|
||||
@@ -2235,7 +2234,7 @@ index 0000000..4e164cc
|
||||
+ return hr;
|
||||
+}
|
||||
diff --git a/dlls/inseng/inseng.spec b/dlls/inseng/inseng.spec
|
||||
index 82c0b4d..7ae46fa 100644
|
||||
index 82c0b4d5fe1..7ae46fad3a7 100644
|
||||
--- a/dlls/inseng/inseng.spec
|
||||
+++ b/dlls/inseng/inseng.spec
|
||||
@@ -7,6 +7,6 @@
|
||||
@@ -2248,7 +2247,7 @@ index 82c0b4d..7ae46fa 100644
|
||||
+@ stdcall GetICifRWFileFromFile(ptr str)
|
||||
@ stub PurgeDownloadDirectory
|
||||
diff --git a/dlls/inseng/inseng_main.c b/dlls/inseng/inseng_main.c
|
||||
index 03ec984..7b1e763 100644
|
||||
index c95d2c73216..7b1e763f2ff 100644
|
||||
--- a/dlls/inseng/inseng_main.c
|
||||
+++ b/dlls/inseng/inseng_main.c
|
||||
@@ -2,6 +2,7 @@
|
||||
@@ -2274,12 +2273,12 @@ index 03ec984..7b1e763 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(inseng);
|
||||
|
||||
-static inline void *heap_alloc(size_t len)
|
||||
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
|
||||
+static HINSTANCE instance;
|
||||
+
|
||||
+enum thread_operation
|
||||
{
|
||||
- return HeapAlloc(GetProcessHeap(), 0, len);
|
||||
- return HeapAlloc(GetProcessHeap(), 0, size);
|
||||
-}
|
||||
+ OP_DOWNLOAD,
|
||||
+ OP_INSTALL
|
||||
@@ -3462,7 +3461,7 @@ index 03ec984..7b1e763 100644
|
||||
IInstallEngine2_Release(&engine->IInstallEngine2_iface);
|
||||
diff --git a/dlls/inseng/inseng_private.h b/dlls/inseng/inseng_private.h
|
||||
new file mode 100644
|
||||
index 0000000..d5966b0
|
||||
index 00000000000..1e739d22128
|
||||
--- /dev/null
|
||||
+++ b/dlls/inseng/inseng_private.h
|
||||
@@ -0,0 +1,93 @@
|
||||
@@ -3492,9 +3491,9 @@ index 0000000..d5966b0
|
||||
+#include "inseng.h"
|
||||
+#include "wine/unicode.h"
|
||||
+
|
||||
+static inline void *heap_alloc(size_t len)
|
||||
+static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
|
||||
+{
|
||||
+ return HeapAlloc(GetProcessHeap(), 0, len);
|
||||
+ return HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+}
|
||||
+
|
||||
+static inline void *heap_zero_alloc(size_t len)
|
||||
@@ -3560,7 +3559,7 @@ index 0000000..d5966b0
|
||||
+void component_set_installed(ICifComponent *iface, BOOL value) DECLSPEC_HIDDEN;
|
||||
+ char *component_get_id(ICifComponent *iface) DECLSPEC_HIDDEN;
|
||||
diff --git a/include/inseng.idl b/include/inseng.idl
|
||||
index 8a3f4c4..8292741 100644
|
||||
index 8a3f4c4d270..82927418a99 100644
|
||||
--- a/include/inseng.idl
|
||||
+++ b/include/inseng.idl
|
||||
@@ -1,5 +1,6 @@
|
||||
@@ -3886,5 +3885,5 @@ index 8a3f4c4..8292741 100644
|
||||
+cpp_quote("HRESULT WINAPI GetICifFileFromFile(ICifFile **, const char *);")
|
||||
+cpp_quote("HRESULT WINAPI GetICifRWFileFromFile(ICifRWFile **, const char *);")
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@@ -1,54 +0,0 @@
|
||||
From a3c36a9407542059fcab059b071a9cff16840ed9 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 24 Jan 2017 19:18:13 +0800
|
||||
Subject: kernel32: Replace Peb->BeingDebugged check by
|
||||
CheckRemoteDebuggerPresent().
|
||||
|
||||
misctool.dll from AmiBroker on PROCESS_ATTACH event intentionally sets
|
||||
teb->peb->BeingDebugged to random value returned by rdtsc instruction,
|
||||
but that doesn't generate exceptions or debug events under Windows.
|
||||
---
|
||||
dlls/kernel32/process.c | 6 +++++-
|
||||
include/winbase.h | 1 +
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index 21302407b76..6d0fc74cdf4 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -1087,6 +1087,7 @@ static DWORD WINAPI start_process( PEB *peb )
|
||||
{
|
||||
IMAGE_NT_HEADERS *nt;
|
||||
LPTHREAD_START_ROUTINE entry;
|
||||
+ BOOL being_debugged;
|
||||
|
||||
nt = RtlImageNtHeader( peb->ImageBaseAddress );
|
||||
entry = (LPTHREAD_START_ROUTINE)((char *)peb->ImageBaseAddress +
|
||||
@@ -1103,8 +1104,11 @@ static DWORD WINAPI start_process( PEB *peb )
|
||||
DPRINTF( "%04x:Starting process %s (entryproc=%p)\n", GetCurrentThreadId(),
|
||||
debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry );
|
||||
|
||||
+ if (!CheckRemoteDebuggerPresent( GetCurrentProcess(), &being_debugged ))
|
||||
+ being_debugged = FALSE;
|
||||
+
|
||||
SetLastError( 0 ); /* clear error code */
|
||||
- if (peb->BeingDebugged) DbgBreakPoint();
|
||||
+ if (being_debugged) DbgBreakPoint();
|
||||
return call_process_entry( peb, entry );
|
||||
}
|
||||
|
||||
diff --git a/include/winbase.h b/include/winbase.h
|
||||
index eff59724eb0..0a2a3a334fd 100644
|
||||
--- a/include/winbase.h
|
||||
+++ b/include/winbase.h
|
||||
@@ -1737,6 +1737,7 @@ WINBASEAPI BOOL WINAPI CancelTimerQueueTimer(HANDLE,HANDLE);
|
||||
WINBASEAPI BOOL WINAPI CancelWaitableTimer(HANDLE);
|
||||
WINBASEAPI BOOL WINAPI CheckNameLegalDOS8Dot3A(const char*,char*,DWORD,BOOL*,BOOL*);
|
||||
WINBASEAPI BOOL WINAPI CheckNameLegalDOS8Dot3W(const WCHAR*, char*,DWORD,BOOL*,BOOL*);
|
||||
+WINBASEAPI BOOL WINAPI CheckRemoteDebuggerPresent(HANDLE,PBOOL);
|
||||
WINBASEAPI BOOL WINAPI ChangeTimerQueueTimer(HANDLE,HANDLE,ULONG,ULONG);
|
||||
WINADVAPI BOOL WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL);
|
||||
WINBASEAPI BOOL WINAPI ClearCommBreak(HANDLE);
|
||||
--
|
||||
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