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
July 2012
----- 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
2 participants
712 discussions
Start a n
N
ew thread
Austin English : kernel32: Add a stub for GetDynamicTimeZoneInformation.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: 843390f9c9aeba5b9a5a65e85fb64d2526725d47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=843390f9c9aeba5b9a5a65e85…
Author: Austin English <austinenglish(a)gmail.com> Date: Thu Jul 5 08:26:48 2012 -0500 kernel32: Add a stub for GetDynamicTimeZoneInformation. --- dlls/kernel32/kernel32.spec | 1 + dlls/kernel32/time.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 8f3118f..a619f81 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -516,6 +516,7 @@ @ stdcall GetDllDirectoryW(long ptr) @ stdcall GetDriveTypeA(str) @ stdcall GetDriveTypeW(wstr) +@ stdcall GetDynamicTimeZoneInformation(ptr) @ stdcall GetEnvironmentStrings() GetEnvironmentStringsA @ stdcall GetEnvironmentStringsA() @ stdcall GetEnvironmentStringsW() diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c index deb0c33..224ad70 100644 --- a/dlls/kernel32/time.c +++ b/dlls/kernel32/time.c @@ -1066,3 +1066,13 @@ BOOL WINAPI GetSystemTimes(LPFILETIME lpIdleTime, LPFILETIME lpKernelTime, LPFIL return FALSE; } + +/*********************************************************************** + * GetDynamicTimeZoneInformation (KERNEL32.@) + */ +DWORD WINAPI GetDynamicTimeZoneInformation(PDYNAMIC_TIME_ZONE_INFORMATION info) +{ + FIXME("(%p) stub!\n", info); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return TIME_ZONE_ID_INVALID; +}
1
0
0
0
Austin English : kernel32: Add a stub for WerSetFlags.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: 275fc471fec6bde3d676a02b6031fe476831edca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=275fc471fec6bde3d676a02b6…
Author: Austin English <austinenglish(a)gmail.com> Date: Thu Jul 5 08:19:33 2012 -0500 kernel32: Add a stub for WerSetFlags. --- dlls/kernel32/kernel32.spec | 1 + dlls/kernel32/wer.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 76eb207..8f3118f 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1249,6 +1249,7 @@ @ stdcall WaitNamedPipeW (wstr long) @ stdcall WerRegisterFile(wstr long long) @ stdcall WerRegisterRuntimeExceptionModule(wstr ptr) +@ stdcall WerSetFlags(long) @ stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr) @ stdcall WinExec(str long) @ stdcall Wow64EnableWow64FsRedirection(long) diff --git a/dlls/kernel32/wer.c b/dlls/kernel32/wer.c index a131ad0..22ca7f2 100644 --- a/dlls/kernel32/wer.c +++ b/dlls/kernel32/wer.c @@ -51,3 +51,15 @@ HRESULT WINAPI WerRegisterRuntimeExceptionModule(PCWSTR callbackdll, PVOID conte FIXME("(%s, %p) stub!\n", debugstr_w(callbackdll), context); return S_OK; } + +/*********************************************************************** + * WerSetFlags (KERNEL32.@) + * + * Sets error reporting flags for the current process. + */ + +HRESULT WINAPI WerSetFlags(DWORD flags) +{ + FIXME("(%d) stub!\n", flags); + return E_NOTIMPL; +}
1
0
0
0
Bruno Jesus : user32/tests: Add a test for OpenClipboard twice with non-zero hwnd.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: b3d7896aad41cb30d09ddac334b3b4c87b7ec699 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3d7896aad41cb30d09ddac33…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Thu Jul 5 21:25:18 2012 -0300 user32/tests: Add a test for OpenClipboard twice with non-zero hwnd. --- dlls/user32/tests/clipboard.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index 266f629..655d158 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -66,6 +66,7 @@ static void test_ClipboardOwner(void) ok( ret, "CloseClipboard error %d\n", GetLastError()); ok(OpenClipboard(hWnd1), "OpenClipboard failed\n"); + todo_wine ok(OpenClipboard(hWnd1), "OpenClipboard second time in the same hwnd failed\n"); SetLastError(0xdeadbeef); ret = OpenClipboard(hWnd2);
1
0
0
0
Józef Kucia : d3dx9: Implement D3DXLoadVolumeFromFile.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: b267cc2927bb82856d5fa244ab009dc2718e45e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b267cc2927bb82856d5fa244a…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue Jul 3 16:06:47 2012 +0200 d3dx9: Implement D3DXLoadVolumeFromFile. --- dlls/d3dx9_36/d3dx9_36.spec | 4 +- dlls/d3dx9_36/volume.c | 59 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index ac1a197..58e8636 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -189,9 +189,9 @@ @ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) @ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) @ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) -@ stub D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) +@ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) -@ stub D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) +@ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) @ stdcall D3DXLoadVolumeFromMemory(ptr ptr ptr ptr long long long ptr ptr long long) @ stub D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) @ stub D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) diff --git a/dlls/d3dx9_36/volume.c b/dlls/d3dx9_36/volume.c index 9132ecd..6164cc3 100644 --- a/dlls/d3dx9_36/volume.c +++ b/dlls/d3dx9_36/volume.c @@ -21,6 +21,65 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); +HRESULT WINAPI D3DXLoadVolumeFromFileA(IDirect3DVolume9 *dst_volume, + const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, + const char *filename, + const D3DBOX *src_box, + DWORD filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *info) +{ + HRESULT hr; + int length; + WCHAR *filenameW; + + TRACE("(%p, %p, %p, %s, %p, %#x, %#x, %p)\n", + dst_volume, dst_palette, dst_box, debugstr_a(filename), src_box, + filter, color_key, info); + + if (!dst_volume || !filename) return D3DERR_INVALIDCALL; + + length = MultiByteToWideChar(CP_ACP, 0, filename, -1, NULL, 0); + filenameW = HeapAlloc(GetProcessHeap(), 0, length * sizeof(*filenameW)); + if (!filenameW) return E_OUTOFMEMORY; + + hr = D3DXLoadVolumeFromFileW(dst_volume, dst_palette, dst_box, filenameW, + src_box, filter, color_key, info); + HeapFree(GetProcessHeap(), 0, filenameW); + + return hr; +} + +HRESULT WINAPI D3DXLoadVolumeFromFileW(IDirect3DVolume9 *dst_volume, + const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, + const WCHAR *filename, + const D3DBOX *src_box, + DWORD filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *info) +{ + HRESULT hr; + void *data; + UINT data_size; + + TRACE("(%p, %p, %p, %s, %p, %#x, %#x, %p)\n", + dst_volume, dst_palette, dst_box, debugstr_w(filename), src_box, + filter, color_key, info); + + if (!dst_volume || !filename) return D3DERR_INVALIDCALL; + + if (FAILED(map_view_of_file(filename, &data, &data_size))) + return D3DXERR_INVALIDDATA; + + hr = D3DXLoadVolumeFromFileInMemory(dst_volume, dst_palette, dst_box, + data, data_size, src_box, filter, color_key, info); + UnmapViewOfFile(data); + + return hr; +} + HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, const D3DBOX *dst_box,
1
0
0
0
Józef Kucia : d3dx9/tests: Add tests for D3DXLoadVolumeFromFileInMemory.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: f5fd7fe3e1a61cf28a24e77afdc4bc5c1c422f70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f5fd7fe3e1a61cf28a24e77af…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue Jul 3 16:06:46 2012 +0200 d3dx9/tests: Add tests for D3DXLoadVolumeFromFileInMemory. --- dlls/d3dx9_36/tests/volume.c | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 70 insertions(+), 0 deletions(-) diff --git a/dlls/d3dx9_36/tests/volume.c b/dlls/d3dx9_36/tests/volume.c index 910233f..a4c9431 100644 --- a/dlls/d3dx9_36/tests/volume.c +++ b/dlls/d3dx9_36/tests/volume.c @@ -22,6 +22,23 @@ #include "wine/test.h" #include "d3dx9tex.h" +/* 4x4x2 volume map dds, 2 mipmaps */ +static const unsigned char dds_volume_map[] = +{ + 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x07,0x10,0x8a,0x00,0x04,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x44,0x58,0x54,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x40,0x00, + 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x50, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x50, + 0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x2f,0x7e,0xcf,0x79,0x01,0x54,0x5c,0x5c, + 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x84,0xef,0x7b,0xaa,0xab,0xab,0xab +}; + #define check_pixel_4bpp(box, x, y, z, color) _check_pixel_4bpp(__LINE__, box, x, y, z, color) static inline void _check_pixel_4bpp(unsigned int line, const D3DLOCKED_BOX *box, int x, int y, int z, DWORD expected_color) { @@ -175,6 +192,58 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device) IDirect3DVolumeTexture9_Release(volume_texture); } +static void test_D3DXLoadVolumeFromFileInMemory(IDirect3DDevice9 *device) +{ + HRESULT hr; + D3DBOX src_box; + IDirect3DVolume9 *volume; + IDirect3DVolumeTexture9 *volume_texture; + + hr = IDirect3DDevice9_CreateVolumeTexture(device, 4, 4, 2, 1, D3DUSAGE_DYNAMIC, D3DFMT_DXT3, D3DPOOL_DEFAULT, + &volume_texture, NULL); + if (FAILED(hr)) + { + skip("Failed to create volume texture\n"); + return; + } + + IDirect3DVolumeTexture9_GetVolumeLevel(volume_texture, 0, &volume); + + hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), NULL, D3DX_DEFAULT, 0, NULL); + ok(hr == D3D_OK, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + + hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, NULL, sizeof(dds_volume_map), NULL, D3DX_DEFAULT, 0, NULL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + + hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, NULL, 0, NULL, D3DX_DEFAULT, 0, NULL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + + hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, 0, NULL, D3DX_DEFAULT, 0, NULL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + + hr = D3DXLoadVolumeFromFileInMemory(NULL, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), NULL, D3DX_DEFAULT, 0, NULL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + + set_box(&src_box, 0, 0, 4, 4, 0, 2); + hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), &src_box, D3DX_DEFAULT, 0, NULL); + ok(hr == D3D_OK, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + + set_box(&src_box, 0, 0, 0, 0, 0, 0); + hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), &src_box, D3DX_DEFAULT, 0, NULL); + ok(hr == E_FAIL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, E_FAIL); + + set_box(&src_box, 0, 0, 5, 4, 0, 2); + hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), &src_box, D3DX_DEFAULT, 0, NULL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + + set_box(&src_box, 0, 0, 4, 4, 0, 3); + hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_volume_map, sizeof(dds_volume_map), &src_box, D3DX_DEFAULT, 0, NULL); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + + IDirect3DVolume9_Release(volume); + IDirect3DVolumeTexture9_Release(volume_texture); +} + START_TEST(volume) { HWND wnd; @@ -210,6 +279,7 @@ START_TEST(volume) } test_D3DXLoadVolumeFromMemory(device); + test_D3DXLoadVolumeFromFileInMemory(device); IDirect3DDevice9_Release(device); IDirect3D9_Release(d3d);
1
0
0
0
Józef Kucia : d3dx9: Implement D3DXLoadVolumeFromFileInMemory.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: 18a2dde12720e9004e28c152ec7785eb38da8260 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=18a2dde12720e9004e28c152e…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue Jul 3 16:06:45 2012 +0200 d3dx9: Implement D3DXLoadVolumeFromFileInMemory. --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/d3dx9_36_private.h | 3 ++ dlls/d3dx9_36/surface.c | 18 ++++++++++++ dlls/d3dx9_36/volume.c | 55 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 33038ca..ac1a197 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -190,7 +190,7 @@ @ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) @ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) @ stub D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) -@ stub D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) +@ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) @ stub D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) @ stdcall D3DXLoadVolumeFromMemory(ptr ptr ptr ptr long long long ptr ptr long long) @ stub D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) diff --git a/dlls/d3dx9_36/d3dx9_36_private.h b/dlls/d3dx9_36/d3dx9_36_private.h index fe3d090..d10cea0 100644 --- a/dlls/d3dx9_36/d3dx9_36_private.h +++ b/dlls/d3dx9_36/d3dx9_36_private.h @@ -68,6 +68,9 @@ HRESULT load_texture_from_dds(IDirect3DTexture9 *texture, const void *src_data, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; HRESULT load_cube_texture_from_dds(IDirect3DCubeTexture9 *cube_texture, const void *src_data, const PALETTEENTRY *palette, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; +HRESULT load_volume_from_dds(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key, + const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, const void *src_data, const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 6d2e778..c1835b7 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -407,6 +407,24 @@ static HRESULT load_surface_from_dds(IDirect3DSurface9 *dst_surface, const PALET src_pitch, NULL, src_rect, filter, color_key); } +HRESULT load_volume_from_dds(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key, + const D3DXIMAGE_INFO *src_info) +{ + UINT row_pitch, slice_pitch; + const struct dds_header *header = src_data; + const BYTE *pixels = (BYTE *)(header + 1); + + if (src_info->ResourceType != D3DRTYPE_VOLUMETEXTURE) + return D3DXERR_INVALIDDATA; + + if (FAILED(calculate_dds_surface_size(src_info, src_info->Width, src_info->Height, &row_pitch, &slice_pitch))) + return E_NOTIMPL; + + return D3DXLoadVolumeFromMemory(dst_volume, dst_palette, dst_box, pixels, src_info->Format, + row_pitch, slice_pitch, NULL, src_box, filter, color_key); +} + HRESULT load_texture_from_dds(IDirect3DTexture9 *texture, const void *src_data, const PALETTEENTRY *palette, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info) diff --git a/dlls/d3dx9_36/volume.c b/dlls/d3dx9_36/volume.c index f93a88f..9132ecd 100644 --- a/dlls/d3dx9_36/volume.c +++ b/dlls/d3dx9_36/volume.c @@ -142,6 +142,61 @@ HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume, return D3D_OK; } +HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(IDirect3DVolume9 *dst_volume, + const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, + const void *src_data, + UINT src_data_size, + const D3DBOX *src_box, + DWORD filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *src_info) +{ + HRESULT hr; + D3DBOX box; + D3DXIMAGE_INFO image_info; + + if (!dst_volume || !src_data) return D3DERR_INVALIDCALL; + + hr = D3DXGetImageInfoFromFileInMemory(src_data, src_data_size, &image_info); + if (FAILED(hr)) return hr; + + if (src_box) + { + if (src_box->Right > image_info.Width + || src_box->Bottom > image_info.Height + || src_box->Back > image_info.Depth) + return D3DERR_INVALIDCALL; + + box = *src_box; + } + else + { + box.Left = 0; + box.Top = 0; + box.Right = image_info.Width; + box.Bottom = image_info.Height; + box.Front = 0; + box.Back = image_info.Depth; + + } + + if (image_info.ImageFileFormat != D3DXIFF_DDS) + { + FIXME("File format %#x is not supported yet\n", image_info.ImageFileFormat); + return E_NOTIMPL; + } + + hr = load_volume_from_dds(dst_volume, dst_palette, dst_box, src_data, &box, + filter, color_key, &image_info); + if (FAILED(hr)) return hr; + + if (src_info) + *src_info = image_info; + + return D3D_OK; +} + HRESULT WINAPI D3DXLoadVolumeFromVolume(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, const D3DBOX *dst_box,
1
0
0
0
Józef Kucia : d3dx9: Fix D3DXLoadVolumeFromVolume so it works for subsets of volumes.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: 83c7fed1b0b74ef2be7083d23e87d0a3ea88f301 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83c7fed1b0b74ef2be7083d23…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue Jul 3 16:06:44 2012 +0200 d3dx9: Fix D3DXLoadVolumeFromVolume so it works for subsets of volumes. --- dlls/d3dx9_36/volume.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/volume.c b/dlls/d3dx9_36/volume.c index 51e6072..f93a88f 100644 --- a/dlls/d3dx9_36/volume.c +++ b/dlls/d3dx9_36/volume.c @@ -174,7 +174,7 @@ HRESULT WINAPI D3DXLoadVolumeFromVolume(IDirect3DVolume9 *dst_volume, } else box = *src_box; - hr = IDirect3DVolume9_LockBox(src_volume, &locked_box, &box, D3DLOCK_READONLY); + hr = IDirect3DVolume9_LockBox(src_volume, &locked_box, NULL, D3DLOCK_READONLY); if (FAILED(hr)) return hr; hr = D3DXLoadVolumeFromMemory(dst_volume, dst_palette, dst_box,
1
0
0
0
Józef Kucia : d3dx9: Validate the size of a volume texture in D3DXGetImageInfoFromFile.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: 0ad6af9caa508a44fce9e0243054ea41956dac5a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ad6af9caa508a44fce9e0243…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue Jul 3 16:06:43 2012 +0200 d3dx9: Validate the size of a volume texture in D3DXGetImageInfoFromFile. --- dlls/d3dx9_36/surface.c | 9 ++++++--- dlls/d3dx9_36/tests/surface.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 845a1f7..6d2e778 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -317,8 +317,8 @@ static HRESULT calculate_dds_surface_size(const D3DXIMAGE_INFO *img_info, static HRESULT get_image_info_from_dds(const void *buffer, UINT length, D3DXIMAGE_INFO *info) { UINT i; - UINT faces = 0; - UINT width, height; + UINT faces = 1; + UINT width, height, depth; const struct dds_header *header = buffer; UINT expected_length = 0; @@ -347,6 +347,7 @@ static HRESULT get_image_info_from_dds(const void *buffer, UINT length, D3DXIMAG else if (header->caps2 & DDS_CAPS2_CUBEMAP) { DWORD face; + faces = 0; for (face = DDS_CAPS2_CUBEMAP_POSITIVEX; face <= DDS_CAPS2_CUBEMAP_NEGATIVEZ; face <<= 1) { if (header->caps2 & face) @@ -356,20 +357,22 @@ static HRESULT get_image_info_from_dds(const void *buffer, UINT length, D3DXIMAG } else { - faces = 1; info->ResourceType = D3DRTYPE_TEXTURE; } /* calculate the expected length */ width = info->Width; height = info->Height; + depth = info->Depth; for (i = 0; i < info->MipLevels; i++) { UINT pitch, size = 0; calculate_dds_surface_size(info, width, height, &pitch, &size); + size *= depth; expected_length += size; width = max(1, width / 2); height = max(1, height / 2); + depth = max(1, depth / 2); } expected_length *= faces; diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index 84b1c56..5a01200 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -544,7 +544,7 @@ static void test_D3DXGetImageInfo(void) ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); hr = D3DXGetImageInfoFromFileInMemory(dds_volume_map, sizeof(dds_volume_map) - 1, &info); - todo_wine ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); + ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA); /* cleanup */
1
0
0
0
Jacek Caban : ieframe: Avoid useless QI(IID_IWebBrowser2) calls in tests by passing IWebBrowser2 interface where possible.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: 563355d651e20a44800abef307746a3af4a179bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=563355d651e20a44800abef30…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 9 17:46:38 2012 +0200 ieframe: Avoid useless QI(IID_IWebBrowser2) calls in tests by passing IWebBrowser2 interface where possible. --- dlls/ieframe/tests/webbrowser.c | 264 ++++++++++++++++----------------------- 1 files changed, 105 insertions(+), 159 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=563355d651e20a44800ab…
1
0
0
0
Jacek Caban : ieframe: Added init_test helper.
by Alexandre Julliard
09 Jul '12
09 Jul '12
Module: wine Branch: master Commit: c3e4a901c08fa5a8066cd3fa762d295f82203239 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3e4a901c08fa5a8066cd3fa7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 9 17:46:23 2012 +0200 ieframe: Added init_test helper. --- dlls/ieframe/tests/webbrowser.c | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c index 6711c77..7faf25a 100644 --- a/dlls/ieframe/tests/webbrowser.c +++ b/dlls/ieframe/tests/webbrowser.c @@ -3304,6 +3304,18 @@ static void test_Close(IWebBrowser2 *wb, BOOL do_download) IOleObject_Release(oo); } +#define TEST_DOWNLOAD 0x0001 +#define TEST_NOOLECMD 0x0002 +#define TEST_NODOCHOST 0x0004 + +static void init_test(DWORD flags) +{ + is_downloading = (flags & TEST_DOWNLOAD) != 0; + is_first_load = TRUE; + use_container_olecmd = !(flags & TEST_NOOLECMD); + use_container_dochostui = !(flags & TEST_NODOCHOST); +} + static void test_WebBrowser(BOOL do_download, BOOL do_close) { IUnknown *unk = NULL; @@ -3313,10 +3325,7 @@ static void test_WebBrowser(BOOL do_download, BOOL do_close) if (FAILED(create_WebBrowser(&unk))) return; - is_downloading = FALSE; - is_first_load = TRUE; - use_container_olecmd = TRUE; - use_container_dochostui = TRUE; + init_test(do_download ? TEST_DOWNLOAD : 0); hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); ok(hres == S_OK, "Could not get IWebBrowser2 iface: %08x\n", hres); @@ -3426,10 +3435,7 @@ static void test_WebBrowser_slim_container(void) HRESULT hres; ULONG ref; - is_downloading = FALSE; - is_first_load = TRUE; - use_container_olecmd = FALSE; - use_container_dochostui = FALSE; + init_test(TEST_NOOLECMD|TEST_NODOCHOST); /* Setup stage */ if (FAILED(create_WebBrowser(&unk))) @@ -3465,9 +3471,7 @@ static void test_WebBrowser_DoVerb(void) ULONG ref; BOOL res; - is_downloading = FALSE; - is_first_load = TRUE; - use_container_olecmd = FALSE; + init_test(0); if (FAILED(create_WebBrowser(&unk))) return;
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
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