Commit: fd1078e1055e6932fc539a1fae4c7d433b1839d9 Author: Harley Acheson Date: Fri Jan 28 15:19:05 2022 -0800 Branches: master https://developer.blender.org/rBfd1078e1055e6932fc539a1fae4c7d433b1839d9
Fix T62651: Win32 Multiple Adapters Warning Show a more instructive error message for users who have plugged multiple monitors into multiple display adapters. And do not exit if unable to open a child window when in this state. See D13885 for more details Differential Revision: https://developer.blender.org/D13885 Reviewed by Ray Molenkamp =================================================================== M intern/ghost/intern/GHOST_WindowWin32.cpp =================================================================== diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 7993772a94b..47d4ff77d17 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -132,8 +132,24 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, m_hDC = ::GetDC(m_hWnd); if (!setDrawingContextType(type)) { + const char *title = "Blender - Unsupported Graphics Card Configuration"; + const char *text = + "A graphics card and driver with support for OpenGL 3.3 or higher is " + "required.\n\nInstalling the latest driver for your graphics card might resolve the " + "issue."; + if (GetSystemMetrics(SM_CMONITORS) > 1) { + text = + "A graphics card and driver with support for OpenGL 3.3 or higher is " + "required.\n\nPlugging all monitors into your primary graphics card might resolve " + "this issue. Installing the latest driver for your graphics card could also help."; + } + MessageBox(m_hWnd, text, title, MB_OK | MB_ICONERROR); + ::ReleaseDC(m_hWnd, m_hDC); ::DestroyWindow(m_hWnd); m_hWnd = NULL; + if (!parentwindow) { + exit(0); + } return; } @@ -567,20 +583,13 @@ GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType ty (m_debug_context ? WGL_CONTEXT_DEBUG_BIT_ARB : 0), GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY); - if (context->initializeDrawingContext()) { - return context; - } - else { - MessageBox(m_hWnd, - "A graphics card and driver with support for OpenGL 3.3 or higher is required.\n" - "Installing the latest driver for your graphics card may resolve the issue.\n\n" - "The program will now close.", - "Blender - Unsupported Graphics Card or Driver", - MB_OK | MB_ICONERROR); + if (context && !context->initializeDrawingContext()) { delete context; - exit(0); + context = nullptr; } + return context; + #elif defined(WITH_GL_PROFILE_COMPAT) // ask for 2.1 context, driver gives any GL version >= 2.1 // (hopefully the latest compatibility profile) _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs