mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 10:08:08 +02:00
util: limit error-dialogs to win32
These dialogs only exist on Windows, so let's not even expose a util function for this on other platforms. The code is only ever called from Windows specific code anyway. While we're at it, clean up the name a bit as well. Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15485>
This commit is contained in:
parent
116553b554
commit
ae73a26355
3 changed files with 9 additions and 7 deletions
|
|
@ -120,7 +120,7 @@ stw_init(const struct stw_winsys *stw_winsys)
|
|||
{
|
||||
static struct stw_device stw_dev_storage;
|
||||
|
||||
debug_disable_error_message_boxes();
|
||||
debug_disable_win32_error_dialogs();
|
||||
|
||||
assert(!stw_dev);
|
||||
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ _util_debug_message(struct util_debug_callback *cb,
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
debug_disable_error_message_boxes(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
void
|
||||
debug_disable_win32_error_dialogs(void)
|
||||
{
|
||||
/* When Windows' error message boxes are disabled for this process (as is
|
||||
* typically the case when running tests in an automated fashion) we disable
|
||||
* CRT message boxes too.
|
||||
|
|
@ -97,8 +97,8 @@ debug_disable_error_message_boxes(void)
|
|||
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
|
||||
#endif
|
||||
}
|
||||
#endif /* _WIN32 */
|
||||
}
|
||||
#endif /* _WIN32 */
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
|||
|
|
@ -177,13 +177,15 @@ void debug_print_blob( const char *name, const void *blob, unsigned size );
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
/**
|
||||
* Disable interactive error message boxes.
|
||||
* Disable Win32 interactive error message boxes.
|
||||
*
|
||||
* Should be called as soon as possible for effectiveness.
|
||||
*/
|
||||
void
|
||||
debug_disable_error_message_boxes(void);
|
||||
debug_disable_win32_error_dialogs(void);
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue