From 2109e7d9a0d3dab172961ec19e75da1fa8a6cc61 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 8 Dec 2016 13:40:34 +0000 Subject: the return from ImplInit *is* checked bool WinOpenGLContext::init(HDC hDC, HWND hWnd) { ... return ImplInit(); } rtl::Reference WinOpenGLSalGraphicsImpl::CreateWinContext() { ... if (!xContext->init(mrWinParent.mhLocalDC, mrWinParent.mhWnd)) } etc. Another problem here is ... "If we notice that OpenGL is broken the first time being called, it is not too late to call disableOpenGLAndTerminateForRestart(). The first time this will be called is from displaying the splash screen" isn't true when the first start causes opengl to be disabled, then on subsequent starts you can enter this function from launching an opengl slide transition. (note opengl is disabled if opengl is < 30, so all the versioning checks the slide transitions do is probably pointless now. The only actually useful use of opengl we have seems to be somewhat unloved) Change-Id: I1e159f826447520f39ea063fd4c0c83220b1385f --- vcl/opengl/win/gdiimpl.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'vcl/opengl/win') diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx index 6215c4c20a2d..3f5da83dd84c 100644 --- a/vcl/opengl/win/gdiimpl.cxx +++ b/vcl/opengl/win/gdiimpl.cxx @@ -473,9 +473,8 @@ bool compiledShaderBinariesWork() bool WinOpenGLContext::ImplInit() { - // Failures here typically means that OpenGL can't be used. Returning false is fairly pointless - // as the calling code doesn't even check, but oh well. If we notice that OpenGL is broken the - // first time being called, it is not too late to call + // Failures here typically means that OpenGL can't be used. + // If we notice that OpenGL is broken the first time being called, it is not too late to call // disableOpenGLAndTerminateForRestart(). The first time this will be called is from displaying // the splash screen, so if OpenGL is broken, it is "early enough" for us to be able to disable // OpenGL and terminate bluntly with EXITHELPER_NORMAL_RESTART, thus causing the wrapper process -- cgit