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
December 2008
----- 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
1225 discussions
Start a n
N
ew thread
Paul Vriens : user32/tests: Destroy the windows after the tests.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: f4da3fd7ac509f030a4a47e45af3228a674adc73 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4da3fd7ac509f030a4a47e45…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Mon Dec 15 14:19:34 2008 +0100 user32/tests: Destroy the windows after the tests. --- dlls/user32/tests/win.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index ffbb8d2..0d9d426 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -5431,4 +5431,7 @@ START_TEST(win) /* add the tests above this line */ UnhookWindowsHookEx(hhook); + + DestroyWindow(hwndMain2); + DestroyWindow(hwndMain); }
1
0
0
0
Alexandre Julliard : ntdll: Add support for dynamically generated stub entry points.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: ccdfa4941eab300148fe5a33be1abda70a90df21 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ccdfa4941eab300148fe5a33b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 16 12:25:07 2008 +0100 ntdll: Add support for dynamically generated stub entry points. Based on a patch by Maarten Lankhorst. --- dlls/ntdll/loader.c | 50 +++++++++++++++++++++++++++++++++++++------------- 1 files changed, 37 insertions(+), 13 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index d3a0067..3a2276f 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -172,24 +172,20 @@ static inline BOOL call_dll_entry_point( DLLENTRYPROC proc, void *module, #endif /* __i386__ */ -#ifdef __i386__ +#if defined(__i386__) || defined(__x86_64__) /************************************************************************* * stub_entry_point * * Entry point for stub functions. */ -static void stub_entry_point( const char *dll, const char *name, ... ) +static void stub_entry_point( const char *dll, const char *name, void *ret_addr ) { EXCEPTION_RECORD rec; rec.ExceptionCode = EXCEPTION_WINE_STUB; rec.ExceptionFlags = EH_NONCONTINUABLE; rec.ExceptionRecord = NULL; -#ifdef __GNUC__ - rec.ExceptionAddress = __builtin_return_address(0); -#else - rec.ExceptionAddress = *((void **)&dll - 1); -#endif + rec.ExceptionAddress = ret_addr; rec.NumberParameters = 2; rec.ExceptionInformation[0] = (ULONG_PTR)dll; rec.ExceptionInformation[1] = (ULONG_PTR)name; @@ -198,17 +194,29 @@ static void stub_entry_point( const char *dll, const char *name, ... ) #include "pshpack1.h" +#ifdef __i386__ struct stub { - BYTE popl_eax; /* popl %eax */ BYTE pushl1; /* pushl $name */ const char *name; BYTE pushl2; /* pushl $dll */ const char *dll; - BYTE pushl_eax; /* pushl %eax */ - BYTE jmp; /* jmp stub_entry_point */ + BYTE call; /* call stub_entry_point */ DWORD entry; }; +#else +struct stub +{ + BYTE movq_rdi[2]; /* movq $dll,%rdi */ + const char *dll; + BYTE movq_rsi[2]; /* movq $name,%rsi */ + const char *name; + BYTE movq_rsp_rdx[4]; /* movq (%rsp),%rdx */ + BYTE movq_rax[2]; /* movq $entry, %rax */ + const void* entry; + BYTE jmpq_rax[2]; /* jmp %rax */ +}; +#endif #include "poppack.h" /************************************************************************* @@ -233,14 +241,30 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name ) return 0xdeadbeef; } stub = &stubs[nb_stubs++]; - stub->popl_eax = 0x58; /* popl %eax */ +#ifdef __i386__ stub->pushl1 = 0x68; /* pushl $name */ stub->name = name; stub->pushl2 = 0x68; /* pushl $dll */ stub->dll = dll; - stub->pushl_eax = 0x50; /* pushl %eax */ - stub->jmp = 0xe9; /* jmp stub_entry_point */ + stub->call = 0xe8; /* call stub_entry_point */ stub->entry = (BYTE *)stub_entry_point - (BYTE *)(&stub->entry + 1); +#else + stub->movq_rdi[0] = 0x48; /* movq $dll,%rdi */ + stub->movq_rdi[1] = 0xbf; + stub->dll = dll; + stub->movq_rsi[0] = 0x48; /* movq $name,%rsi */ + stub->movq_rsi[1] = 0xbe; + stub->name = name; + stub->movq_rsp_rdx[0] = 0x48; /* movq (%rsp),%rdx */ + stub->movq_rsp_rdx[1] = 0x8b; + stub->movq_rsp_rdx[2] = 0x14; + stub->movq_rsp_rdx[3] = 0x24; + stub->movq_rax[0] = 0x48; /* movq $entry, %rax */ + stub->movq_rax[1] = 0xb8; + stub->entry = stub_entry_point; + stub->jmpq_rax[0] = 0xff; /* jmp %rax */ + stub->jmpq_rax[1] = 0xe0; +#endif return (ULONG_PTR)stub; }
1
0
0
0
Alexandre Julliard : winebuild: Generate stub entry points for x86_64.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: ce635744252721be6bbd16c53b9639ad2668ecda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce635744252721be6bbd16c53…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 16 12:20:30 2008 +0100 winebuild: Generate stub entry points for x86_64. --- tools/winebuild/import.c | 75 ++++++++++++++++++++++++++++----------------- tools/winebuild/parser.c | 2 +- 2 files changed, 48 insertions(+), 29 deletions(-) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 2698430..4d52626 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1192,45 +1192,64 @@ void output_stubs( DLLSPEC *spec ) output( "\t%s\n", func_declaration(name) ); output( "%s:\n", asm_name(name) ); - /* flesh out the stub a bit to make safedisc happy */ - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - - output( "\tsubl $4,%%esp\n" ); - if (UsePIC) + switch (target_cpu) { - output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "1:" ); - if (exp_name) + case CPU_x86: + /* flesh out the stub a bit to make safedisc happy */ + output(" \tnop\n" ); + output(" \tnop\n" ); + output(" \tnop\n" ); + output(" \tnop\n" ); + output(" \tnop\n" ); + output(" \tnop\n" ); + output(" \tnop\n" ); + output(" \tnop\n" ); + output(" \tnop\n" ); + + output( "\tsubl $4,%%esp\n" ); + if (UsePIC) { - output( "\tleal .L%s_string-1b(%%eax),%%ecx\n", name ); + output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); + output( "1:" ); + if (exp_name) + { + output( "\tleal .L%s_string-1b(%%eax),%%ecx\n", name ); + output( "\tpushl %%ecx\n" ); + count++; + } + else + output( "\tpushl $%d\n", odp->ordinal ); + output( "\tleal .L__wine_spec_file_name-1b(%%eax),%%ecx\n" ); output( "\tpushl %%ecx\n" ); - count++; } else - output( "\tpushl $%d\n", odp->ordinal ); - output( "\tleal .L__wine_spec_file_name-1b(%%eax),%%ecx\n" ); - output( "\tpushl %%ecx\n" ); - } - else - { + { + if (exp_name) + { + output( "\tpushl $.L%s_string\n", name ); + count++; + } + else + output( "\tpushl $%d\n", odp->ordinal ); + output( "\tpushl $.L__wine_spec_file_name\n" ); + } + output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") ); + break; + case CPU_x86_64: + output( "\tleaq .L__wine_spec_file_name(%%rip),%%rdi\n" ); if (exp_name) { - output( "\tpushl $.L%s_string\n", name ); + output( "leaq .L%s_string(%%rip),%%rsi\n", name ); count++; } else - output( "\tpushl $%d\n", odp->ordinal ); - output( "\tpushl $.L__wine_spec_file_name\n" ); + output( "\tmovq $%d,%%rsi\n", odp->ordinal ); + output( "\tsubq $8,%%rsp\n" ); + output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") ); + break; + default: + assert(0); } - output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") ); output_function_size( name ); } diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c index 84281c5..ee39dcf 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c @@ -377,7 +377,7 @@ static int parse_spec_stub( ORDDEF *odp, DLLSPEC *spec ) { odp->u.func.arg_types[0] = '\0'; odp->link_name = xstrdup(""); - odp->flags |= FLAG_CPU(CPU_x86); /* don't bother generating stubs for Winelib */ + odp->flags |= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64); /* don't bother generating stubs for Winelib */ return 1; }
1
0
0
0
Alexandre Julliard : winetest: Use main instead of WinMain as entry point.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: 24d3b1f62298c8b64bcd1ececa193e62f199842b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=24d3b1f62298c8b64bcd1ecec…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 16 12:07:53 2008 +0100 winetest: Use main instead of WinMain as entry point. --- programs/winetest/main.c | 35 +++++++++++++++++++++++------------ 1 files changed, 23 insertions(+), 12 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index a6d4425..a9ead7d 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -665,28 +665,28 @@ usage (void) " -t TAG include TAG of characters [-.0-9a-zA-Z] in the report\n"); } -int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, - LPSTR cmdLine, int cmdShow) +int main( int argc, char *argv[] ) { char *logname = NULL; const char *cp, *submit = NULL; int reset_env = 1; int poweroff = 0; int interactive = 1; + int i; if (!LoadStringA( 0, IDS_BUILD_ID, build_id, sizeof(build_id) )) build_id[0] = 0; - cmdLine = strtok (cmdLine, whitespace); - while (cmdLine) { - if (cmdLine[0] != '-' || cmdLine[2]) { + for (i = 1; argv[i]; i++) + { + if (argv[i][0] != '-' || argv[i][2]) { if (nb_filters == sizeof(filters)/sizeof(filters[0])) { report (R_ERROR, "Too many test filters specified"); exit (2); } - filters[nb_filters++] = xstrdup( cmdLine ); + filters[nb_filters++] = argv[i]; } - else switch (cmdLine[1]) { + else switch (argv[i][1]) { case 'c': report (R_TEXTMODE); interactive = 0; @@ -706,16 +706,28 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, interactive = 0; break; case 's': - submit = strtok (NULL, whitespace); + if (!(submit = argv[++i])) + { + usage(); + exit( 2 ); + } if (tag) report (R_WARNING, "ignoring tag for submission"); send_file (submit); break; case 'o': - logname = strtok (NULL, whitespace); + if (!(logname = argv[++i])) + { + usage(); + exit( 2 ); + } break; case 't': - tag = strtok (NULL, whitespace); + if (!(tag = argv[++i])) + { + usage(); + exit( 2 ); + } if (strlen (tag) > MAXTAGLEN) report (R_FATAL, "tag is too long (maximum %d characters)", MAXTAGLEN); @@ -727,11 +739,10 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, } break; default: - report (R_ERROR, "invalid option: -%c", cmdLine[1]); + report (R_ERROR, "invalid option: -%c", argv[i][1]); usage (); exit (2); } - cmdLine = strtok (NULL, whitespace); } if (!submit) { report (R_STATUS, "Starting up");
1
0
0
0
Alexandre Julliard : widl: Use ULONG_PTR instead of unsigned long for pointer casts in generated code .
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: 34613835a72d82bc2d23e36abc0a68a3e218b621 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=34613835a72d82bc2d23e36ab…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 15 20:08:39 2008 +0100 widl: Use ULONG_PTR instead of unsigned long for pointer casts in generated code. --- tools/widl/proxy.c | 2 +- tools/widl/typegen.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 95651fc..dc3c1ae 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -249,7 +249,7 @@ static void free_variable( const var_t *arg, const char *local_var_prefix ) iid = get_attrp( arg->attrs, ATTR_IIDIS ); if( iid ) { - print_proxy( "__frame->_StubMsg.MaxCount = (unsigned long) " ); + print_proxy( "__frame->_StubMsg.MaxCount = (ULONG_PTR) " ); write_expr(proxy, iid, 1, 1, NULL, NULL, local_var_prefix); print_proxy( ";\n\n" ); } diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 051d2e8..9d55d19 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2676,8 +2676,8 @@ void print_phase_basetype(FILE *file, int indent, const char *local_var_prefix, } if (phase == PHASE_MARSHAL) - print_file(file, indent, "MIDL_memset(__frame->_StubMsg.Buffer, 0, (0x%x - (long)__frame->_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1); - print_file(file, indent, "__frame->_StubMsg.Buffer = (unsigned char *)(((long)__frame->_StubMsg.Buffer + %u) & ~0x%x);\n", + print_file(file, indent, "MIDL_memset(__frame->_StubMsg.Buffer, 0, (0x%x - (ULONG_PTR)__frame->_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1); + print_file(file, indent, "__frame->_StubMsg.Buffer = (unsigned char *)(((ULONG_PTR)__frame->_StubMsg.Buffer + %u) & ~0x%x);\n", alignment - 1, alignment - 1); if (phase == PHASE_MARSHAL) @@ -2759,14 +2759,14 @@ static void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char { if (type->size_is) { - print_file(file, indent, "__frame->_StubMsg.MaxCount = (unsigned long)"); + print_file(file, indent, "__frame->_StubMsg.MaxCount = (ULONG_PTR)"); write_expr(file, type->size_is, 1, 1, NULL, NULL, local_var_prefix); fprintf(file, ";\n\n"); } if (type->length_is) { - print_file(file, indent, "__frame->_StubMsg.Offset = (unsigned long)0;\n"); /* FIXME */ - print_file(file, indent, "__frame->_StubMsg.ActualCount = (unsigned long)"); + print_file(file, indent, "__frame->_StubMsg.Offset = 0;\n"); /* FIXME */ + print_file(file, indent, "__frame->_StubMsg.ActualCount = (ULONG_PTR)"); write_expr(file, type->length_is, 1, 1, NULL, NULL, local_var_prefix); fprintf(file, ";\n\n"); } @@ -2777,7 +2777,7 @@ static void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char { if (is_conformance_needed_for_phase(phase)) { - print_file(file, indent, "__frame->_StubMsg.MaxCount = (unsigned long)"); + print_file(file, indent, "__frame->_StubMsg.MaxCount = (ULONG_PTR)"); write_expr(file, get_attrp(var->attrs, ATTR_SWITCHIS), 1, 1, NULL, NULL, local_var_prefix); fprintf(file, ";\n\n"); } @@ -2789,7 +2789,7 @@ static void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char if (is_conformance_needed_for_phase(phase) && (iid = get_attrp( var->attrs, ATTR_IIDIS ))) { - print_file( file, indent, "__frame->_StubMsg.MaxCount = (unsigned long) " ); + print_file( file, indent, "__frame->_StubMsg.MaxCount = (ULONG_PTR) " ); write_expr( file, iid, 1, 1, NULL, NULL, local_var_prefix ); fprintf( file, ";\n\n" ); } @@ -3215,7 +3215,7 @@ int write_expr_eval_routines(FILE *file, const char *iface) print_file (file, 1, "%s *%s = (%s *)(pStubMsg->StackTop - %u);\n", name, var_name, name, eval->baseoff); print_file(file, 1, "pStubMsg->Offset = 0;\n"); /* FIXME */ - print_file(file, 1, "pStubMsg->MaxCount = (unsigned long)"); + print_file(file, 1, "pStubMsg->MaxCount = (ULONG_PTR)"); write_expr(file, eval->expr, 1, 1, var_name_expr, eval->structure, ""); fprintf(file, ";\n"); print_file(file, 0, "}\n\n");
1
0
0
0
Alexandre Julliard : msvcrt: Rename _ftime to avoid conflicts.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: 8a658d7d5155a0fa5678e1528a7cdfe8ce4e0260 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a658d7d5155a0fa5678e1528…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 15 20:08:33 2008 +0100 msvcrt: Rename _ftime to avoid conflicts. --- dlls/msvcrt/msvcrt.h | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/time.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 1105125..3a894e9 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -695,7 +695,7 @@ MSVCRT_wchar_t*** __cdecl __p__wenviron(void); char* __cdecl _strdate(char* date); char* __cdecl _strtime(char* date); int __cdecl _setmbcp(int); -void __cdecl _ftime(struct MSVCRT__timeb *buf); +void __cdecl MSVCRT__ftime(struct MSVCRT__timeb *buf); int __cdecl MSVCRT__close(int); int __cdecl MSVCRT__dup(int); int __cdecl MSVCRT__dup2(int, int); diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index d8231f5..c432d61 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -262,7 +262,7 @@ @ cdecl _fstat(long ptr) MSVCRT__fstat @ cdecl _fstat64(long ptr) MSVCRT__fstat64 @ cdecl _fstati64(long ptr) MSVCRT__fstati64 -@ cdecl _ftime(ptr) +@ cdecl _ftime(ptr) MSVCRT__ftime @ cdecl -ret64 _ftol() ntdll._ftol @ cdecl _fullpath(ptr str long) @ cdecl _futime(long ptr) diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 2b4327b..f95b8b6 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -233,7 +233,7 @@ double CDECL MSVCRT_difftime(MSVCRT_time_t time1, MSVCRT_time_t time2) /********************************************************************* * _ftime (MSVCRT.@) */ -void CDECL _ftime(struct MSVCRT__timeb *buf) +void CDECL MSVCRT__ftime(struct MSVCRT__timeb *buf) { TIME_ZONE_INFORMATION tzinfo; FILETIME ft; @@ -260,7 +260,7 @@ MSVCRT_time_t CDECL MSVCRT_time(MSVCRT_time_t* buf) MSVCRT_time_t curtime; struct MSVCRT__timeb tb; - _ftime(&tb); + MSVCRT__ftime(&tb); curtime = tb.time; return buf ? *buf = curtime : curtime;
1
0
0
0
Alexandre Julliard : msvcrt: The __p_* functions are only exported on i386.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: e2b3ee535ffbb1142b224d7f6783aca5bfa7c937 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e2b3ee535ffbb1142b224d7f6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 15 16:20:08 2008 +0100 msvcrt: The __p_* functions are only exported on i386. --- dlls/msvcr71/msvcr71.spec | 56 +++++++++++++++++++------------------- dlls/msvcrt/msvcrt.spec | 56 +++++++++++++++++++------------------- dlls/msvcrt20/msvcrt20.spec | 50 +++++++++++++++++----------------- dlls/msvcrt40/msvcrt40.spec | 52 ++++++++++++++++++------------------ dlls/msvcrtd/msvcrtd.spec | 62 +++++++++++++++++++++--------------------- include/msvcrt/malloc.h | 4 +++ include/msvcrt/mbctype.h | 4 +++ include/msvcrt/stdio.h | 7 +---- include/msvcrt/stdlib.h | 56 +++++++++++++++++++++++++-------------- include/msvcrt/time.h | 7 +++++ 10 files changed, 190 insertions(+), 164 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e2b3ee535ffbb1142b224…
1
0
0
0
Alexandre Julliard : msvcrt: Add a few more *_func functions to replace the __p_* ones.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: b19913ac7083e4100f50b4f471e19453bf7e99b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b19913ac7083e4100f50b4f47…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 15 16:03:32 2008 +0100 msvcrt: Add a few more *_func functions to replace the __p_* ones. --- dlls/msvcr71/msvcr71.spec | 10 +++++----- dlls/msvcrt/ctype.c | 8 ++------ dlls/msvcrt/file.c | 2 +- dlls/msvcrt/locale.c | 8 -------- dlls/msvcrt/mbcs.c | 5 ++--- dlls/msvcrt/msvcrt.h | 6 ++++++ dlls/msvcrt/msvcrt.spec | 13 +++++++++---- dlls/msvcrtd/msvcrtd.spec | 2 ++ include/msvcrt/stdlib.h | 4 ++-- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index f02052b..330cc42 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -90,10 +90,10 @@ @ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast @ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid @ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD -@ stub ___lc_codepage_func -@ stub ___lc_collate_cp_func -@ stub ___lc_handle_func -@ stub ___mb_cur_max_func +@ cdecl ___lc_codepage_func() msvcrt.___lc_codepage_func +@ cdecl ___lc_collate_cp_func() msvcrt.___lc_collate_cp_func +@ cdecl ___lc_handle_func() msvcrt.___lc_handle_func +@ cdecl ___mb_cur_max_func() msvcrt.___mb_cur_max_func @ cdecl ___setlc_active_func() msvcrt.___setlc_active_func @ cdecl ___unguarded_readlc_active_add_func() msvcrt.___unguarded_readlc_active_add_func @ extern __argc msvcrt.__argc @@ -150,7 +150,7 @@ @ cdecl __p__winminor() msvcrt.__p__winminor @ cdecl __p__winver() msvcrt.__p__winver @ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr -@ cdecl __pctype_func() msvcrt.__p__pctype +@ cdecl __pctype_func() msvcrt.__pctype_func @ extern __pioinfo msvcrt.__pioinfo @ stub __pwctype_func @ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c index 7b8c1fa..39d13ea 100644 --- a/dlls/msvcrt/ctype.c +++ b/dlls/msvcrt/ctype.c @@ -60,14 +60,10 @@ WORD MSVCRT_current_ctype[257]; */ WORD* MSVCRT__pctype = MSVCRT_current_ctype + 1; -/* mbctype data */ -extern int MSVCRT___mb_cur_max; -extern LCID MSVCRT_current_lc_all_lcid; - /********************************************************************* - * __p__pctype (MSVCRT.@) + * __pctype_func (MSVCRT.@) */ -WORD** CDECL __p__pctype(void) +WORD** CDECL MSVCRT___pctype_func(void) { return &MSVCRT__pctype; } diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 888f90c..76c4ea7 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -2309,7 +2309,7 @@ MSVCRT_wint_t CDECL MSVCRT_fgetwc(MSVCRT_FILE* file) } c = MSVCRT_fgetc(file); - if ((*__p___mb_cur_max() > 1) && MSVCRT_isleadbyte(c)) + if ((MSVCRT___mb_cur_max > 1) && MSVCRT_isleadbyte(c)) { FIXME("Treat Multibyte characters\n"); } diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 1d27eaf..e0ddb94 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -52,14 +52,6 @@ HANDLE MSVCRT___lc_handle[MSVCRT_LC_MAX - MSVCRT_LC_MIN + 1] = { 0 }; #define LOCK_LOCALE _mlock(_SETLOCALE_LOCK); #define UNLOCK_LOCALE _munlock(_SETLOCALE_LOCK); -/* ctype data modified when the locale changes */ -extern WORD MSVCRT__ctype [257]; -extern WORD MSVCRT_current_ctype[257]; -extern WORD* MSVCRT__pctype; - -/* mbctype data modified when the locale changes */ -extern int MSVCRT___mb_cur_max; - #define MSVCRT_LEADBYTE 0x8000 /* Friendly country strings & iso codes for synonym support. diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 22cfea0..d1a84e7 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -33,7 +33,6 @@ unsigned char MSVCRT_mbctype[257] = { 0 }; static int g_mbcp_is_multibyte = 0; int MSVCRT___mb_cur_max = 1; -extern int MSVCRT___lc_collate_cp; /* It seems that the data about valid trail bytes is not available from kernel32 * so we have to store is here. The format is the same as for lead bytes in CPINFO */ @@ -144,9 +143,9 @@ unsigned char* CDECL __p__mbctype(void) } /********************************************************************* - * __p___mb_cur_max(MSVCRT.@) + * ___mb_cur_max_func(MSVCRT.@) */ -int* CDECL __p___mb_cur_max(void) +int* CDECL MSVCRT____mb_cur_max_func(void) { return &MSVCRT___mb_cur_max; } diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 2b2934e..1105125 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -113,6 +113,12 @@ typedef struct __thread_data thread_data_t; extern thread_data_t *msvcrt_get_thread_data(void); extern int MSVCRT___lc_codepage; +extern int MSVCRT___lc_collate_cp; +extern int MSVCRT___mb_cur_max; +extern LCID MSVCRT_current_lc_all_lcid; +extern WORD MSVCRT__ctype [257]; +extern WORD MSVCRT_current_ctype[257]; +extern WORD* MSVCRT__pctype; void msvcrt_set_errno(int); diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 31a56b4..dcbebfc 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -84,6 +84,12 @@ @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast @ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid @ cdecl __STRINGTOLD(ptr ptr str long) +@ stub ___lc_codepage_func +@ stub ___lc_collate_cp_func +@ stub ___lc_handle_func +@ cdecl ___mb_cur_max_func() MSVCRT____mb_cur_max_func +@ cdecl ___setlc_active_func() MSVCRT____setlc_active_func +@ cdecl ___unguarded_readlc_active_add_func() MSVCRT____unguarded_readlc_active_add_func @ extern __argc MSVCRT___argc @ extern __argv MSVCRT___argv @ extern __badioinfo MSVCRT___badioinfo @@ -110,7 +116,7 @@ @ cdecl __p___argc() @ cdecl __p___argv() @ cdecl __p___initenv() -@ cdecl __p___mb_cur_max() +@ cdecl __p___mb_cur_max() MSVCRT____mb_cur_max_func @ cdecl __p___wargv() @ cdecl __p___winitenv() @ cdecl __p__acmdln() @@ -125,7 +131,7 @@ @ stub __p__mbcasemap #() @ cdecl __p__mbctype() @ cdecl __p__osver() -@ cdecl __p__pctype() +@ cdecl __p__pctype() MSVCRT___pctype_func @ cdecl __p__pgmptr() @ stub __p__pwctype #() @ cdecl __p__timezone() MSVCRT___p__timezone @@ -136,11 +142,11 @@ @ cdecl __p__winminor() @ cdecl __p__winver() @ cdecl __p__wpgmptr() +@ cdecl __pctype_func() MSVCRT___pctype_func @ extern __pioinfo MSVCRT___pioinfo @ stub __pxcptinfoptrs #() @ cdecl __set_app_type(long) MSVCRT___set_app_type @ extern __setlc_active MSVCRT___setlc_active -@ cdecl ___setlc_active_func() MSVCRT____setlc_active_func @ cdecl __setusermatherr(ptr) MSVCRT___setusermatherr @ cdecl __threadhandle() kernel32.GetCurrentThread @ cdecl __threadid() kernel32.GetCurrentThreadId @@ -148,7 +154,6 @@ @ cdecl __unDName(ptr str long ptr ptr long) @ cdecl __unDNameEx(ptr str long ptr ptr ptr long) @ extern __unguarded_readlc_active MSVCRT___unguarded_readlc_active -@ cdecl ___unguarded_readlc_active_add_func() MSVCRT____unguarded_readlc_active_add_func @ extern __wargv MSVCRT___wargv @ cdecl __wgetmainargs(ptr ptr ptr long ptr) @ extern __winitenv MSVCRT___winitenv diff --git a/dlls/msvcrtd/msvcrtd.spec b/dlls/msvcrtd/msvcrtd.spec index 0b8e8f0..d000f33 100644 --- a/dlls/msvcrtd/msvcrtd.spec +++ b/dlls/msvcrtd/msvcrtd.spec @@ -100,6 +100,7 @@ @ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcrt.__RTDynamicCast @ cdecl __RTtypeid(ptr) msvcrt.__RTtypeid @ cdecl __STRINGTOLD(ptr ptr str long) msvcrt.__STRINGTOLD +@ cdecl ___mb_cur_max_func() msvcrt.___mb_cur_max_func @ extern __argc msvcrt.__argc @ extern __argv msvcrt.__argv @ extern __badioinfo msvcrt.__badioinfo @@ -151,6 +152,7 @@ @ cdecl __p__winminor() msvcrt.__p__winminor @ cdecl __p__winver() msvcrt.__p__winver @ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr +@ cdecl __pctype_func() msvcrt.__pctype_func @ extern __pioinfo msvcrt.__pioinfo @ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs @ cdecl __set_app_type(long) msvcrt.__set_app_type diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index 65c61a2..42495c2 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -90,7 +90,7 @@ extern char*** __p___argv(void); extern wchar_t*** __p___wargv(void); extern char*** __p__environ(void); extern wchar_t*** __p__wenviron(void); -extern int* __p___mb_cur_max(void); +extern int* ___mb_cur_max_func(void); extern unsigned long* __doserrno(void); extern unsigned int* __p__fmode(void); /* FIXME: We need functions to access these: @@ -102,7 +102,7 @@ extern unsigned int* __p__fmode(void); #define __wargv (*__p___wargv()) #define _environ (*__p__environ()) #define _wenviron (*__p__wenviron()) -#define __mb_cur_max (*__p___mb_cur_max()) +#define __mb_cur_max (*___mb_cur_max_func()) #define _doserrno (*__doserrno()) #define _fmode (*_fmode)
1
0
0
0
Alexandre Julliard : msvcrt: The _CI* math functions are only exported on i386.
by Alexandre Julliard
16 Dec '08
16 Dec '08
Module: wine Branch: master Commit: bcfd7dd3ff03b39821f12424b52a773aca73d08b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bcfd7dd3ff03b39821f12424b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 15 15:39:34 2008 +0100 msvcrt: The _CI* math functions are only exported on i386. --- dlls/crtdll/crtdll.spec | 32 ++++++++++++++++---------------- dlls/msvcr71/msvcr71.spec | 32 ++++++++++++++++---------------- dlls/msvcrt/math.c | 23 ----------------------- dlls/msvcrt/msvcrt.spec | 32 ++++++++++++++++---------------- dlls/msvcrt20/msvcrt20.spec | 32 ++++++++++++++++---------------- dlls/msvcrt40/msvcrt40.spec | 32 ++++++++++++++++---------------- dlls/msvcrtd/msvcrtd.spec | 32 ++++++++++++++++---------------- 7 files changed, 96 insertions(+), 119 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=bcfd7dd3ff03b39821f12…
1
0
0
0
Henri Verbeet : d3d8: Use the wined3d declaration to retrieve the d3d8 shader in IDirect3DDevice8Impl_GetVertexShader ().
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: 0a47e1beb46b47517b1f5569d7ee6f4b59c15cb9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a47e1beb46b47517b1f5569d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 15 12:10:15 2008 +0100 d3d8: Use the wined3d declaration to retrieve the d3d8 shader in IDirect3DDevice8Impl_GetVertexShader(). This makes it no longer necessary to create a wined3d vertex shader when the d3d8 vertex shader has a NULL function. --- dlls/d3d8/d3d8_private.h | 2 +- dlls/d3d8/device.c | 74 +++++++++++++++++++++++++++++---------------- 2 files changed, 49 insertions(+), 27 deletions(-) diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index a7a37d9..28952a3 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -531,6 +531,7 @@ typedef struct { DWORD elements_size; /* Size of elements, in bytes */ IWineD3DVertexDeclaration *wined3d_vertex_declaration; + DWORD shader_handle; } IDirect3DVertexDeclaration8Impl; @@ -600,7 +601,6 @@ struct IDirect3DVertexShader8Impl { const IDirect3DVertexShader8Vtbl *lpVtbl; LONG ref; - DWORD handle; IDirect3DVertexDeclaration8 *vertex_declaration; IWineD3DVertexShader *wineD3DVertexShader; }; diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index b571baf..58f698a 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1540,6 +1540,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexShader(LPDIRECT3DDEVICE8 IDirect3DVertexShader8Impl *object; IWineD3DVertexDeclaration *wined3d_vertex_declaration; const DWORD *token = pDeclaration; + shader_handle *handle; /* Test if the vertex declaration is valid */ while (D3DVSD_END() != *token) { @@ -1578,6 +1579,24 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexShader(LPDIRECT3DDEVICE8 *ppShader = 0; return D3DERR_INVALIDCALL; } + + handle = alloc_shader_handle(This); + if (!handle) + { + ERR("Failed to allocate shader handle\n"); + LeaveCriticalSection(&d3d8_cs); + IDirect3DVertexDeclaration8_Release(object->vertex_declaration); + HeapFree(GetProcessHeap(), 0, object); + *ppShader = 0; + return E_OUTOFMEMORY; + } + else + { + DWORD shader_handle = (handle - This->shader_handles) + VS_HIGHESTFIXEDFXF + 1; + *handle = object; + *ppShader = ((IDirect3DVertexDeclaration8Impl *)object->vertex_declaration)->shader_handle = shader_handle; + } + wined3d_vertex_declaration = ((IDirect3DVertexDeclaration8Impl *)object->vertex_declaration)->wined3d_vertex_declaration; /* Usage is missing ... Use SetRenderState to set the sw vp render state in SetVertexShader */ @@ -1586,23 +1605,13 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexShader(LPDIRECT3DDEVICE8 if (FAILED(hrc)) { /* free up object */ FIXME("Call to IWineD3DDevice_CreateVertexShader failed\n"); + free_shader_handle(This, handle); + IDirect3DVertexDeclaration8_Release(object->vertex_declaration); HeapFree(GetProcessHeap(), 0, object); *ppShader = 0; } else { - /* TODO: Store the VS declarations locally so that they can be dereferenced with a value higher than VS_HIGHESTFIXEDFXF */ - shader_handle *handle = alloc_shader_handle(This); - if (!handle) { - ERR("Failed to allocate shader handle\n"); - IDirect3DVertexShader8_Release((IUnknown *)object); - hrc = E_OUTOFMEMORY; - } else { - *handle = object; - object->handle = (handle - This->shader_handles) + VS_HIGHESTFIXEDFXF + 1; - *ppShader = object->handle; - - load_local_constants(pDeclaration, object->wineD3DVertexShader); - TRACE("(%p) : returning %p (handle %#x)\n", This, object, *ppShader); - } + load_local_constants(pDeclaration, object->wineD3DVertexShader); + TRACE("(%p) : returning %p (handle %#x)\n", This, object, *ppShader); } LeaveCriticalSection(&d3d8_cs); @@ -1645,6 +1654,7 @@ static IDirect3DVertexDeclaration8Impl *IDirect3DDevice8Impl_FindDecl(IDirect3DD d3d8_declaration->lpVtbl = &Direct3DVertexDeclaration8_Vtbl; d3d8_declaration->elements = NULL; d3d8_declaration->elements_size = 0; + d3d8_declaration->shader_handle = fvf; hr = IWineD3DDevice_CreateVertexDeclarationFromFVF(This->WineD3DDevice, &d3d8_declaration->wined3d_vertex_declaration, (IUnknown *)d3d8_declaration, fvf); @@ -1709,24 +1719,36 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 ifa static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD* ppShader) { IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DVertexShader *pShader; - HRESULT hrc = D3D_OK; + IWineD3DVertexDeclaration *wined3d_declaration; + HRESULT hrc; TRACE("(%p) : Relay device@%p\n", This, This->WineD3DDevice); EnterCriticalSection(&d3d8_cs); - hrc = IWineD3DDevice_GetVertexShader(This->WineD3DDevice, &pShader); - if (D3D_OK == hrc) { - if(0 != pShader) { - IDirect3DVertexShader8Impl *d3d8_shader; - hrc = IWineD3DVertexShader_GetParent(pShader, (IUnknown **)&d3d8_shader); - IWineD3DVertexShader_Release(pShader); - *ppShader = d3d8_shader->handle; - } else { + + hrc = IWineD3DDevice_GetVertexDeclaration(This->WineD3DDevice, &wined3d_declaration); + if (SUCCEEDED(hrc)) + { + if (wined3d_declaration) + { + IDirect3DVertexDeclaration8 *d3d8_declaration; + hrc = IWineD3DVertexDeclaration_GetParent(wined3d_declaration, (IUnknown **)&d3d8_declaration); + IWineD3DVertexDeclaration_Release(wined3d_declaration); + if (SUCCEEDED(hrc)) + { + *ppShader = ((IDirect3DVertexDeclaration8Impl *)d3d8_declaration)->shader_handle; + IDirect3DVertexDeclaration8_Release(d3d8_declaration); + } + } + else + { *ppShader = 0; hrc = D3D_OK; } - } else { - WARN("(%p) : Call to IWineD3DDevice_GetVertexShader failed %u (device %p)\n", This, hrc, This->WineD3DDevice); + } + else + { + WARN("(%p) : Call to IWineD3DDevice_GetVertexDeclaration failed %#x (device %p)\n", + This, hrc, This->WineD3DDevice); } TRACE("(%p) : returning %#x\n", This, *ppShader); LeaveCriticalSection(&d3d8_cs);
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
123
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Results per page:
10
25
50
100
200