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
February 2010
----- 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
783 discussions
Start a n
N
ew thread
Maarten Lankhorst : includes: Fix typo in audiopolicy.idl.
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: d326391e1edb865e90591e5db777a9fc6acb7f19 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d326391e1edb865e90591e5db…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sat Jan 30 11:12:54 2010 +0100 includes: Fix typo in audiopolicy.idl. --- include/audiopolicy.idl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/audiopolicy.idl b/include/audiopolicy.idl index 1221a54..fad17f5 100644 --- a/include/audiopolicy.idl +++ b/include/audiopolicy.idl @@ -222,7 +222,7 @@ interface IAudioSessionEnumerator : IUnknown pointer_default(unique), object ] -interface IAudiosessionManager2 : IAudioSessionManager +interface IAudioSessionManager2 : IAudioSessionManager { HRESULT GetSessionEnumerator( [retval,out] IAudioSessionEnumerator **SessionEnum
1
0
0
0
Maarten Lankhorst : includes: Add propkey header.
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: 7d115f3a9efabde21e52b57d019fba103584eef1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d115f3a9efabde21e52b57d0…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Jan 29 19:09:35 2010 +0100 includes: Add propkey header. --- include/Makefile.in | 1 + include/propkey.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 0 deletions(-) diff --git a/include/Makefile.in b/include/Makefile.in index 0c01cfd..b7de752 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -396,6 +396,7 @@ SRCDIR_INCLUDES = \ poppack.h \ powrprof.h \ profinfo.h \ + propkey.h \ propkeydef.h \ propvarutil.h \ prsht.h \ diff --git a/include/propkey.h b/include/propkey.h new file mode 100644 index 0000000..2a940d4 --- /dev/null +++ b/include/propkey.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2010 Maarten Lankhorst for Codeweavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _INC_PROPKEY +#define _INC_PROPKEY + +#include <propkeydef.h> + +DEFINE_PROPERTYKEY(PKEY_Audio_ChannelCount, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 7); +DEFINE_PROPERTYKEY(PKEY_Audio_Compression, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 10); +DEFINE_PROPERTYKEY(PKEY_Audio_Format, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 2); +DEFINE_PROPERTYKEY(PKEY_Audio_IsVariableBitRate, 0xe6822fee, 0x8c17, 0x4d62, 0x82, 0x3c, 0x8e, 0x9c, 0xfc, 0xbd, 0x1d, 0x5c, 100); +DEFINE_PROPERTYKEY(PKEY_Audio_PeakValue, 0x2579e5d0, 0x1116, 0x4084, 0xbd, 0x9a, 0x9b, 0x4f, 0x7c, 0xb4, 0xdf, 0x5e, 100); +DEFINE_PROPERTYKEY(PKEY_Audio_SampleRate, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 5); +DEFINE_PROPERTYKEY(PKEY_Audio_SampleSize, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 6); +DEFINE_PROPERTYKEY(PKEY_Audio_StreamName, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 9); +DEFINE_PROPERTYKEY(PKEY_Audio_StreamNumber, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x80, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 8); + +#endif /*_INC_PROPKEY*/
1
0
0
0
Alexandre Julliard : kernel32: Avoid truncating the output buffer length in GetCurrentDirectoryA.
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: 5f9f260e426cc7de9a7548b38c9a006e1338e6fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f9f260e426cc7de9a7548b38…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 1 13:22:41 2010 +0100 kernel32: Avoid truncating the output buffer length in GetCurrentDirectoryA. --- dlls/kernel32/path.c | 2 +- dlls/kernel32/tests/path.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index a304cb2..0a02681 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -76,7 +76,7 @@ static DWORD copy_filename_WtoA( LPCWSTR nameW, LPSTR buffer, DWORD len ) ANSI_STRING str; str.Buffer = buffer; - str.MaximumLength = len; + str.MaximumLength = min( len, UNICODE_STRING_MAX_CHARS ); if (is_ansi) RtlUnicodeStringToAnsiString( &str, &strW, FALSE ); else diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c index 4c0aac5..e533bd0 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.c @@ -423,6 +423,7 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive) static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir) { CHAR tmpstr[MAX_PATH],tmpstr1[MAX_PATH]; + char *buffer; DWORD len,len1; /* Save the original directory, so that we can return to it at the end of the test @@ -437,6 +438,35 @@ static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir) ok(len1==len+1, "GetCurrentDirectoryA returned %d instead of %d\n",len1,len+1); ok(lstrcmpiA(tmpstr,"aaaaaaa")==0, "GetCurrentDirectoryA should not have modified the buffer\n"); + + buffer = HeapAlloc( GetProcessHeap(), 0, 2 * 65536 ); + SetLastError( 0xdeadbeef ); + strcpy( buffer, "foo" ); + len = GetCurrentDirectoryA( 32767, buffer ); + ok( len != 0 && len < MAX_PATH, "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); + SetLastError( 0xdeadbeef ); + strcpy( buffer, "foo" ); + len = GetCurrentDirectoryA( 32768, buffer ); + ok( len != 0 && len < MAX_PATH, "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); + SetLastError( 0xdeadbeef ); + strcpy( buffer, "foo" ); + len = GetCurrentDirectoryA( 65535, buffer ); + ok( (len != 0 && len < MAX_PATH) || broken(!len), /* nt4, win2k, xp */ "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); + SetLastError( 0xdeadbeef ); + strcpy( buffer, "foo" ); + len = GetCurrentDirectoryA( 65536, buffer ); + ok( (len != 0 && len < MAX_PATH) || broken(!len), /* nt4 */ "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); + SetLastError( 0xdeadbeef ); + strcpy( buffer, "foo" ); + len = GetCurrentDirectoryA( 2 * 65536, buffer ); + ok( (len != 0 && len < MAX_PATH) || broken(!len), /* nt4 */ "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); + HeapFree( GetProcessHeap(), 0, buffer ); + /* SetCurrentDirectoryA shouldn't care whether the string has a trailing '\\' or not */
1
0
0
0
Alexandre Julliard : kernel: Only start the BIOS timer if there is an actual access to selector 0x40.
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: 76e5c012095e8f0352c5a645f8fadfac48539e3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76e5c012095e8f0352c5a645f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 1 12:58:29 2010 +0100 kernel: Only start the BIOS timer if there is an actual access to selector 0x40. --- dlls/krnl386.exe16/dosexe.h | 1 + dlls/krnl386.exe16/dosmem.c | 14 +++++++++++++- dlls/krnl386.exe16/instr.c | 1 + 3 files changed, 15 insertions(+), 1 deletions(-) diff --git a/dlls/krnl386.exe16/dosexe.h b/dlls/krnl386.exe16/dosexe.h index d25a411..fa73207 100644 --- a/dlls/krnl386.exe16/dosexe.h +++ b/dlls/krnl386.exe16/dosexe.h @@ -393,6 +393,7 @@ extern DOSCONF *DOSCONF_GetConfig( void ); /* dosmem.c */ extern BIOSDATA *DOSVM_BiosData( void ); +extern void DOSVM_start_bios_timer(void); /* fpu.c */ extern void WINAPI DOSVM_Int34Handler(CONTEXT86*); diff --git a/dlls/krnl386.exe16/dosmem.c b/dlls/krnl386.exe16/dosmem.c index c73faf1..e9acd66 100644 --- a/dlls/krnl386.exe16/dosmem.c +++ b/dlls/krnl386.exe16/dosmem.c @@ -264,6 +264,19 @@ static DWORD CALLBACK timer_thread( void *arg ) } /*********************************************************************** + * DOSVM_start_bios_timer + * + * Start the BIOS ticks timer when the app accesses selector 0x40. + */ +void DOSVM_start_bios_timer(void) +{ + static LONG running; + + if (!InterlockedExchange( &running, 1 )) + CloseHandle( CreateThread( NULL, 0, timer_thread, DOSVM_BiosData(), 0, NULL )); +} + +/*********************************************************************** * DOSMEM_Collapse * * Helper function for internal use only. @@ -335,7 +348,6 @@ BOOL DOSMEM_InitDosMemory(void) DOSMEM_Available()); DOSVM_InitSegments(); - CloseHandle( CreateThread( NULL, 0, timer_thread, DOSVM_BiosData(), 0, NULL )); SetEvent( hRunOnce ); done = 1; diff --git a/dlls/krnl386.exe16/instr.c b/dlls/krnl386.exe16/instr.c index 6ba985c..a1eb68c 100644 --- a/dlls/krnl386.exe16/instr.c +++ b/dlls/krnl386.exe16/instr.c @@ -104,6 +104,7 @@ static BOOL INSTR_ReplaceSelector( CONTEXT86 *context, WORD *sel ) { if (*sel == 0x40) { + DOSVM_start_bios_timer(); *sel = DOSMEM_BiosDataSeg; return TRUE; }
1
0
0
0
Paul Vriens : wininet/tests: Fix some memory leaks (Valgrind).
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: 6c136e862b7f538be3420751b6c1229a7f46c97d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c136e862b7f538be3420751b…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Mon Feb 1 09:59:16 2010 +0100 wininet/tests: Fix some memory leaks (Valgrind). --- dlls/wininet/tests/internet.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 5885eb0..fa28b0c 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -934,6 +934,7 @@ static void test_Option_PerConnectionOption(void) list.pOptions[1].Value.dwValue); verifyProxyEnable(1); + HeapFree(GetProcessHeap(), 0, list.pOptions[0].Value.pszValue); HeapFree(GetProcessHeap(), 0, list.pOptions); /* disable the proxy server */ @@ -1060,6 +1061,7 @@ static void test_Option_PerConnectionOptionA(void) "Retrieved flags should've been PROXY_TYPE_PROXY, was: %d\n", list.pOptions[1].Value.dwValue); + HeapFree(GetProcessHeap(), 0, list.pOptions[0].Value.pszValue); HeapFree(GetProcessHeap(), 0, list.pOptions); /* restore original settings */
1
0
0
0
Paul Vriens : dxgi/tests: Fix a test failure when no adapters are present.
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: a9113f7b3ca3209be08d63a28442394494182831 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a9113f7b3ca3209be08d63a28…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Mon Feb 1 09:35:30 2010 +0100 dxgi/tests: Fix a test failure when no adapters are present. --- dlls/dxgi/tests/device.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c index d4ca50b..4d2ac14 100644 --- a/dlls/dxgi/tests/device.c +++ b/dlls/dxgi/tests/device.c @@ -36,7 +36,9 @@ static IDXGIDevice *create_device(HMODULE d3d10core) if (FAILED(hr)) goto cleanup; hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter); - ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr); + ok(SUCCEEDED(hr) || + hr == DXGI_ERROR_NOT_FOUND, /* Some VMware and VirtualBox */ + "EnumAdapters failed, hr %#x\n", hr); if (FAILED(hr)) goto cleanup; hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, NULL, (void **)&device);
1
0
0
0
Paul Vriens : d3d10core/tests: Fix a test failure when no adapters are present.
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: 7cc429312eef0aa6d33fc1e204c6903cd6b63f9f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7cc429312eef0aa6d33fc1e20…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Mon Feb 1 09:35:22 2010 +0100 d3d10core/tests: Fix a test failure when no adapters are present. --- dlls/d3d10core/tests/device.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index 122a154..7ad8bb6 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -35,7 +35,9 @@ static ID3D10Device *create_device(void) if (FAILED(hr)) goto cleanup; hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter); - ok(SUCCEEDED(hr), "EnumAdapters failed, hr %#x\n", hr); + ok(SUCCEEDED(hr) || + hr == DXGI_ERROR_NOT_FOUND, /* Some VMware and VirtualBox */ + "EnumAdapters failed, hr %#x\n", hr); if (FAILED(hr)) goto cleanup; hr = D3D10CoreCreateDevice(factory, adapter, 0, NULL, &device);
1
0
0
0
Christian Costa : d3drm: Implement partially IDirect3DRMMeshBuilderImpl_Load.
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: 4296852b8873e2fc13b01259bbffc1dbfeaa3f0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4296852b8873e2fc13b01259b…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Mon Feb 1 08:18:48 2010 +0100 d3drm: Implement partially IDirect3DRMMeshBuilderImpl_Load. --- dlls/d3drm/Makefile.in | 2 +- dlls/d3drm/meshbuilder.c | 287 +++++++++++++++++++++++++++++++++++++++++++++- dlls/d3drm/tests/d3drm.c | 4 +- 3 files changed, 288 insertions(+), 5 deletions(-) diff --git a/dlls/d3drm/Makefile.in b/dlls/d3drm/Makefile.in index 4dfd89c..01f28f0 100644 --- a/dlls/d3drm/Makefile.in +++ b/dlls/d3drm/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = d3drm.dll IMPORTLIB = d3drm -IMPORTS = dxguid uuid kernel32 +IMPORTS = dxguid uuid d3dxof kernel32 C_SRCS = \ d3drm.c \ diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index b2ef539..ecf7d4f 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -27,6 +27,7 @@ #include "winbase.h" #include "wingdi.h" +#include "dxfile.h" #include "d3drm_private.h" #include "d3drm.h" @@ -40,6 +41,229 @@ typedef struct { static const struct IDirect3DRMMeshBuilderVtbl Direct3DRMMeshBuilder_Vtbl; +static const GUID GUID_Mesh = { 0x3D82AB44, 0x62DA, 0x11CF, { 0xAB, 0x39, 0x00, 0x20, 0xAF, 0x71, 0xE4, 0x33 } }; + +static char templates[] = { +"xof 0302txt 0064" +"template Header" +"{" +"<3D82AB43-62DA-11CF-AB39-0020AF71E433>" +"WORD major;" +"WORD minor;" +"DWORD flags;" +"}" +"template Vector" +"{" +"<3D82AB5E-62DA-11CF-AB39-0020AF71E433>" +"FLOAT x;" +"FLOAT y;" +"FLOAT z;" +"}" +"template Coords2d" +"{" +"<F6F23F44-7686-11CF-8F52-0040333594A3>" +"FLOAT u;" +"FLOAT v;" +"}" +"template Matrix4x4" +"{" +"<F6F23F45-7686-11CF-8F52-0040333594A3>" +"array FLOAT matrix[16];" +"}" +"template ColorRGBA" +"{" +"<35FF44E0-6C7C-11CF-8F52-0040333594A3>" +"FLOAT red;" +"FLOAT green;" +"FLOAT blue;" +"FLOAT alpha;" +"}" +"template ColorRGB" +"{" +"<D3E16E81-7835-11CF-8F52-0040333594A3>" +"FLOAT red;" +"FLOAT green;" +"FLOAT blue;" +"}" +"template IndexedColor" +"{" +"<1630B820-7842-11CF-8F52-0040333594A3>" +"DWORD index;" +"ColorRGBA indexColor;" +"}" +"template Boolean" +"{" +"<537DA6A0-CA37-11D0-941C-0080C80CFA7B>" +"DWORD truefalse;" +"}" +"template Boolean2d" +"{" +"<4885AE63-78E8-11CF-8F52-0040333594A3>" +"Boolean u;" +"Boolean v;" +"}" +"template MaterialWrap" +"{" +"<4885AE60-78E8-11CF-8F52-0040333594A3>" +"Boolean u;" +"Boolean v;" +"}" +"template TextureFilename" +"{" +"<A42790E1-7810-11CF-8F52-0040333594A3>" +"STRING filename;" +"}" +"template Material" +"{" +"<3D82AB4D-62DA-11CF-AB39-0020AF71E433>" +"ColorRGBA faceColor;" +"FLOAT power;" +"ColorRGB specularColor;" +"ColorRGB emissiveColor;" +"[...]" +"}" +"template MeshFace" +"{" +"<3D82AB5F-62DA-11CF-AB39-0020AF71E433>" +"DWORD nFaceVertexIndices;" +"array DWORD faceVertexIndices[nFaceVertexIndices];" +"}" +"template MeshFaceWraps" +"{" +"<ED1EC5C0-C0A8-11D0-941C-0080C80CFA7B>" +"DWORD nFaceWrapValues;" +"array Boolean2d faceWrapValues[nFaceWrapValues];" +"}" +"template MeshTextureCoords" +"{" +"<F6F23F40-7686-11CF-8F52-0040333594A3>" +"DWORD nTextureCoords;" +"array Coords2d textureCoords[nTextureCoords];" +"}" +"template MeshMaterialList" +"{" +"<F6F23F42-7686-11CF-8F52-0040333594A3>" +"DWORD nMaterials;" +"DWORD nFaceIndexes;" +"array DWORD faceIndexes[nFaceIndexes];" +"[Material]" +"}" +"template MeshNormals" +"{" +"<F6F23F43-7686-11CF-8F52-0040333594A3>" +"DWORD nNormals;" +"array Vector normals[nNormals];" +"DWORD nFaceNormals;" +"array MeshFace faceNormals[nFaceNormals];" +"}" +"template MeshVertexColors" +"{" +"<1630B821-7842-11CF-8F52-0040333594A3>" +"DWORD nVertexColors;" +"array IndexedColor vertexColors[nVertexColors];" +"}" +"template Mesh" +"{" +"<3D82AB44-62DA-11CF-AB39-0020AF71E433>" +"DWORD nVertices;" +"array Vector vertices[nVertices];" +"DWORD nFaces;" +"array MeshFace faces[nFaces];" +"[...]" +"}" +"template FrameTransformMatrix" +"{" +"<F6F23F41-7686-11CF-8F52-0040333594A3>" +"Matrix4x4 frameMatrix;" +"}" +"template Frame" +"{" +"<3D82AB46-62DA-11CF-AB39-0020AF71E433>" +"[...]" +"}" +"template FloatKeys" +"{" +"<10DD46A9-775B-11CF-8F52-0040333594A3>" +"DWORD nValues;" +"array FLOAT values[nValues];" +"}" +"template TimedFloatKeys" +"{" +"<F406B180-7B3B-11CF-8F52-0040333594A3>" +"DWORD time;" +"FloatKeys tfkeys;" +"}" +"template AnimationKey" +"{" +"<10DD46A8-775B-11CF-8F52-0040333594A3>" +"DWORD keyType;" +"DWORD nKeys;" +"array TimedFloatKeys keys[nKeys];" +"}" +"template AnimationOptions" +"{" +"<E2BF56C0-840F-11CF-8F52-0040333594A3>" +"DWORD openclosed;" +"DWORD positionquality;" +"}" +"template Animation" +"{" +"<3D82AB4F-62DA-11CF-AB39-0020AF71E433>" +"[...]" +"}" +"template AnimationSet" +"{" +"<3D82AB50-62DA-11CF-AB39-0020AF71E433>" +"[Animation]" +"}" +"template InlineData" +"{" +"<3A23EEA0-94B1-11D0-AB39-0020AF71E433>" +"[BINARY]" +"}" +"template Url" +"{" +"<3A23EEA1-94B1-11D0-AB39-0020AF71E433>" +"DWORD nUrls;" +"array STRING urls[nUrls];" +"}" +"template ProgressiveMesh" +"{" +"<8A63C360-997D-11D0-941C-0080C80CFA7B>" +"[Url,InlineData]" +"}" +"template Guid" +"{" +"<A42790E0-7810-11CF-8F52-0040333594A3>" +"DWORD data1;" +"WORD data2;" +"WORD data3;" +"array UCHAR data4[8];" +"}" +"template StringProperty" +"{" +"<7F0F21E0-BFE1-11D1-82C0-00A0C9697271>" +"STRING key;" +"STRING value;" +"}" +"template PropertyBag" +"{" +"<7F0F21E1-BFE1-11D1-82C0-00A0C9697271>" +"[StringProperty]" +"}" +"template ExternalVisual" +"{" +"<98116AA0-BDBA-11D1-82C0-00A0C9697271>" +"Guid guidExternalVisual;" +"[...]" +"}" +"template RightHanded" +"{" +"<7F5D5EA0-D53A-11D1-82C0-00A0C9697271>" +"DWORD bRightHanded;" +"}" +}; + HRESULT Direct3DRMMeshBuilder_create(LPDIRECT3DRMMESHBUILDER* ppMeshBuilder) { IDirect3DRMMeshBuilderImpl* object; @@ -179,10 +403,69 @@ static HRESULT WINAPI IDirect3DRMMeshBuilderImpl_GetClassName(IDirect3DRMMeshBui static HRESULT WINAPI IDirect3DRMMeshBuilderImpl_Load(IDirect3DRMMeshBuilder* iface, LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK cb, LPVOID pArg) { IDirect3DRMMeshBuilderImpl *This = (IDirect3DRMMeshBuilderImpl *)iface; + DXFILELOADOPTIONS load_options; + LPDIRECTXFILE pDXFile = NULL; + LPDIRECTXFILEENUMOBJECT pEnumObject = NULL; + LPDIRECTXFILEDATA pData = NULL; + const GUID* pGuid; + HRESULT hr; + HRESULT ret = D3DRMERR_BADOBJECT; - FIXME("(%p)->(%p,%p,%x,%p,%p): stub\n", This, filename, name, loadflags, cb, pArg); + FIXME("(%p)->(%p,%p,%x,%p,%p): partial stub\n", This, filename, name, loadflags, cb, pArg); - return E_NOTIMPL; + if (loadflags == D3DRMLOAD_FROMMEMORY) + { + DXFILELOADMEMORY info; + LPD3DRMLOADMEMORY pinfo = (LPD3DRMLOADMEMORY)filename; + info.lpMemory = pinfo->lpMemory; + info.dSize = pinfo->dSize; + load_options = DXFILELOAD_FROMMEMORY; + } + else + { + FIXME("Load options %d not supported yet\n", loadflags); + return E_NOTIMPL; + } + + hr = DirectXFileCreate(&pDXFile); + if (hr != DXFILE_OK) + goto end; + + hr = IDirectXFile_RegisterTemplates(pDXFile, templates, sizeof(templates)); + if (hr != DXFILE_OK) + goto end; + + hr = IDirectXFile_CreateEnumObject(pDXFile, filename, load_options, &pEnumObject); + if (hr != DXFILE_OK) + goto end; + + hr = IDirectXFileEnumObject_GetNextDataObject(pEnumObject, &pData); + if (hr != DXFILE_OK) + goto end; + + hr = IDirectXFileData_GetType(pData, &pGuid); + if (hr != DXFILE_OK) + goto end; + + TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid)); + + if (!IsEqualGUID(pGuid, &GUID_Mesh)) + { + ret = D3DRMERR_BADFILE; + goto end; + } + + ret = D3DRM_OK; + +end: + if (pData) + IDirectXFileData_Release(pData); + if (pEnumObject) + IDirectXFileEnumObject_Release(pEnumObject); + if (pDXFile) + IDirectXFile_Release(pDXFile); + + return ret; } static HRESULT WINAPI IDirect3DRMMeshBuilderImpl_Save(IDirect3DRMMeshBuilder* iface, const char *filename, D3DRMXOFFORMAT format, D3DRMSAVEOPTIONS save) diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 0d8e342..9e74c12 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -78,12 +78,12 @@ void Test(void) info.lpMemory = data_bad; info.dSize = sizeof(data_bad); hr = IDirect3DRMMeshBuilder_Load(pMeshBuilder, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); - todo_wine ok(hr == D3DRMERR_BADFILE, "Sould have returned D3DRMERR_BADFILE (hr = %x)\n", hr); + ok(hr == D3DRMERR_BADFILE, "Sould have returned D3DRMERR_BADFILE (hr = %x)\n", hr); info.lpMemory = data_ok; info.dSize = sizeof(data_ok); hr = IDirect3DRMMeshBuilder_Load(pMeshBuilder, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); - todo_wine ok(hr == D3DRM_OK, "Cannot load mesh data (hr = %x)\n", hr); + ok(hr == D3DRM_OK, "Cannot load mesh data (hr = %x)\n", hr); IDirect3DRMMeshBuilder_Release(pMeshBuilder);
1
0
0
0
Christian Costa : d3drm: Add some tests.
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: aaf2ef418e92021114c97fa36cbeae9f452d93fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aaf2ef418e92021114c97fa36…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Mon Feb 1 08:18:42 2010 +0100 d3drm: Add some tests. --- dlls/d3drm/tests/Makefile.in | 4 +- dlls/d3drm/tests/d3drm.c | 101 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 1 deletions(-) diff --git a/dlls/d3drm/tests/Makefile.in b/dlls/d3drm/tests/Makefile.in index 1c94038..f234119 100644 --- a/dlls/d3drm/tests/Makefile.in +++ b/dlls/d3drm/tests/Makefile.in @@ -5,7 +5,9 @@ VPATH = @srcdir@ TESTDLL = d3drm.dll IMPORTS = kernel32 -CTESTS = vector.c +CTESTS = \ + d3drm.c \ + vector.c @MAKE_TEST_RULES@ diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c new file mode 100644 index 0000000..0d8e342 --- /dev/null +++ b/dlls/d3drm/tests/d3drm.c @@ -0,0 +1,101 @@ +/* + * Copyright 2010 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "d3drm.h" + +#include "wine/test.h" + +static HMODULE d3drm_handle = 0; + +static HRESULT (WINAPI * pDirect3DRMCreate)(LPDIRECT3DRM* ppDirect3DRM); + +#define D3DRM_GET_PROC(func) \ + p ## func = (void*)GetProcAddress(d3drm_handle, #func); \ + if(!p ## func) { \ + trace("GetProcAddress(%s) failed\n", #func); \ + FreeLibrary(d3drm_handle); \ + return FALSE; \ + } + +static BOOL InitFunctionPtrs(void) +{ + d3drm_handle = LoadLibraryA("d3drm.dll"); + + if(!d3drm_handle) + { + skip("Could not load d3drm.dll\n"); + return FALSE; + } + + D3DRM_GET_PROC(Direct3DRMCreate) + + return TRUE; +} + +char data_ok[] = +"xof 0302txt 0064\n" +"Mesh Object\n" +"{\n" +"0;\n" +"0;\n" +"}\n"; + +char data_bad[] = +"xof 0302txt 0064\n" +"Header Object\n" +"{\n" +"1; 2; 3;\n" +"}\n"; + +void Test(void) +{ + HRESULT hr; + LPDIRECT3DRM pD3DRM; + LPDIRECT3DRMMESHBUILDER pMeshBuilder; + D3DRMLOADMEMORY info; + + hr = pDirect3DRMCreate(&pD3DRM); + ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface (hr = %x)\n", hr); + + hr = IDirect3DRM_CreateMeshBuilder(pD3DRM, &pMeshBuilder); + ok(hr == D3DRM_OK, "Cannot get IDirect3DRMMeshBuilder interface (hr = %x)\n", hr); + + info.lpMemory = data_bad; + info.dSize = sizeof(data_bad); + hr = IDirect3DRMMeshBuilder_Load(pMeshBuilder, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); + todo_wine ok(hr == D3DRMERR_BADFILE, "Sould have returned D3DRMERR_BADFILE (hr = %x)\n", hr); + + info.lpMemory = data_ok; + info.dSize = sizeof(data_ok); + hr = IDirect3DRMMeshBuilder_Load(pMeshBuilder, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL); + todo_wine ok(hr == D3DRM_OK, "Cannot load mesh data (hr = %x)\n", hr); + + IDirect3DRMMeshBuilder_Release(pMeshBuilder); + + IDirect3DRM_Release(pD3DRM); +} + +START_TEST(d3drm) +{ + if (!InitFunctionPtrs()) + return; + + Test(); + + FreeLibrary(d3drm_handle); +}
1
0
0
0
Christian Costa : d3drm: Add some definitions for IDirect3DRMMeshBuilderImpl_Load.
by Alexandre Julliard
01 Feb '10
01 Feb '10
Module: wine Branch: master Commit: 29c4055f7bb6707ee6fc90eef8836ab7a434bb7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=29c4055f7bb6707ee6fc90eef…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Mon Feb 1 08:18:36 2010 +0100 d3drm: Add some definitions for IDirect3DRMMeshBuilderImpl_Load. --- include/d3drmdef.h | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/include/d3drmdef.h b/include/d3drmdef.h index 59cc9de..80086dc 100644 --- a/include/d3drmdef.h +++ b/include/d3drmdef.h @@ -177,6 +177,33 @@ typedef struct _D3DRMMATERIALOVERRIDE { typedef DWORD D3DRMLOADOPTIONS; +#define D3DRMLOAD_FROMFILE 0x000L +#define D3DRMLOAD_FROMRESOURCE 0x001L +#define D3DRMLOAD_FROMMEMORY 0x002L +#define D3DRMLOAD_FROMSTREAM 0x004L +#define D3DRMLOAD_FROMURL 0x008L + +#define D3DRMLOAD_BYNAME 0x010L +#define D3DRMLOAD_BYPOSITION 0x020L +#define D3DRMLOAD_BYGUID 0x040L +#define D3DRMLOAD_FIRST 0x080L + +#define D3DRMLOAD_INSTANCEBYREFERENCE 0x100L +#define D3DRMLOAD_INSTANCEBYCOPYING 0x200L + +#define D3DRMLOAD_ASYNCHRONOUS 0x400L + +typedef struct _D3DRMLOADRESOURCE { + HMODULE hModule; + LPCSTR /*LPCTSTR*/ lpName; + LPCSTR /*LPCTSTR*/ lpType; +} D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE; + +typedef struct _D3DRMLOADMEMORY { + LPVOID lpMemory; + DWORD dSize; +} D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY; + typedef struct _D3DRMPMESHLOADSTATUS { DWORD dwSize; DWORD dwPMeshSize;
1
0
0
0
← Newer
1
...
70
71
72
73
74
75
76
...
79
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
73
74
75
76
77
78
79
Results per page:
10
25
50
100
200