From 2087484c65a3d5e75a9e8ad116d11a4e13366219 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 16 Feb 2016 14:14:43 +0200 Subject: use consistent #define checks for the Windows platform stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/opengl/OpenGLContext.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'vcl/source/opengl') diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 49a9b3e6d5d9..ba615ad9afaf 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -28,7 +28,7 @@ #include #endif -#if defined( WNT ) +#if defined(_WIN32) #include #endif @@ -1089,7 +1089,7 @@ void OpenGLContext::setWinSize(const Size& rSize) } -#if defined( WNT ) +#if defined(_WIN32) bool OpenGLContext::initWindow() { @@ -1252,7 +1252,7 @@ void OpenGLContext::reset() mbInitialized = false; // destroy the context itself -#if defined( WNT ) +#if defined(_WIN32) if (m_aGLWin.hRC) { std::vector::iterator itr = std::remove(g_vShareList.begin(), g_vShareList.end(), m_aGLWin.hRC); @@ -1287,7 +1287,7 @@ void OpenGLContext::reset() #endif } -#if defined( WNT ) || defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) +#if defined(_WIN32) || defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) SystemWindowData OpenGLContext::generateWinData(vcl::Window* /*pParent*/, bool bRequestLegacyContext) { @@ -1350,7 +1350,7 @@ bool OpenGLContext::isCurrent() { OpenGLZone aZone; -#if defined( WNT ) +#if defined(_WIN32) return wglGetCurrentContext() == m_aGLWin.hRC && wglGetCurrentDC() == m_aGLWin.hDC; #elif defined( MACOSX ) @@ -1366,7 +1366,7 @@ bool OpenGLContext::isCurrent() bool OpenGLContext::hasCurrent() { -#if defined( WNT ) +#if defined(_WIN32) return wglGetCurrentContext() != NULL; #elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) return false; @@ -1414,7 +1414,7 @@ void OpenGLContext::makeCurrent() clearCurrent(); -#if defined( WNT ) +#if defined(_WIN32) if (!wglMakeCurrent(m_aGLWin.hDC, m_aGLWin.hRC)) { SAL_WARN("vcl.opengl", "OpenGLContext::makeCurrent(): wglMakeCurrent failed: " << GetLastError()); @@ -1509,7 +1509,7 @@ void OpenGLContext::resetCurrent() OpenGLZone aZone; -#if defined( WNT ) +#if defined(_WIN32) wglMakeCurrent(NULL, NULL); #elif defined( MACOSX ) (void) this; // loplugin:staticmethods @@ -1526,7 +1526,7 @@ void OpenGLContext::swapBuffers() { OpenGLZone aZone; -#if defined( WNT ) +#if defined(_WIN32) SwapBuffers(m_aGLWin.hDC); #elif defined( MACOSX ) NSOpenGLView* pView = getOpenGLView(); @@ -1557,7 +1557,7 @@ void OpenGLContext::sync() { OpenGLZone aZone; -#if defined( WNT ) +#if defined(_WIN32) // nothing #elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) (void) this; // loplugin:staticmethods -- cgit