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
March 2017
----- 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
717 discussions
Start a n
N
ew thread
Alexandre Julliard : po: Regenerate the po files.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: 130febe09268e22fd42c05f02f1ac38fd0368efb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=130febe09268e22fd42c05f02…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 23 15:29:42 2017 +0100 po: Regenerate the po files. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ar.po | 123 +++++++++++++++++++++++++------------------------- po/bg.po | 123 +++++++++++++++++++++++++------------------------- po/ca.po | 123 +++++++++++++++++++++++++------------------------- po/cs.po | 123 +++++++++++++++++++++++++------------------------- po/da.po | 123 +++++++++++++++++++++++++------------------------- po/de.po | 123 +++++++++++++++++++++++++------------------------- po/el.po | 125 ++++++++++++++++++++++++++------------------------- po/en.po | 123 +++++++++++++++++++++++++------------------------- po/en_US.po | 123 +++++++++++++++++++++++++------------------------- po/eo.po | 123 +++++++++++++++++++++++++------------------------- po/es.po | 123 +++++++++++++++++++++++++------------------------- po/fa.po | 123 +++++++++++++++++++++++++------------------------- po/fi.po | 123 +++++++++++++++++++++++++------------------------- po/fr.po | 123 +++++++++++++++++++++++++------------------------- po/he.po | 123 +++++++++++++++++++++++++------------------------- po/hi.po | 123 +++++++++++++++++++++++++------------------------- po/hr.po | 123 +++++++++++++++++++++++++------------------------- po/hu.po | 123 +++++++++++++++++++++++++------------------------- po/it.po | 123 +++++++++++++++++++++++++------------------------- po/ja.po | 123 +++++++++++++++++++++++++------------------------- po/ko.po | 123 +++++++++++++++++++++++++------------------------- po/lt.po | 123 +++++++++++++++++++++++++------------------------- po/ml.po | 123 +++++++++++++++++++++++++------------------------- po/nb_NO.po | 123 +++++++++++++++++++++++++------------------------- po/nl.po | 123 +++++++++++++++++++++++++------------------------- po/or.po | 123 +++++++++++++++++++++++++------------------------- po/pa.po | 123 +++++++++++++++++++++++++------------------------- po/pl.po | 123 +++++++++++++++++++++++++------------------------- po/pt_BR.po | 123 +++++++++++++++++++++++++------------------------- po/pt_PT.po | 123 +++++++++++++++++++++++++------------------------- po/rm.po | 123 +++++++++++++++++++++++++------------------------- po/ro.po | 123 +++++++++++++++++++++++++------------------------- po/ru.po | 123 +++++++++++++++++++++++++------------------------- po/sk.po | 123 +++++++++++++++++++++++++------------------------- po/sl.po | 123 +++++++++++++++++++++++++------------------------- po/sr_RS(a)cyrillic.po | 123 +++++++++++++++++++++++++------------------------- po/sr_RS(a)latin.po | 123 +++++++++++++++++++++++++------------------------- po/sv.po | 123 +++++++++++++++++++++++++------------------------- po/te.po | 123 +++++++++++++++++++++++++------------------------- po/th.po | 125 ++++++++++++++++++++++++++------------------------- po/tr.po | 123 +++++++++++++++++++++++++------------------------- po/uk.po | 123 +++++++++++++++++++++++++------------------------- po/wa.po | 123 +++++++++++++++++++++++++------------------------- po/wine.pot | 123 +++++++++++++++++++++++++------------------------- po/zh_CN.po | 123 +++++++++++++++++++++++++------------------------- po/zh_TW.po | 123 +++++++++++++++++++++++++------------------------- 46 files changed, 2854 insertions(+), 2808 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=130febe09268e22fd42c0…
1
0
0
0
Piotr Caban : msvcrt: Throw throw_scheduler_resource_allocation_error on Context tls index allocation error.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: 2458f06380bf2ac6c2d51170b96adc6854d57d23 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2458f06380bf2ac6c2d51170b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 23 11:41:36 2017 +0100 msvcrt: Throw throw_scheduler_resource_allocation_error on Context tls index allocation error. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/cpp.c | 9 +++++++++ dlls/msvcrt/msvcrt.h | 3 +++ dlls/msvcrt/scheduler.c | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 2cde8b2..e86df53 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -843,6 +843,15 @@ void throw_bad_alloc(const char *str) } #endif +#if _MSVCR_VER >= 100 +void throw_scheduler_resource_allocation_error(const char *str, HRESULT hr) +{ + scheduler_resource_allocation_error e; + scheduler_resource_allocation_error_ctor_name(&e, str, hr); + _CxxThrowException(&e.e, &scheduler_resource_allocation_error_exception_type); +} +#endif + /****************************************************************** * ?set_terminate@@YAP6AXXZP6AXXZ@Z (MSVCRT.@) * diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 659a3dc..dd957ef 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -285,6 +285,9 @@ void msvcrt_set_errno(int) DECLSPEC_HIDDEN; #if _MSVCR_VER >= 80 void throw_bad_alloc(const char*) DECLSPEC_HIDDEN; #endif +#if _MSVCR_VER >= 100 +void throw_scheduler_resource_allocation_error(const char*, HRESULT) DECLSPEC_HIDDEN; +#endif void __cdecl _purecall(void); void __cdecl _amsg_exit(int errnum); diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c index 470d141..1ab7906 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/scheduler.c @@ -87,7 +87,8 @@ static Context* get_current_context(void) if (context_tls_index == TLS_OUT_OF_INDEXES) { int tls_index = TlsAlloc(); if (tls_index == TLS_OUT_OF_INDEXES) { - /* throw scheduler_resource_allocation_error */ + throw_scheduler_resource_allocation_error(NULL, + HRESULT_FROM_WIN32(GetLastError())); return NULL; }
1
0
0
0
Piotr Caban : msvcrt: Move bad_alloc vtable definition into __asm_dummy_vtables function.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: 27185abe633ab37d4c0c62396a9736326a8a8401 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27185abe633ab37d4c0c62396…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 23 11:41:28 2017 +0100 msvcrt: Move bad_alloc vtable definition into __asm_dummy_vtables function. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/cpp.c | 84 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index a3037c8..2cde8b2 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -649,6 +649,34 @@ void * __thiscall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int f return _this; } +#if _MSVCR_VER >= 80 +typedef exception bad_alloc; +extern const vtable_ptr MSVCRT_bad_alloc_vtable; + +static void bad_alloc_ctor(bad_alloc *this, const char **name) +{ + MSVCRT_exception_ctor(this, name); + this->vtable = &MSVCRT_bad_alloc_vtable; +} + +/* bad_alloc class implementation */ +DEFINE_THISCALL_WRAPPER(MSVCRT_bad_alloc_copy_ctor,8) +bad_alloc * __thiscall MSVCRT_bad_alloc_copy_ctor(bad_alloc * _this, const bad_alloc * rhs) +{ + TRACE("(%p %p)\n", _this, rhs); + MSVCRT_exception_copy_ctor(_this, rhs); + _this->vtable = &MSVCRT_bad_alloc_vtable; + return _this; +} + +DEFINE_THISCALL_WRAPPER(MSVCRT_bad_alloc_dtor,4) +void __thiscall MSVCRT_bad_alloc_dtor(bad_alloc * _this) +{ + TRACE("(%p)\n", _this); + MSVCRT_exception_dtor(_this); +} +#endif + #if _MSVCR_VER >= 100 typedef struct { exception e; @@ -724,6 +752,9 @@ __ASM_VTABLE(exception, __ASM_VTABLE(exception_old, VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) VTABLE_ADD_FUNC(MSVCRT_what_exception)); +__ASM_VTABLE(bad_alloc, + VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) + VTABLE_ADD_FUNC(MSVCRT_what_exception)); #endif __ASM_VTABLE(bad_typeid, VTABLE_ADD_FUNC(MSVCRT_bad_typeid_vector_dtor) @@ -751,6 +782,7 @@ DEFINE_RTTI_DATA0( exception_old, 0, ".?AVexception@@" ) DEFINE_RTTI_DATA1( bad_typeid, 0, &exception_rtti_base_descriptor, ".?AVbad_typeid@std@@" ) DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@std@@" ) DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@std@@" ) +DEFINE_RTTI_DATA1( bad_alloc, 0, &exception_rtti_base_descriptor, ".?AVbad_alloc@std@@" ) #else DEFINE_RTTI_DATA0( exception, 0, ".?AVexception@@" ) DEFINE_RTTI_DATA1( bad_typeid, 0, &exception_rtti_base_descriptor, ".?AVbad_typeid@@" ) @@ -766,49 +798,11 @@ DEFINE_EXCEPTION_TYPE_INFO( exception, 0, NULL, NULL ) DEFINE_EXCEPTION_TYPE_INFO( bad_typeid, 1, &exception_cxx_type_info, NULL ) DEFINE_EXCEPTION_TYPE_INFO( bad_cast, 1, &exception_cxx_type_info, NULL ) DEFINE_EXCEPTION_TYPE_INFO( __non_rtti_object, 2, &bad_typeid_cxx_type_info, &exception_cxx_type_info ) -#if _MSVCR_VER >= 100 -DEFINE_EXCEPTION_TYPE_INFO(scheduler_resource_allocation_error, 1, &exception_cxx_type_info, NULL) -#endif - #if _MSVCR_VER >= 80 -typedef exception bad_alloc; -extern const vtable_ptr MSVCRT_bad_alloc_vtable; - -static void bad_alloc_ctor(bad_alloc *this, const char **name) -{ - MSVCRT_exception_ctor(this, name); - this->vtable = &MSVCRT_bad_alloc_vtable; -} - -/* bad_alloc class implementation */ -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_alloc_copy_ctor,8) -bad_alloc * __thiscall MSVCRT_bad_alloc_copy_ctor(bad_alloc * _this, const bad_alloc * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_bad_alloc_vtable; - return _this; -} - -DEFINE_THISCALL_WRAPPER(MSVCRT_bad_alloc_dtor,4) -void __thiscall MSVCRT_bad_alloc_dtor(bad_alloc * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); -} - -__ASM_VTABLE(bad_alloc, - VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCRT_what_exception)); -DEFINE_RTTI_DATA1( bad_alloc, 0, &exception_rtti_base_descriptor, ".?AVbad_alloc@std@@" ) DEFINE_EXCEPTION_TYPE_INFO( bad_alloc, 1, &exception_cxx_type_info, NULL ) - -void throw_bad_alloc(const char *str) -{ - bad_alloc e; - bad_alloc_ctor(&e, &str); - _CxxThrowException(&e, &bad_alloc_exception_type); -} +#endif +#if _MSVCR_VER >= 100 +DEFINE_EXCEPTION_TYPE_INFO(scheduler_resource_allocation_error, 1, &exception_cxx_type_info, NULL) #endif void msvcrt_init_exception(void *base) @@ -840,6 +834,14 @@ void msvcrt_init_exception(void *base) #endif } +#if _MSVCR_VER >= 80 +void throw_bad_alloc(const char *str) +{ + bad_alloc e; + bad_alloc_ctor(&e, &str); + _CxxThrowException(&e, &bad_alloc_exception_type); +} +#endif /****************************************************************** * ?set_terminate@@YAP6AXXZP6AXXZ@Z (MSVCRT.@)
1
0
0
0
Piotr Caban : msvcrt: Add scheduler_resource_allocation_error class implementation.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: b281c47144577a4cf28cf5c49c38dbbfc654cb12 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b281c47144577a4cf28cf5c49…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 23 11:41:21 2017 +0100 msvcrt: Add scheduler_resource_allocation_error class implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 12 +++--- dlls/msvcr100/msvcr100.spec | 12 +++--- dlls/msvcr110/msvcr110.spec | 18 ++++----- dlls/msvcr120/msvcr120.spec | 18 ++++----- dlls/msvcr120_app/msvcr120_app.spec | 18 ++++----- dlls/msvcrt/cpp.c | 80 +++++++++++++++++++++++++++++++++++++ dlls/msvcrt/cxx.h | 2 + 7 files changed, 121 insertions(+), 39 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b281c47144577a4cf28cf…
1
0
0
0
Piotr Caban : msvcrt/tests: Add Context::Id tests.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: ccdd3673e7a6d5369620670fe5be49e099ea8941 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ccdd3673e7a6d5369620670fe…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 23 11:41:17 2017 +0100 msvcrt/tests: Add Context::Id tests. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr100/tests/msvcr100.c | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/dlls/msvcr100/tests/msvcr100.c b/dlls/msvcr100/tests/msvcr100.c index ac167fc..295e287 100644 --- a/dlls/msvcr100/tests/msvcr100.c +++ b/dlls/msvcr100/tests/msvcr100.c @@ -142,6 +142,10 @@ typedef struct { char pad[64]; } event; +typedef struct { + void *vtable; +} Context; + static int* (__cdecl *p_errno)(void); static int (__cdecl *p_wmemcpy_s)(wchar_t *dest, size_t numberOfElements, const wchar_t *src, size_t count); static int (__cdecl *p_wmemmove_s)(wchar_t *dest, size_t numberOfElements, const wchar_t *src, size_t count); @@ -189,6 +193,9 @@ static void (__thiscall *p_event_set)(event*); static size_t (__thiscall *p_event_wait)(event*, unsigned int); static int (__cdecl *p_event_wait_for_multiple)(event**, size_t, MSVCRT_bool, unsigned int); +static Context* (__cdecl *p_Context_CurrentContext)(void); +unsigned int (__cdecl *p_Context_Id)(void); + /* make sure we use the correct errno */ #undef errno #define errno (*p_errno()) @@ -221,6 +228,8 @@ static BOOL init(void) SET(p__aligned_msize, "_aligned_msize"); SET(p_atoi, "atoi"); + SET(p_Context_Id, "?Id@Context@Concurrency@@SAIXZ"); + if(sizeof(void*) == 8) { /* 64-bit initialization */ SET(pSpinWait_ctor_yield, "??0?$_SpinWait@$00@details@Concurrency@@QEAA@P6AXXZ@Z"); SET(pSpinWait_dtor, "??_F?$_SpinWait@$00@details@Concurrency@@QEAAXXZ"); @@ -255,6 +264,8 @@ static BOOL init(void) SET(p_event_set, "?set@event@Concurrency@@QEAAXXZ"); SET(p_event_wait, "?wait@event@Concurrency@@QEAA_KI@Z"); SET(p_event_wait_for_multiple, "?wait_for_multiple@event@Concurrency@@SA_KPEAPEAV12@_K_NI@Z"); + + SET(p_Context_CurrentContext, "?CurrentContext@Context@Concurrency@@SAPEAV12@XZ"); } else { SET(pSpinWait_ctor_yield, "??0?$_SpinWait@$00@details@Concurrency@@QAE@P6AXXZ@Z"); SET(pSpinWait_dtor, "??_F?$_SpinWait@$00@details@Concurrency@@QAEXXZ"); @@ -289,6 +300,8 @@ static BOOL init(void) SET(p_event_set, "?set@event@Concurrency@@QAEXXZ"); SET(p_event_wait, "?wait@event@Concurrency@@QAEII@Z"); SET(p_event_wait_for_multiple, "?wait_for_multiple@event@Concurrency@@SAIPAPAV12@I_NI@Z"); + + SET(p_Context_CurrentContext, "?CurrentContext@Context@Concurrency@@SAPAV12@XZ"); } init_thiscall_thunk(); @@ -836,11 +849,51 @@ static void test_event(void) call_func1(p_event_dtor, &evt); } +static DWORD WINAPI external_context_thread(void *arg) +{ + unsigned int id; + Context *ctx; + + id = p_Context_Id(); + ok(id == -1, "Context::Id() = %u\n", id); + + ctx = p_Context_CurrentContext(); + ok(ctx != NULL, "Context::CurrentContext() = NULL\n"); + id = p_Context_Id(); + ok(id == 1, "Context::Id() = %u\n", id); + return 0; +} + +static void test_ExternalContextBase(void) +{ + unsigned int id; + Context *ctx; + HANDLE thread; + + id = p_Context_Id(); + ok(id == -1, "Context::Id() = %u\n", id); + + ctx = p_Context_CurrentContext(); + ok(ctx != NULL, "Context::CurrentContext() = NULL\n"); + id = p_Context_Id(); + ok(id == 0, "Context::Id() = %u\n", id); + + ctx = p_Context_CurrentContext(); + ok(ctx != NULL, "Context::CurrentContext() = NULL\n"); + id = p_Context_Id(); + ok(id == 0, "Context::Id() = %u\n", id); + + thread = CreateThread(NULL, 0, external_context_thread, NULL, 0, NULL); + ok(thread != NULL, "CreateThread failed: %d\n", GetLastError()); + WaitForSingleObject(thread, INFINITE); +} + START_TEST(msvcr100) { if (!init()) return; + test_ExternalContextBase(); test_wmemcpy_s(); test_wmemmove_s(); test_fread_s();
1
0
0
0
Piotr Caban : msvcrt: Add ExternalContextBase::GetId implementation.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: a0a9b8fe74eb058ea36e5076d0c9d0ceb21293d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0a9b8fe74eb058ea36e5076d…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 23 11:41:11 2017 +0100 msvcrt: Add ExternalContextBase::GetId implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/scheduler.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c index 257637e..470d141 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/scheduler.c @@ -33,6 +33,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); +static int context_id = -1; + #ifdef __i386__ #define DEFINE_VTBL_WRAPPER(off) \ @@ -64,6 +66,7 @@ typedef struct { typedef struct { Context context; + unsigned int id; } ExternalContextBase; extern const vtable_ptr MSVCRT_ExternalContextBase_vtable; static void ExternalContextBase_ctor(ExternalContextBase*); @@ -168,8 +171,8 @@ unsigned int __cdecl Context_VirtualProcessorId(void) DEFINE_THISCALL_WRAPPER(ExternalContextBase_GetId, 4) unsigned int __thiscall ExternalContextBase_GetId(const ExternalContextBase *this) { - FIXME("(%p)->() stub\n", this); - return -1; + TRACE("(%p)->()\n", this); + return this->id; } DEFINE_THISCALL_WRAPPER(ExternalContextBase_GetVirtualProcessorId, 4) @@ -225,7 +228,9 @@ Context* __thiscall ExternalContextBase_vector_dtor(ExternalContextBase *this, u static void ExternalContextBase_ctor(ExternalContextBase *this) { + TRACE("(%p)->()\n", this); this->context.vtable = &MSVCRT_ExternalContextBase_vtable; + this->id = InterlockedIncrement(&context_id); } extern const vtable_ptr MSVCRT_type_info_vtable;
1
0
0
0
Piotr Caban : msvcrt: Add ExternalContextBase class stub.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: 3dff8b8213e2f37992aedd2bafa69c1a68707fe8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3dff8b8213e2f37992aedd2ba…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 23 11:41:05 2017 +0100 msvcrt: Add ExternalContextBase class stub. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/cppexcept.h | 2 +- dlls/msvcrt/cxx.h | 15 ++++ dlls/msvcrt/main.c | 10 +++ dlls/msvcrt/msvcrt.h | 6 ++ dlls/msvcrt/scheduler.c | 187 ++++++++++++++++++++++++++++++++++++++++++++++-- 5 files changed, 213 insertions(+), 7 deletions(-) diff --git a/dlls/msvcrt/cppexcept.h b/dlls/msvcrt/cppexcept.h index 16a6e16..6ea5818 100644 --- a/dlls/msvcrt/cppexcept.h +++ b/dlls/msvcrt/cppexcept.h @@ -33,7 +33,7 @@ typedef struct __type_info { const vtable_ptr *vtable; char *name; /* Unmangled name, allocated lazily */ - char mangled[32]; /* Variable length, but we declare it large enough for static RTTI */ + char mangled[64]; /* Variable length, but we declare it large enough for static RTTI */ } type_info; /* exception object */ diff --git a/dlls/msvcrt/cxx.h b/dlls/msvcrt/cxx.h index 8f31f24..baf519f 100644 --- a/dlls/msvcrt/cxx.h +++ b/dlls/msvcrt/cxx.h @@ -259,3 +259,18 @@ typedef struct } rtti_object_locator; #endif + +#ifdef __i386__ + +#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (WINAPI*)type)&vtbl_wrapper_##off)args + +extern void *vtbl_wrapper_0; +extern void *vtbl_wrapper_4; +extern void *vtbl_wrapper_8; +extern void *vtbl_wrapper_20; + +#else + +#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (__cdecl***)type)this)[0][off/4]args + +#endif diff --git a/dlls/msvcrt/main.c b/dlls/msvcrt/main.c index a930a32..0be8dd3 100644 --- a/dlls/msvcrt/main.c +++ b/dlls/msvcrt/main.c @@ -115,6 +115,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) msvcrt_init_console(); msvcrt_init_args(); msvcrt_init_signals(); +#if _MSVCR_VER >= 100 && _MSVCR_VER <= 120 + msvcrt_init_scheduler(hinstDLL); +#endif #if _MSVCR_VER == 0 /* don't allow unloading msvcrt, we can't setup file handles twice */ LdrAddRefDll( LDR_ADDREF_DLL_PIN, hinstDLL ); @@ -137,11 +140,18 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) if (!msvcrt_free_tls()) return FALSE; MSVCRT__free_locale(MSVCRT_locale); +#if _MSVCR_VER >= 100 && _MSVCR_VER <= 120 + msvcrt_free_scheduler_thread(); + msvcrt_free_scheduler(); +#endif msvcrt_destroy_heap(); TRACE("finished process free\n"); break; case DLL_THREAD_DETACH: msvcrt_free_tls_mem(); +#if _MSVCR_VER >= 100 && _MSVCR_VER <= 120 + msvcrt_free_scheduler_thread(); +#endif TRACE("finished thread free\n"); break; } diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index cee8113..659a3dc 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -329,6 +329,12 @@ extern void msvcrt_free_popen_data(void) DECLSPEC_HIDDEN; extern BOOL msvcrt_init_heap(void) DECLSPEC_HIDDEN; extern void msvcrt_destroy_heap(void) DECLSPEC_HIDDEN; +#if _MSVCR_VER >= 100 +extern void msvcrt_init_scheduler(void*) DECLSPEC_HIDDEN; +extern void msvcrt_free_scheduler(void) DECLSPEC_HIDDEN; +extern void msvcrt_free_scheduler_thread(void) DECLSPEC_HIDDEN; +#endif + extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN; extern unsigned int __cdecl _control87(unsigned int, unsigned int); diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c index 4c64859..257637e 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/scheduler.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" + #include <stdarg.h> #include "windef.h" @@ -31,23 +33,89 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); +#ifdef __i386__ + +#define DEFINE_VTBL_WRAPPER(off) \ + __ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \ + "popl %eax\n\t" \ + "popl %ecx\n\t" \ + "pushl %eax\n\t" \ + "movl 0(%ecx), %eax\n\t" \ + "jmp *" #off "(%eax)\n\t") + +DEFINE_VTBL_WRAPPER(0); +DEFINE_VTBL_WRAPPER(4); +DEFINE_VTBL_WRAPPER(8); +DEFINE_VTBL_WRAPPER(20); + +#endif + typedef struct { const vtable_ptr *vtable; } Context; +#define call_Context_GetId(this) CALL_VTBL_FUNC(this, 0, \ + unsigned int, (const Context*), (this)) +#define call_Context_GetVirtualProcessorId(this) CALL_VTBL_FUNC(this, 4, \ + unsigned int, (const Context*), (this)) +#define call_Context_GetScheduleGroupId(this) CALL_VTBL_FUNC(this, 8, \ + unsigned int, (const Context*), (this)) +#define call_Context_dtor(this, flags) CALL_VTBL_FUNC(this, 20, \ + Context*, (Context*, unsigned int), (this, flags)) + +typedef struct { + Context context; +} ExternalContextBase; +extern const vtable_ptr MSVCRT_ExternalContextBase_vtable; +static void ExternalContextBase_ctor(ExternalContextBase*); + +static int context_tls_index = TLS_OUT_OF_INDEXES; + +static Context* try_get_current_context(void) +{ + if (context_tls_index == TLS_OUT_OF_INDEXES) + return NULL; + return TlsGetValue(context_tls_index); +} + +static Context* get_current_context(void) +{ + Context *ret; + + if (context_tls_index == TLS_OUT_OF_INDEXES) { + int tls_index = TlsAlloc(); + if (tls_index == TLS_OUT_OF_INDEXES) { + /* throw scheduler_resource_allocation_error */ + return NULL; + } + + if(InterlockedCompareExchange(&context_tls_index, tls_index, TLS_OUT_OF_INDEXES) != TLS_OUT_OF_INDEXES) + TlsFree(tls_index); + } + + ret = TlsGetValue(context_tls_index); + if (!ret) { + ExternalContextBase *context = MSVCRT_operator_new(sizeof(ExternalContextBase)); + ExternalContextBase_ctor(context); + TlsSetValue(context_tls_index, context); + ret = &context->context; + } + return ret; +} /* ?CurrentContext@Context@Concurrency@@SAPAV12@XZ */ /* ?CurrentContext@Context@Concurrency@@SAPEAV12@XZ */ Context* __cdecl Context_CurrentContext(void) { - FIXME("()\n"); - return NULL; + TRACE("()\n"); + return get_current_context(); } /* ?Id@Context@Concurrency@@SAIXZ */ unsigned int __cdecl Context_Id(void) { - FIXME("()\n"); - return -1; + Context *ctx = try_get_current_context(); + TRACE("()\n"); + return ctx ? call_Context_GetId(ctx) : -1; } /* ?Block@Context@Concurrency@@SAXXZ */ @@ -84,15 +152,122 @@ void __cdecl Context_Oversubscribe(MSVCRT_bool begin) /* ?ScheduleGroupId@Context@Concurrency@@SAIXZ */ unsigned int __cdecl Context_ScheduleGroupId(void) { - FIXME("()\n"); - return -1; + Context *ctx = try_get_current_context(); + TRACE("()\n"); + return ctx ? call_Context_GetScheduleGroupId(ctx) : -1; } /* ?VirtualProcessorId@Context@Concurrency@@SAIXZ */ unsigned int __cdecl Context_VirtualProcessorId(void) { + Context *ctx = try_get_current_context(); FIXME("()\n"); + return ctx ? call_Context_GetVirtualProcessorId(ctx) : -1; +} + +DEFINE_THISCALL_WRAPPER(ExternalContextBase_GetId, 4) +unsigned int __thiscall ExternalContextBase_GetId(const ExternalContextBase *this) +{ + FIXME("(%p)->() stub\n", this); + return -1; +} + +DEFINE_THISCALL_WRAPPER(ExternalContextBase_GetVirtualProcessorId, 4) +unsigned int __thiscall ExternalContextBase_GetVirtualProcessorId(const ExternalContextBase *this) +{ + FIXME("(%p)->() stub\n", this); return -1; } +DEFINE_THISCALL_WRAPPER(ExternalContextBase_GetScheduleGroupId, 4) +unsigned int __thiscall ExternalContextBase_GetScheduleGroupId(const ExternalContextBase *this) +{ + FIXME("(%p)->() stub\n", this); + return -1; +} + +DEFINE_THISCALL_WRAPPER(ExternalContextBase_Unblock, 4) +void __thiscall ExternalContextBase_Unblock(ExternalContextBase *this) +{ + FIXME("(%p)->() stub\n", this); +} + +DEFINE_THISCALL_WRAPPER(ExternalContextBase_IsSynchronouslyBlocked, 4) +MSVCRT_bool __thiscall ExternalContextBase_IsSynchronouslyBlocked(const ExternalContextBase *this) +{ + FIXME("(%p)->() stub\n", this); + return FALSE; +} + +static void ExternalContextBase_dtor(ExternalContextBase *this) +{ +} + +DEFINE_THISCALL_WRAPPER(ExternalContextBase_vector_dtor, 8) +Context* __thiscall ExternalContextBase_vector_dtor(ExternalContextBase *this, unsigned int flags) +{ + TRACE("(%p %x)\n", this, flags); + if(flags & 2) { + /* we have an array, with the number of elements stored before the first object */ + INT_PTR i, *ptr = (INT_PTR *)this-1; + + for(i=*ptr-1; i>=0; i--) + ExternalContextBase_dtor(this+i); + MSVCRT_operator_delete(ptr); + } else { + ExternalContextBase_dtor(this); + if(flags & 1) + MSVCRT_operator_delete(this); + } + + return &this->context; +} + +static void ExternalContextBase_ctor(ExternalContextBase *this) +{ + this->context.vtable = &MSVCRT_ExternalContextBase_vtable; +} + +extern const vtable_ptr MSVCRT_type_info_vtable; +DEFINE_RTTI_DATA0(Context, 0, ".?AVContext@Concurrency@@") +DEFINE_RTTI_DATA1(ContextBase, 0, &Context_rtti_base_descriptor, ".?AVContextBase@details@Concurrency@@") +DEFINE_RTTI_DATA2(ExternalContextBase, 0, &ContextBase_rtti_base_descriptor, + &Context_rtti_base_descriptor, ".?AVExternalContextBase@details@Concurrency@@") + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(ExternalContextBase, + VTABLE_ADD_FUNC(ExternalContextBase_GetId) + VTABLE_ADD_FUNC(ExternalContextBase_GetVirtualProcessorId) + VTABLE_ADD_FUNC(ExternalContextBase_GetScheduleGroupId) + VTABLE_ADD_FUNC(ExternalContextBase_Unblock) + VTABLE_ADD_FUNC(ExternalContextBase_IsSynchronouslyBlocked) + VTABLE_ADD_FUNC(ExternalContextBase_vector_dtor)); +#ifndef __GNUC__ +} +#endif + +void msvcrt_init_scheduler(void *base) +{ +#ifdef __x86_64__ + init_Context_rtti(base); + init_ContextBase_rtti(base); + init_ExternalContextBase_rtti(base); +#endif +} + +void msvcrt_free_scheduler(void) +{ + if (context_tls_index != TLS_OUT_OF_INDEXES) + TlsFree(context_tls_index); +} + +void msvcrt_free_scheduler_thread(void) +{ + Context *context = try_get_current_context(); + if (!context) return; + call_Context_dtor(context, 1); +} + #endif /* _MSVCR_VER >= 100 */
1
0
0
0
Piotr Caban : msvcrt: Add Context class static functions stubs.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: e70265feb6cb1c964907edb3f93d978d24388980 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e70265feb6cb1c964907edb3f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 23 11:40:58 2017 +0100 msvcrt: Add Context class static functions stubs. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 20 ++++---- dlls/msvcr100/Makefile.in | 1 + dlls/msvcr100/msvcr100.spec | 20 ++++---- dlls/msvcr110/Makefile.in | 1 + dlls/msvcr110/msvcr110.spec | 20 ++++---- dlls/msvcr120/Makefile.in | 1 + dlls/msvcr120/msvcr120.spec | 20 ++++---- dlls/msvcr120_app/msvcr120_app.spec | 20 ++++---- dlls/msvcrt/Makefile.in | 1 + dlls/msvcrt/scheduler.c | 98 +++++++++++++++++++++++++++++++++++++ 10 files changed, 152 insertions(+), 50 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e70265feb6cb1c964907e…
1
0
0
0
Nikolay Sivov : dwrite: Handle allocation failure for main run bitmap.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: 82509d7c15c54931d1f450dcd5759df986bb33a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82509d7c15c54931d1f450dcd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Mar 23 17:04:18 2017 +0300 dwrite: Handle allocation failure for main run bitmap. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index de8b80a..b3e2286 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -4899,7 +4899,7 @@ static inline BYTE *get_pixel_ptr(BYTE *ptr, DWRITE_TEXTURE_TYPE type, const REC runbounds->left - bounds->left; } -static void glyphrunanalysis_render(struct dwrite_glyphrunanalysis *analysis, DWRITE_TEXTURE_TYPE type) +static HRESULT glyphrunanalysis_render(struct dwrite_glyphrunanalysis *analysis, DWRITE_TEXTURE_TYPE type) { static const BYTE masks[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}; struct dwrite_glyphbitmap glyph_bitmap; @@ -4913,13 +4913,18 @@ static void glyphrunanalysis_render(struct dwrite_glyphrunanalysis *analysis, DW hr = IDWriteFontFace_QueryInterface(analysis->run.fontFace, &IID_IDWriteFontFace4, (void **)&fontface); if (FAILED(hr)) { WARN("failed to get IDWriteFontFace4, 0x%08x\n", hr); - return; + return hr; } size = (analysis->bounds.right - analysis->bounds.left)*(analysis->bounds.bottom - analysis->bounds.top); if (type == DWRITE_TEXTURE_CLEARTYPE_3x1) size *= 3; - analysis->bitmap = heap_alloc_zero(size); + if (!(analysis->bitmap = heap_alloc_zero(size))) { + WARN("Failed to allocate run bitmap, %s, type %s.\n", wine_dbgstr_rect(&analysis->bounds), + type == DWRITE_TEXTURE_CLEARTYPE_3x1 ? "3x1" : "1x1"); + IDWriteFontFace4_Release(fontface); + return E_OUTOFMEMORY; + } origin.x = origin.y = 0.0f; is_rtl = analysis->run.bidiLevel & 1; @@ -5030,6 +5035,8 @@ static void glyphrunanalysis_render(struct dwrite_glyphrunanalysis *analysis, DW analysis->ascenderoffsets = NULL; analysis->run.glyphIndices = NULL; analysis->run.fontFace = NULL; + + return S_OK; } static HRESULT WINAPI glyphrunanalysis_CreateAlphaTexture(IDWriteGlyphRunAnalysis *iface, DWRITE_TEXTURE_TYPE type, @@ -5081,8 +5088,12 @@ static HRESULT WINAPI glyphrunanalysis_CreateAlphaTexture(IDWriteGlyphRunAnalysi BYTE *src, *dst; int y; - if (!(This->flags & RUNANALYSIS_BITMAP_READY)) - glyphrunanalysis_render(This, type); + if (!(This->flags & RUNANALYSIS_BITMAP_READY)) { + HRESULT hr; + + if (FAILED(hr = glyphrunanalysis_render(This, type))) + return hr; + } src = get_pixel_ptr(This->bitmap, type, &runbounds, &This->bounds); dst = get_pixel_ptr(bitmap, type, &runbounds, bounds);
1
0
0
0
Józef Kucia : d3d11: Use ARRAY_SIZE() macro.
by Alexandre Julliard
23 Mar '17
23 Mar '17
Module: wine Branch: master Commit: 45aaffd142b56780975a33fbd3d37913a79415a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45aaffd142b56780975a33fbd…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Mar 23 12:15:51 2017 +0100 d3d11: Use ARRAY_SIZE() macro. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/async.c | 2 +- dlls/d3d11/d3d11_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d3d11/async.c b/dlls/d3d11/async.c index 2270023..69cc00b 100644 --- a/dlls/d3d11/async.c +++ b/dlls/d3d11/async.c @@ -386,7 +386,7 @@ static HRESULT d3d_query_init(struct d3d_query *query, struct d3d_device *device /* D3D11_QUERY_SO_OVERFLOW_PREDICATE */ WINED3D_QUERY_TYPE_SO_OVERFLOW, }; - if (desc->Query >= sizeof(query_type_map) / sizeof(*query_type_map)) + if (desc->Query >= ARRAY_SIZE(query_type_map)) { FIXME("Unhandled query type %#x.\n", desc->Query); return E_INVALIDARG; diff --git a/dlls/d3d11/d3d11_main.c b/dlls/d3d11/d3d11_main.c index ef2c40c..154a376 100644 --- a/dlls/d3d11/d3d11_main.c +++ b/dlls/d3d11/d3d11_main.c @@ -118,7 +118,7 @@ HRESULT WINAPI D3D11CoreRegisterLayers(void) {DXGI_DEVICE_LAYER_D3D10_DEVICE, layer_init, layer_get_size, layer_create, layer_set_feature_level}, }; - DXGID3D10RegisterLayers(layers, sizeof(layers)/sizeof(*layers)); + DXGID3D10RegisterLayers(layers, ARRAY_SIZE(layers)); return S_OK; } @@ -265,7 +265,7 @@ HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_t if (!feature_levels) { feature_levels = default_feature_levels; - levels = sizeof(default_feature_levels) / sizeof(default_feature_levels[0]); + levels = ARRAY_SIZE(default_feature_levels); } hr = D3D11CoreCreateDevice(factory, adapter, flags, feature_levels, levels, &device); IDXGIAdapter_Release(adapter);
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
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