From 8ce747defa2dafebfa99f03913342d6aca995341 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 11 Feb 2010 16:34:43 +0000 Subject: [PATCH] gdi: Never fail at DLL load time. Windows doesn't really expect things to fail at this point -- it will try many times until it finally gives up, worse, something bad happens. The WGL state tracker will gracefully decline to do work even when it is loaded. --- src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c | 10 +++++----- src/gallium/winsys/gdi/gdi_softpipe_winsys.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c b/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c index 03dbd76c375..e9e5990cf53 100644 --- a/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c +++ b/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c @@ -251,13 +251,13 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: - if (!stw_init(&stw_winsys)) { - return FALSE; - } - return stw_init_thread(); + stw_init(&stw_winsys); + stw_init_thread(); + break; case DLL_THREAD_ATTACH: - return stw_init_thread(); + stw_init_thread(); + break; case DLL_THREAD_DETACH: stw_cleanup_thread(); diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c index 2078020f8f7..71360e55aac 100644 --- a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c +++ b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c @@ -297,13 +297,13 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: - if (!stw_init(&stw_winsys)) { - return FALSE; - } - return stw_init_thread(); + stw_init(&stw_winsys); + stw_init_thread(); + break; case DLL_THREAD_ATTACH: - return stw_init_thread(); + stw_init_thread(); + break; case DLL_THREAD_DETACH: stw_cleanup_thread(); -- 2.30.2