Disable call to ::_seterrormode when WINAPI_FAMILY is defined to something other than WINAPI_FAMILY_DESKTOP_APP. Refs #143.

This commit is contained in:
Peter Dimov 2023-04-15 19:36:12 +03:00
parent 39978bde2b
commit 5904fb5636

View File

@ -35,9 +35,13 @@ inline void lwt_unattended()
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# endif
#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == 100 /*WINAPI_FAMILY_DESKTOP_APP*/
// disable message box on crash
::_seterrormode( /*SEM_NOGPFAULTERRORBOX*/ 0x0002 );
#endif
# if defined(__clang__)
# pragma clang diagnostic pop
# endif