winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2007
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
715 discussions
Start a n
N
ew thread
Dan Hipschman : widl: Remove var_t' s ptr_level field and start write_pointers.
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: ef433e279295beeadcbec3f36016ffc3587834a3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef433e279295beeadcbec3f36…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Wed May 9 20:50:49 2007 -0700 widl: Remove var_t's ptr_level field and start write_pointers. --- dlls/rpcrt4/tests/server.c | 40 ++++ dlls/rpcrt4/tests/server.idl | 18 ++ tools/widl/client.c | 12 +- tools/widl/header.c | 81 ++++---- tools/widl/header.h | 22 ++- tools/widl/parser.y | 126 +++++++---- tools/widl/proxy.c | 17 +- tools/widl/server.c | 4 +- tools/widl/typegen.c | 534 ++++++++++++++++++++++-------------------- tools/widl/typegen.h | 2 +- tools/widl/widltypes.h | 12 +- tools/widl/write_msft.c | 30 ++-- 12 files changed, 521 insertions(+), 377 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ef433e279295beeadcbec…
1
0
0
0
Mikołaj Zalewski : shell32: Handle invalid cbSize in Shell_NotifyIcon[AW].
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: 44e3200a8d0912e3b7509b3ac6c2446deb7a4c71 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44e3200a8d0912e3b7509b3ac…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Wed May 9 23:47:36 2007 +0200 shell32: Handle invalid cbSize in Shell_NotifyIcon[AW]. --- dlls/shell32/systray.c | 37 ++++++++++++-- dlls/shell32/tests/Makefile.in | 5 +- dlls/shell32/tests/systray.c | 106 ++++++++++++++++++++++++++++++++++++++++ programs/explorer/systray.c | 2 +- 4 files changed, 143 insertions(+), 7 deletions(-) diff --git a/dlls/shell32/systray.c b/dlls/shell32/systray.c index 824eeb9..2258eb9 100644 --- a/dlls/shell32/systray.c +++ b/dlls/shell32/systray.c @@ -45,6 +45,20 @@ static const WCHAR classname[] = /* Shell_TrayWnd */ {'S','h','e','l','l','_','T BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) { NOTIFYICONDATAW nidW; + INT cbSize; + + /* Validate the cbSize as Windows XP does */ + if (pnid->cbSize != NOTIFYICONDATAA_V1_SIZE && + pnid->cbSize != NOTIFYICONDATAA_V2_SIZE && + pnid->cbSize != NOTIFYICONDATAA_V3_SIZE && + pnid->cbSize != sizeof(NOTIFYICONDATAA)) + { + WARN("Invalid cbSize (%d) - using only Win95 fields (size=%d)\n", + pnid->cbSize, NOTIFYICONDATAA_V1_SIZE); + cbSize = NOTIFYICONDATAA_V1_SIZE; + } + else + cbSize = pnid->cbSize; ZeroMemory(&nidW, sizeof(nidW)); nidW.cbSize = sizeof(nidW); @@ -58,7 +72,7 @@ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) if (pnid->uFlags & NIF_TIP) MultiByteToWideChar(CP_ACP, 0, pnid->szTip, -1, nidW.szTip, sizeof(nidW.szTip)/sizeof(WCHAR)); - if (pnid->cbSize >= NOTIFYICONDATAA_V2_SIZE) + if (cbSize >= NOTIFYICONDATAA_V2_SIZE) { nidW.dwState = pnid->dwState; nidW.dwStateMask = pnid->dwStateMask; @@ -74,10 +88,10 @@ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) nidW.dwInfoFlags = pnid->dwInfoFlags; } - if (pnid->cbSize >= NOTIFYICONDATAA_V3_SIZE) + if (cbSize >= NOTIFYICONDATAA_V3_SIZE) nidW.guidItem = pnid->guidItem; - if (pnid->cbSize >= sizeof(NOTIFYICONDATAA)) + if (cbSize >= sizeof(NOTIFYICONDATAA)) nidW.hBalloonIcon = pnid->hBalloonIcon; return Shell_NotifyIconW(dwMessage, &nidW); } @@ -93,6 +107,21 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid) TRACE("dwMessage = %d, nid->cbSize=%d\n", dwMessage, nid->cbSize); + /* Validate the cbSize so that WM_COPYDATA doesn't crash the application */ + if (nid->cbSize != NOTIFYICONDATAW_V1_SIZE && + nid->cbSize != NOTIFYICONDATAW_V2_SIZE && + nid->cbSize != NOTIFYICONDATAW_V3_SIZE && + nid->cbSize != sizeof(NOTIFYICONDATAW)) + { + NOTIFYICONDATAW newNid; + + WARN("Invalid cbSize (%d) - using only Win95 fields (size=%d)\n", + nid->cbSize, NOTIFYICONDATAW_V1_SIZE); + CopyMemory(&newNid, nid, NOTIFYICONDATAW_V1_SIZE); + newNid.cbSize = NOTIFYICONDATAW_V1_SIZE; + return Shell_NotifyIconW(dwMessage, &newNid); + } + tray = FindWindowExW(0, NULL, classname, NULL); if (!tray) return FALSE; @@ -131,7 +160,7 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid) } cds.lpData = buffer; - memcpy(buffer, nid, sizeof(*nid)); + memcpy(buffer, nid, nid->cbSize); buffer += nid->cbSize; memcpy(buffer, &bmMask, sizeof(bmMask)); buffer += sizeof(bmMask); diff --git a/dlls/shell32/tests/Makefile.in b/dlls/shell32/tests/Makefile.in index 94b0c85..f66b34d 100644 --- a/dlls/shell32/tests/Makefile.in +++ b/dlls/shell32/tests/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../../.. SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = shell32.dll -IMPORTS = shell32 ole32 oleaut32 shlwapi advapi32 kernel32 +IMPORTS = shell32 ole32 oleaut32 shlwapi user32 gdi32 advapi32 kernel32 EXTRALIBS = -luuid CTESTS = \ @@ -13,7 +13,8 @@ CTESTS = \ shlexec.c \ shlfileop.c \ shlfolder.c \ - string.c + string.c \ + systray.c @MAKE_TEST_RULES@ diff --git a/dlls/shell32/tests/systray.c b/dlls/shell32/tests/systray.c new file mode 100644 index 0000000..e6d72a9 --- /dev/null +++ b/dlls/shell32/tests/systray.c @@ -0,0 +1,106 @@ +/* Unit tests for systray + * + * Copyright 2007 Mikolaj Zalewski + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#define _WIN32_IE 0x600 +#include <assert.h> +#include <stdarg.h> + +#include <windows.h> + +#include "wine/test.h" + + +static HWND hMainWnd; + +void test_cbsize() +{ + NOTIFYICONDATAW nidW; + NOTIFYICONDATAA nidA; + + ZeroMemory(&nidW, sizeof(nidW)); + nidW.cbSize = NOTIFYICONDATAW_V1_SIZE; + nidW.hWnd = hMainWnd; + nidW.uID = 1; + nidW.uFlags = NIF_ICON|NIF_MESSAGE; + nidW.hIcon = LoadIcon(NULL, IDI_APPLICATION); + nidW.uCallbackMessage = WM_USER+17; + ok(Shell_NotifyIconW(NIM_ADD, &nidW), "NIM_ADD failed!\n"); + + /* using an invalid cbSize does work */ + nidW.cbSize = 3; + nidW.hWnd = hMainWnd; + nidW.uID = 1; + ok(Shell_NotifyIconW(NIM_DELETE, &nidW), "NIM_DELETE failed!\n"); + /* as icon doesn't exist anymore - now there will be an error */ + nidW.cbSize = sizeof(nidW); + /* wine currently doesn't return error code put prints an ERR(...) */ + todo_wine ok(!Shell_NotifyIconW(NIM_DELETE, &nidW), "The icon was not deleted\n"); + + /* same for Shell_NotifyIconA */ + ZeroMemory(&nidA, sizeof(nidA)); + nidA.cbSize = NOTIFYICONDATAA_V1_SIZE; + nidA.hWnd = hMainWnd; + nidA.uID = 1; + nidA.uFlags = NIF_ICON|NIF_MESSAGE; + nidA.hIcon = LoadIcon(NULL, IDI_APPLICATION); + nidA.uCallbackMessage = WM_USER+17; + ok(Shell_NotifyIconA(NIM_ADD, &nidA), "NIM_ADD failed!\n"); + + /* using an invalid cbSize does work */ + nidA.cbSize = 3; + nidA.hWnd = hMainWnd; + nidA.uID = 1; + ok(Shell_NotifyIconA(NIM_DELETE, &nidA), "NIM_DELETE failed!\n"); + /* as icon doesn't exist anymore - now there will be an error */ + nidA.cbSize = sizeof(nidA); + /* wine currently doesn't return error code put prints an ERR(...) */ + todo_wine ok(!Shell_NotifyIconA(NIM_DELETE, &nidA), "The icon was not deleted\n"); +} + +START_TEST(systray) +{ + WNDCLASSA wc; + MSG msg; + RECT rc; + + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = GetModuleHandleA(NULL); + wc.hIcon = NULL; + wc.hCursor = LoadCursorA(NULL, MAKEINTRESOURCEA(IDC_IBEAM)); + wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); + wc.lpszMenuName = NULL; + wc.lpszClassName = "MyTestWnd"; + wc.lpfnWndProc = DefWindowProc; + RegisterClassA(&wc); + + hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0); + GetClientRect(hMainWnd, &rc); + ShowWindow(hMainWnd, SW_SHOW); + + test_cbsize(); + + PostQuitMessage(0); + while(GetMessageA(&msg,0,0,0)) { + TranslateMessage(&msg); + DispatchMessageA(&msg); + } + DestroyWindow(hMainWnd); +} diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index b93d209..1814bce 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -290,7 +290,7 @@ static void delete_icon(const NOTIFYICONDATAW *nid) if (!icon) { - WINE_ERR("invalid tray icon ID specified: %ud\n", nid->uID); + WINE_ERR("invalid tray icon ID specified: %u\n", nid->uID); return; }
1
0
0
0
Marcus Meissner : msi/tests: Increase buffer size a bit.
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: c90429033608fe9ae815fa36744d5c8d4be18399 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c90429033608fe9ae815fa367…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Wed Mar 28 20:52:08 2007 +0200 msi/tests: Increase buffer size a bit. Spotted by Coverity. --- dlls/msi/tests/install.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index b0bccf9..ad4f35a 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1141,7 +1141,7 @@ static void create_cc_test_files(void) static void delete_cab_files(void) { SHFILEOPSTRUCT shfl; - CHAR path[MAX_PATH]; + CHAR path[MAX_PATH+10]; lstrcpyA(path, CURR_DIR); lstrcatA(path, "\\*.cab"); @@ -1149,7 +1149,7 @@ static void delete_cab_files(void) shfl.hwnd = NULL; shfl.wFunc = FO_DELETE; - shfl.pFrom = (LPCSTR)path; + shfl.pFrom = path; shfl.pTo = NULL; shfl.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_NORECURSION | FOF_SILENT;
1
0
0
0
Stefan Dösinger : wined3d: Prevent wrong bumpenvmap warnings.
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: e40af7d3fa80ce6a536a38595301d5596a9a68ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e40af7d3fa80ce6a536a38595…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu May 10 22:59:24 2007 +0200 wined3d: Prevent wrong bumpenvmap warnings. --- dlls/wined3d/utils.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 12e5230..c444232 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2218,14 +2218,13 @@ void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, WINED3DTEXTUREOP checkGLcall("GL_TEXTURE_ENV, opr2_target, opr2"); Handled = TRUE; + break; } else if(GL_SUPPORT(NV_TEXTURE_SHADER2)) { /* Technically texture shader support without register combiners is possible, but not expected to occur * on real world cards, so for now a fixme should be enough */ FIXME("Implement bump mapping with GL_NV_texture_shader in non register combiner path\n"); } - Handled = FALSE; - break; default: Handled = FALSE; }
1
0
0
0
Stefan Dösinger : wined3d: Only addref clippers if one exists.
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: 093261b729fc77aeca83c01362e0a78dc9bca0aa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=093261b729fc77aeca83c0136…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu May 10 21:45:51 2007 +0200 wined3d: Only addref clippers if one exists. --- dlls/wined3d/surface.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 727f8b3..12681c4 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3504,7 +3504,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DCl TRACE("(%p)->(%p)\n", This, clipper); *clipper = This->clipper; - IWineD3DClipper_AddRef(*clipper); + if(*clipper) { + IWineD3DClipper_AddRef(*clipper); + } return WINED3D_OK; }
1
0
0
0
Stefan Dösinger : ddraw: Avoid fallout of failing tests.
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: 4295b18950baf7d0cd8690372db67e446ffec599 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4295b18950baf7d0cd8690372…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed May 9 23:00:32 2007 +0200 ddraw: Avoid fallout of failing tests. --- dlls/ddraw/tests/dsurface.c | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index 75a913b..24426c9 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -1213,18 +1213,24 @@ static void AttachmentTest(void) hr = IDirectDraw7_CreateSurface(lpDD, &ddsd, &surface4, NULL); ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); - hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface4); + hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface4); /* Succeeds on refrast */ ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a 16x16 offscreen plain surface to a 128x128 texture root returned %08x\n", hr); - hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface1); + if(SUCCEEDED(hr)) IDirectDrawSurface7_DeleteAttachedSurface(surface1, 0, surface4); + hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface1); /* Succeeds on refrast */ ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a 128x128 texture root to a 16x16 offscreen plain surface returned %08x\n", hr); - hr = IDirectDrawSurface7_AddAttachedSurface(surface3, surface4); + if(SUCCEEDED(hr)) IDirectDrawSurface7_DeleteAttachedSurface(surface1, 0, surface1); + hr = IDirectDrawSurface7_AddAttachedSurface(surface3, surface4); /* Succeeds on refrast */ ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a 16x16 offscreen plain surface to a 32x32 texture mip level returned %08x\n", hr); + if(SUCCEEDED(hr)) IDirectDrawSurface7_DeleteAttachedSurface(surface3, 0, surface4); hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface3); ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a 32x32 texture mip level to a 16x16 offscreen plain surface returned %08x\n", hr); - hr = IDirectDrawSurface7_AddAttachedSurface(surface2, surface4); + if(SUCCEEDED(hr)) IDirectDrawSurface7_DeleteAttachedSurface(surface4, 0, surface3); + hr = IDirectDrawSurface7_AddAttachedSurface(surface2, surface4); /* Succeeds on refrast */ ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a 16x16 offscreen plain surface to a 64x64 texture sublevel returned %08x\n", hr); + if(SUCCEEDED(hr)) IDirectDrawSurface7_DeleteAttachedSurface(surface2, 0, surface4); hr = IDirectDrawSurface7_AddAttachedSurface(surface4, surface2); ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a 64x64 texture sublevel to a 16x16 offscreen plain surface returned %08x\n", hr); + if(SUCCEEDED(hr)) IDirectDrawSurface7_DeleteAttachedSurface(surface4, 0, surface2); IDirectDrawSurface7_Release(surface4); IDirectDrawSurface7_Release(surface3); @@ -1301,10 +1307,13 @@ static void AttachmentTest(void) /* Now the proper detach */ hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface1); ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); - hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface3); + hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface3); /* Fails on refrast */ ok(hr == DD_OK, "Attaching an offscreen plain surface to another offscreen plain surface returned %08x\n", hr); - hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface3); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + if(SUCCEEDED(hr)) + { + hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface3); + ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + } hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching an offscreen plain surface to a front buffer of different size returned %08x\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1);
1
0
0
0
Stefan Dösinger : wined3d: Implement DDBLT_DEPTHFILL on the active depth stencil target.
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: a90f650fd21c0f08a4368e5bb41c8c748d11a96f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a90f650fd21c0f08a4368e5bb…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu May 10 21:10:49 2007 +0200 wined3d: Implement DDBLT_DEPTHFILL on the active depth stencil target. --- dlls/wined3d/surface.c | 33 ++++++++++++++++++++++++++++----- 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 735d8f4..727f8b3 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3086,6 +3086,26 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT * return WINED3DERR_INVALIDCALL; } +static HRESULT WINAPI IWineD3DSurfaceImpl_BltZ(IWineD3DSurfaceImpl *This, RECT *DestRect, IWineD3DSurface *SrcSurface, RECT *SrcRect, DWORD Flags, WINEDDBLTFX *DDBltFx) +{ + IWineD3DDeviceImpl *myDevice = This->resource.wineD3DDevice; + + if (Flags & WINEDDBLT_DEPTHFILL) { + return IWineD3DDevice_Clear((IWineD3DDevice *) myDevice, + DestRect == NULL ? 0 : 1, + (WINED3DRECT *) DestRect, + WINED3DCLEAR_ZBUFFER, + 0x00000000, + (float) DDBltFx->u5.dwFillDepth / (float) MAXDWORD, + 0x00000000); + + return WINED3D_OK; + } + + FIXME("(%p): Unsupp depthstencil blit\n", This); + return WINED3DERR_INVALIDCALL; +} + static HRESULT WINAPI IWineD3DSurfaceImpl_Blt(IWineD3DSurface *iface, RECT *DestRect, IWineD3DSurface *SrcSurface, RECT *SrcRect, DWORD Flags, WINEDDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; IWineD3DSurfaceImpl *Src = (IWineD3DSurfaceImpl *) SrcSurface; @@ -3094,11 +3114,14 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Blt(IWineD3DSurface *iface, RECT *Dest TRACE("(%p): Usage is %s\n", This, debug_d3dusage(This->resource.usage)); /* Accessing the depth stencil is supposed to fail between a BeginScene and EndScene pair */ - if(myDevice->inScene && - (iface == myDevice->stencilBufferTarget || - (SrcSurface && SrcSurface == myDevice->stencilBufferTarget))) { - TRACE("Attempt to access the depth stencil surface in a BeginScene / EndScene pair, returning WINED3DERR_INVALIDCALL\n"); - return WINED3DERR_INVALIDCALL; + if(iface == myDevice->stencilBufferTarget || (SrcSurface && SrcSurface == myDevice->stencilBufferTarget)) { + if(myDevice->inScene) { + TRACE("Attempt to access the depth stencil surface in a BeginScene / EndScene pair, returning WINED3DERR_INVALIDCALL\n"); + return WINED3DERR_INVALIDCALL; + } else if(IWineD3DSurfaceImpl_BltZ(This, DestRect, SrcSurface, SrcRect, Flags, DDBltFx) == WINED3D_OK) { + TRACE("Z Blit override handled the blit\n"); + return WINED3D_OK; + } } /* Special cases for RenderTargets */
1
0
0
0
Stefan Dösinger : wined3d: Destroying the resource frees all private data.
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: 5c48d504fcc82a9640cf13980895ab933fd6e736 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c48d504fcc82a9640cf13980…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri May 11 00:09:35 2007 +0200 wined3d: Destroying the resource frees all private data. Also adds a test for ddraw, d3d8 and d3d9. --- dlls/d3d8/tests/surface.c | 65 +++++++++++++++++++++++++++++++++++++ dlls/d3d9/tests/surface.c | 65 +++++++++++++++++++++++++++++++++++++ dlls/ddraw/surface.c | 16 ++++++--- dlls/ddraw/tests/dsurface.c | 72 +++++++++++++++++++++++++++++++++++++++++ dlls/wined3d/resource.c | 75 ++++++++++++++++++++++++------------------- include/d3d8.h | 5 +++ 6 files changed, 260 insertions(+), 38 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5c48d504fcc82a9640cf1…
1
0
0
0
Stefan Dösinger : ddraw: GetSurfaceDesc returns the surface memory while the surface is locked.
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: a5c484cbf3948ec824e990503f798d3333ff55fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a5c484cbf3948ec824e990503…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu May 10 21:55:14 2007 +0200 ddraw: GetSurfaceDesc returns the surface memory while the surface is locked. --- dlls/ddraw/surface.c | 12 +++++++++--- dlls/ddraw/tests/dsurface.c | 18 ++++++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index a19b8dd..98c425d 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -585,7 +585,6 @@ IDirectDrawSurfaceImpl_Lock(IDirectDrawSurface7 *iface, DDSD->dwSize = sizeof(DDSURFACEDESC2); } - DD_STRUCT_COPY_BYSIZE(DDSD,&(This->surface_desc)); hr = IWineD3DSurface_LockRect(This->WineD3DSurface, &LockedRect, Rect, @@ -596,7 +595,8 @@ IDirectDrawSurfaceImpl_Lock(IDirectDrawSurface7 *iface, * does not set the LPSURFACE flag on locked surfaces !?!. * DDSD->dwFlags |= DDSD_LPSURFACE; */ - DDSD->lpSurface = LockedRect.pBits; + This->surface_desc.lpSurface = LockedRect.pBits; + DD_STRUCT_COPY_BYSIZE(DDSD,&(This->surface_desc)); TRACE("locked surface returning description :\n"); if (TRACE_ON(ddraw)) DDRAW_dump_surface_desc(DDSD); @@ -622,9 +622,15 @@ IDirectDrawSurfaceImpl_Unlock(IDirectDrawSurface7 *iface, RECT *pRect) { ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface); + HRESULT hr; TRACE("(%p)->(%p)\n", This, pRect); - return IWineD3DSurface_UnlockRect(This->WineD3DSurface); + hr = IWineD3DSurface_UnlockRect(This->WineD3DSurface); + if(SUCCEEDED(hr)) + { + This->surface_desc.lpSurface = NULL; + } + return hr; } /***************************************************************************** diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index a2d7e7a..067306e 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -174,8 +174,7 @@ static void SrcColorKey32BlitTest(void) { LPDIRECTDRAWSURFACE lpSrc; LPDIRECTDRAWSURFACE lpDst; - DDSURFACEDESC ddsd; - DDSURFACEDESC ddsd2; + DDSURFACEDESC ddsd, ddsd2, ddsd3; DDCOLORKEY DDColorKey; LPDWORD lpData; HRESULT rc; @@ -211,9 +210,24 @@ static void SrcColorKey32BlitTest(void) lpData[1] = 0xCCCCCCCC; lpData[2] = 0xCCCCCCCC; lpData[3] = 0xCCCCCCCC; + + memset(&ddsd3, 0, sizeof(ddsd3)); + ddsd3.dwSize = sizeof(ddsd3); + U4(ddsd3).ddpfPixelFormat.dwSize = sizeof(U4(ddsd3).ddpfPixelFormat); + rc = IDirectDrawSurface_GetSurfaceDesc(lpDst, &ddsd3); + ok(rc == DD_OK, "IDirectDrawSurface_GetSurfaceDesc between a lock/unlock pair returned %08x\n", rc); + ok(ddsd3.lpSurface == ddsd3.lpSurface, "lpSurface from GetSurfaceDesc(%p) differs from the one returned by Lock(%p)\n", ddsd3.lpSurface, ddsd2.lpSurface); + rc = IDirectDrawSurface_Unlock(lpDst, NULL); ok(rc==DD_OK,"Unlock returned: %x\n",rc); + memset(&ddsd3, 0, sizeof(ddsd3)); + ddsd3.dwSize = sizeof(ddsd3); + U4(ddsd3).ddpfPixelFormat.dwSize = sizeof(U4(ddsd3).ddpfPixelFormat); + rc = IDirectDrawSurface_GetSurfaceDesc(lpDst, &ddsd3); + ok(rc == DD_OK, "IDirectDrawSurface_GetSurfaceDesc between a lock/unlock pair returned %08x\n", rc); + ok(ddsd3.lpSurface == NULL, "lpSurface from GetSurfaceDesc(%p) is not NULL after unlock\n", ddsd3.lpSurface); + rc = IDirectDrawSurface_Lock(lpSrc, NULL, &ddsd2, DDLOCK_WAIT, NULL); ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
1
0
0
0
Stefan Dösinger : ddraw: Use point filter for blit operations.
by Alexandre Julliard
11 May '07
11 May '07
Module: wine Branch: master Commit: e7b68eec34b8da683643466fa2871ebb2365fd45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7b68eec34b8da683643466fa…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu May 10 17:42:41 2007 +0200 ddraw: Use point filter for blit operations. D3DTEXF_NONE is a special value for mipmapping which disabled mipmapping, but it is not a valid mag / min filter parameter. D3DTEXF_POINT is what we want --- dlls/ddraw/surface.c | 2 +- dlls/wined3d/surface.c | 6 +++--- dlls/wined3d/surface_gdi.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index d0c93d7..a19b8dd 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -745,7 +745,7 @@ IDirectDrawSurfaceImpl_Blt(IDirectDrawSurface7 *iface, SrcRect, Flags, (WINEDDBLTFX *) DDBltFx, - WINED3DTEXF_NONE); + WINED3DTEXF_POINT); switch(hr) { case WINED3DERR_NOTAVAILABLE: return DDERR_UNSUPPORTED; diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index b6b2ac1..735d8f4 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2365,10 +2365,10 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D if( (xrel - 1.0 < -eps) || (xrel - 1.0 > eps)) { FIXME("Doing a pixel by pixel copy from the framebuffer to a texture, expect major performance issues\n"); - if(Filter != WINED3DTEXF_NONE) { + if(Filter != WINED3DTEXF_NONE && Filter != WINED3DTEXF_POINT) { ERR("Texture filtering not supported in direct blit\n"); } - } else if((Filter != WINED3DTEXF_NONE) && ((yrel - 1.0 < -eps) || (yrel - 1.0 > eps))) { + } else if((Filter != WINED3DTEXF_NONE && Filter != WINED3DTEXF_POINT) && ((yrel - 1.0 < -eps) || (yrel - 1.0 > eps))) { ERR("Texture filtering not supported in direct blit\n"); } @@ -3207,7 +3207,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, D if(trans & WINEDDBLTFAST_DONOTWAIT) Flags |= WINEDDBLT_DONOTWAIT; - if(IWineD3DSurfaceImpl_BltOverride(This, &DstRect, Source, &SrcRect, Flags, NULL, WINED3DTEXF_NONE) == WINED3D_OK) return WINED3D_OK; + if(IWineD3DSurfaceImpl_BltOverride(This, &DstRect, Source, &SrcRect, Flags, NULL, WINED3DTEXF_POINT) == WINED3D_OK) return WINED3D_OK; } diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index 7d277d4..c191b51 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -525,7 +525,7 @@ IWineGDISurfaceImpl_Blt(IWineD3DSurface *iface, return WINEDDERR_SURFACEBUSY; } - if(Filter != WINED3DTEXF_NONE) { + if(Filter != WINED3DTEXF_NONE && Filter != WINED3DTEXF_POINT) { /* Can happen when d3d9 apps do a StretchRect call which isn't handled in gl */ FIXME("Filters not supported in software blit\n"); }
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
72
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Results per page:
10
25
50
100
200