Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2022-01-29 02:19:05 +0300
committerHarley Acheson <harley.acheson@gmail.com>2022-01-29 02:20:07 +0300
commitfd1078e1055e6932fc539a1fae4c7d433b1839d9 (patch)
tree63e26acaf7eaf1215ba2a04ae356cd112ebc258b /intern/ghost
parent3435c9a2c18f20cdb307f4fcfa66b476f3625ed8 (diff)
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
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp31
1 files changed, 20 insertions, 11 deletions
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)